Thursday, January 8, 2015

Wi-Fi revisited with the ESP8266 chip

The new ESP8266 chip has created quite a buzz in the recent months, and I have decided to give it a try for Wi-Fi communications between my instruments and a Nexus tablet. The ESP8266 is a 3 $ chip that can be programmed as a Wi-Fi access point (AP) as well as as client for a router (STA) at the same time if required. It can even host a small Web server. An SDK (Software Development Kit) is available to configure the microprocessor to specific needs.

In my case, I use it as UDP server to send the serial output generated by my system. The UDP packets are sent at the 10 Hz rate, and contain a payload of 76 bytes (mostly measured and calculated values in floating-point format). The payload contents are described here. And how the calculations are made is described here.




The Nexus tablet is programmed as a UDP client, connected to the ESP8266 AP network visible to any Wi-Fi device. When the tablet software sends a ‘START’ message to the ESP8266, it is bombarded back by the 10 Hz packets until it sends a ‘STOP’ message. These data are used to refresh the displays in real-time on the tablet. Many different custom displays can be swapped around. Any resemblance to recent professional first-class displays is not coincidental: the Android graphics capabilities are impressive.

Here is the prototype arrangement used. The ESP8266 is a 3.3V device, and a logic level converter is used on the 5 V serial signal from the system.




For development with the SDK and programming, I used this Eclipse-based tool-chain, on a Win7 64-bit machine: Espressif DevKit for Windows.