Skip to main content

A simple ESP-01 USB adapter with toggle switch for reprogramming

ESP-01 is a simple ESP8266 module which can be purchased cheaply from Aliexpress. At one of promotion, I purchased an ESP-01 for just S$1.97. That's very cheap for a wifi enabled microcontroller. An ESP-01 can be a WIFI bridge for non-connected microcontroller such as Arduino UNO, Mega, Nano etc. Communication between the microcontroller can be done using the serial link between them.

I have written a post on this using ESP-Link to connect to an Arduino Pro Mini. Together with the client library provided, the Pro Mini can easily transfer sensor data via MQTT.
http://iotdiary.blogspot.sg/2017/09/using-esp-link-transparent-bridge.html

For the most part, once the firmware is in place, normally I will use OTA to update. Sometimes, I wanted to reuse the same controller for another firmware and I have rewired up the controller for reflashing. This makes it very inconvenient to use.

Recently, I bought a USB ESP-01 adapter thinking that my problem is solved. When I received it and realised that it is cannot be a programmer so I decided to wire up a toggle switch.

The GPIO0 is wired to the centre pin and one of the pins is pulled up to VCC (Normal Operation) and the other pin is wired to ground (Programming Mode).
After some soldering and covering the exposed parts using a glue gun, the final output looks like this. Not very nice but workable. 
Instead of soldering and glueing, you can also purchase an adapter with the toggle switch. The price difference is about S$2-$3 compared to those without.

Comments

Popular posts from this blog

Xiaomi Mi Flora Chinese and International version comparison

Xiaomi Miflora sensor allows monitoring of the surrounding environment of the plant. It can monitor temperature, soil moisture, conductivity (acidity of the soil), ambience light. There are 2 versions of the sensor, international and Chinese version. Realistically, I cannot see the difference between the 2 versions. The left-hand side is the Chinese version and the right is the international version. Other than the packaging, the main difference is the price of the sensor. The International version cost 2x more. In other forums, there are discussions that the Chinese version cannot connect to the MiHome App. I have set my MiHome app to connect to China server and it is able to register the sensor correctly. For my usage, I will be connecting to Openhab to monitor the plants andusing  Thomas Dietrich MiFlora mqtt daemon  as the bridge between Openhab and the sensor. The International version is detected as Flower care and the firmware version is 3.1.9 wh...

Using ESP-Link transparent bridge (ESP-01 and Arduino Pro Mini)

Recently stumbled across an interesting open source project ESP-Link . Its main purpose is to network-enable a non-network microcontroller (MCU) such as Arduino Uno, Pro mini or Nano using ESP8266. The author termed it as "Transparent Bridge". The ESP and MCU  communicate via the serial link and there is a companion Arduino library EL-Client  for the MCU to connect up the network using MQTT, REST, TCP and UDP. Setup I have put together an ESP-01 and an Arduino Pro Mini for this experiment. I have chosen a 3.3 version Pro mini so that I do not need to do any voltage level shifting between the I/O pins. In order to have a stable voltage source, the ESP8266 is powered by Pro Mini and the Pro Mini "RAW" pin is connected to a 5v USB power source. The RAW pin can take voltage up to 12V. The reset pin of Pro Mini is connected to GPIO 0 of ESP-01. This enables the ESP-01 to reset the Pro Mini.   I have linked up an APDS 9960 sensor to it and periodically se...