How to build an open WiFi finder using ESP8266 and two coin batteries
In the past few months ESP8266 has created a real revolution in the IoT space. I’m using it in a project that will hit Indiegogo in a month or so and you, of course will support me ☺ During the development process I’ve learned a lot and I want to share a part of it. Let’s build cheap open WiFi finder together!
NodeMcu firmware https://github.com/nodemcu/nodemcu-firmware
ESP8266 flasher http://www.xess.com/blog/esp8266-reflash/
Actual scripts https://github.com/kstevica/ESP8266-WiFi-Finder
Logic level converter 5V to 3.3V http://www.banggood.com/Logic-Level-Converter-Bi-Directional-IIC-4-Way-Level-Conversion-Module-p-938774.html
Soldering equipment (you can use protoboard to avoid soldering)
Few wires http://www.banggood.com/buy/Dupont.html
Download ESP8266 flasher and ESPlorer. Connect USB to TTL adapter with ESP8266 using logic level converter:
USB 5V to LLC high voltage
USB 3.3V to LLC low voltage
USB GND to LLC high GND
LLC high GND to LLC low GND
USB TX to LLC HV1
USB RX to LLC HV2
ESP8266 VCC to LLC low voltage
ESP8266 GND to LLC low GND
ESP8266 TX to LLC LV2
ESP8266 RX to LLC LV1
ESP8266 CH_PD to LLC low voltage
And you’re almost ready to go ☺ Connect ESP8266 GPIO0 to LLC low GND to put ESP8266 into firmware flash mode and restart it, simple disconnect VCC pin. Start ESP8266 flasher, select firmware file from nodemcu folder (pre_build/latest), enter COM port of your USB to TTL module and start flashing. If everything is ok, you should see the message “Erasing flash”. If not, check the wiring and try again. After successful flash, disconnect the GPIO0 pin and restart the ESP8266 module. Congratulations, you’re ready to upload LUA sketches on your ESP8266!
Start the ESPlorer, open init.lua from the git repository and save it to the module. Open freewifi.lua and save it. Power off the module and connect LED to it, cathode (longer pin) to GPIO2 pin of the ESP8266 and anode (shorter pin) to the GND pin. Power on the module and see the LED blinking while searching for the open WiFi networks. When found, LED will be constant on.
To make it somewhat wearable ☺ connect two CR2450 or CR2477 batteries together, solder (or use dupont wires) positive from batteries to VCC, negative to GND. Don’t forget to connect CH_PD to VCC as well. LED cathode keep connected to GPIO2 on ESP8266 and anode on GND. Add some kind of switch and you’re ready to roam around! CR2450 has capacity of 620 mAh, which might be enough for 10–12 hours of active work.