WiFi 'tethered' Arduino robot
Back in 2021 I was working on an Arduino based robot. These are my notes on how to 'tether' the robot via an existing WiFi network to permit Arduino program upload, and serial terminal monitoring and control, from a Windows PC as-if I had a USB lead plugged into the Arduino.
- Arduino, on robot - the Arduino must use the standard serial bootloader not the USB bootloader used on Leonardo etc.
- ESP8266 module - e.g. Wemos D1 Mini, or ESP01
- Quad MOSFET Level Converter, e.g. https://www.sparkfun.com/products/12009
- Miniature latching DPDT switch
- DuPont jumper wires, to suit headers on robot
- Strip of 0.1" pitch header pins
- Small bore heatshrink sleeving
The level converter is needed if the Arduino is 5V. The DPDT switch is needed if you want to retain the capability to program the Arduino via USB The header pins are needed if you want to make the level converter or ESP8266 module pluggable.
If nothing is connected to an Arduino's USB port, you can connect a serial interface to its RX and TX pins and program it over this interface. /RESET needs to be pulsed low immediately before programming to enter the bootloader.
The hookup is: 5V Arduino <=> Level Converter <=> Switch <=> ESP8266 module
Cut two jumper wires in the middle and solder all the cut ends to the switch so it can disconnect both wires. Optionally solder a link across both NO contacts so that when the switch is open, the ESP8266 RX and TX pins are looped together.
Make Y (or daisychain) wires for power and ground, e.g. by cutting two DuPont jumpers and splicing three cut ends together, insulating it with heatshink. Make one red, and one black Y wire.
Populate the level converter and ESP8266 module with header pins.
Connect everything together:
|Arduino pin||Level Converter pin||Switch pin||ESP8266 pin||Notes|
|RX (0)||HV0||Data to Arduino|
|TX (1)||HV1||Data from Arduino|
- Which ESP8266 GPIO to use for Reset depends on your module. It cant be RX, TX or used for the ESP8266 SPI Flash program memory.