Recently, I worked on Arduino WIFI solutions. My goal is to send sensor readings through MQTT protocol, the cheaper the better. :smiling_imp: Arduino Yun is good but I need a cheap solution so it's just too expensive for me. CC3000 is cheaper but it has so many useless function (only for me, maybe) as its arduino library is too huge for 328 based Arduino. There's not much space for user codes... There are quite a few cheap ESP8266 modules floating around, so I purchased some ESP-01 modules for testing.
However after messed up for hours, I quickly found that I should make a 'ESPShield' so wiring between ESP-01 and Arduino will be much much easier... :grinning:
At least, the ESPShield should meet the following requirements:
- Burn ESP8266 firmware from serial port.
- Quickly switch ESP8266 between firmware mode and work mode.
- Quickly connect/disconnect ESP8266's serial port to/from Arduino.
- RST bottom should be able to reset both ESP-01 and Arduino.
- Optional external 5V power supply (regulated to 3.3V for ESP-01).
- Series resistor between Arduino TX and ESP RX.
Additionally, I think connecting ESP-01 GPIO2 to an LED should be good. It could be used for custom purposes.
After 2 runs of PCB making, I have a working prototype ESPShield now. I've tested the ESPShield prototype, it looks ESP is the right choice for me:
- It's just simple and cheap. ESP-01 costs only about $2. And my prototype shield board costed about $3 each. I'm already happy with this $5 solution and it might be cheaper to make more.
- ESP8266 firmware burning speed could be setup to 1.2Mbps(1228800bps).
- I modified esp_mqtt_bridge from github to support LED controlling on GPIO2. When MQTT is connected, the LED will light up. Since esp_mqtt_bridge implemented wifi and mqtt client on ESP, it greatly offloads Arduino UNO.
- Wifi and mqtt are very stable (compared to CC3000).
- SmartConfig is also working on my prototype. :smiling_imp:
- It's possible to send Arduino hex through WIFI and burn it into Arduino with ESP-01. I'm still working on this. It might need some hack to my prototype board. So a 3rd run of PCB is possible.
Now I'm planning for a small run of the ESPShield, to make 100-200 units. So I want to know if there's anyone interested in this and, do you have any suggestions? Any comment will be appreciated :D