Welcome back once again, today I wanted to talk about a side project I've been off working on. As you may know the Avatar Framework will rely on networked remote sensor and actuator modules that either sense or act on their environment. While it is our intent to spin an open source hardware module to implement the sensors and actuators, we still want to be receptive to alternate methods of reaching our goal.
That said the ESP8266 has caused quite a stir in the community lately due to its sub $7 price tag. I haven’t put it through its paces yet to see what kind of distance from an access point it supports, so it could still turn out to be you get what you pay for. But its price tag warrants a closer look.
If you've been following along with the Miser Technologies articles you know that any wired or wireless module that supports the Avatar discovery , configuration, data publish and actuator commands can work in the Avatar Framework that we are developing.
I've decided to take this detour because, unlike the Microchip MRF24G WiFi modules we have been prototyping with, the ESP8266 interface from the outside world is an AT command set. We have shied away from AT command type devices in the past because while they are good for quick projects that require TCP connection, but it doesn't seem like the kind of thing we want to kludge into a professional well designed project. However, the $7 dollar price tag fits right in with the Miser Technologies charter.
To get started it only takes a few low cost components and a breadboard. The components needed are an FTRL232 USB to serial adapter, an LDO 3.3v regulator, a DIP header to dual SIP header adapter and of course an ESP8266 board. I took a shot of the hookup on my breadboard; sorry for the crappy picture 🙂 I've got to get better at photographing small items at close ranges. If you would like to follow along you can grab similar components that I have listed above. If you’re interested in the breadboard adapter or the FTRL-232 USB adapter drop me a line, if there is enough interest perhaps these will be the first Miser Technologies products for sale. How cool would that be to have a kit that we can sell for less than 20 bucks.
While price is a motivator, it will finally force me to try to make an AT command device part of a robust wireless module implementation. So I am going to write some articles along the way and share what I am learning about these ESP8266 modules. I hope this will help anyone out there that is thinking of doing a project using one of these modules but isn’t sure how to get started. I’ll walk you through each step from project concept to board manufacture if the module proves worthy as we go through the prototype stage.
Here are the scheduled activities and I’ll keep you posted with my findings during each stage.
- Use a USB to serial interface to control the ESP8266 from a PC terminal program to get familiar with commands to get it attached to my wireless network and send and receive data. To accomplish this I’ll connect the USB serial interface and ESP8266 module on a solder-less breadboard. To build the circuit on a breadboard I’ll need to create a DIP to dual SIP interface board that will adapt the ESP8266’s 8 pin DIP to connect suitable for plugging into a breadboard.
- Modify my Java Avatar Module simulator to use the ESP8266 as its network interface. I’ll need to replace code that used the PCs Ethernet controller with code that will control the ESP8266 using the AT commands via RXTX Serial Port Java library. I’ll code the serial AT command interface up and in a way that will be a blue print for porting to microcontroller C code.
- Write code on a PIC 18F26K20 microcontroller to implement an Avatar Module with the ESP8266 connected to the microcontrollers UART port. Build the circuit on a solderless breadboard.
- If things go well and it makes sense, I will spin a printed circuit board to interface a PIC 18F26K20 microcontroller with the ESP8266’s 8 Pin DIP.