domingo, 28 de janeiro de 2018

Programming ESP8266 (ESP-01) USING A UART ESP-01 - Part 1

Hi there guys, long time no see! Today I came here to talk about the ESP-01 that is so tiny and can be so helpful to shrinkify the space needed for our projects despite it sometimes could be a real pain in the ass to program.
ESP-01
All those wires and GPIO pins that we need to connect and assure that ESP-01 is plugged into a 3.3V stable power supply make us lose a lot of precious time and even sometimes our patience. So I decided to buy an adapter to program it without the headaches of connecting the wires and I went from this...
Schematic to program ESP-01

to...
UART ESP-01


And it's so much simple you just need to plug there your ESP-01 and no more wires! Everything would be great if it worked, but the reality was that I was not able to flash the ESP-01.
But why!?


THE NEW PROBLEM -.-"

In order to ESP-01 enter in flash mode, you need to connect GPIO 0 to GND and this UART ESP-01 doesn't do that, so after some time spent on research, I think I found one good way to fix this. A simple hack that only takes a few minutes and makes possible connect both pins. The solution that I found consists of welding a switch to GND and GPIO 0. The advantage of using a switch here is that if we swipe it to the right it will create a bridge between the GND and GPIO 0 and will turn UART into an ESP-01 programmer but otherwise if we swipe it to the left it will break the bridge and UART ESP-01 will work as a normal UART.


THE SOLUTION

The solution for this, as said before, is really simple and for that, we only need a welding iron, a normal switch and one header pin or a piece of wire to join UART ESP-01 to the switch.

Material needed

After gathering all the necessary material we should start by preparing it. The first thing that we need to do is cut one of the side pins of the button because we will need only need to 2 of them and this way we prevent from the other one touch in anything that it shouldn't.

Button after cut the side pin
Now we only need to put everything together and we will be ready to program our ESP-01. Before starting to weld the button to UART ESP-01, take a look at the UART ESP-01 schematic to understand and see where each pin is located.

UART ESP-01  upside down schematic

Pick the button and weld the side button pin to GND and with a header pin or a piece of wire soldering the middle pin to GPIO 0.

UART ESP-01 with weld button

After welding both I strongly recommend using hot glue in order to help to fix the button and to prevent that anything messes up with what we just finished to do. In the picture below, you can see how I did it.

After applied the hot glue

Now everything is finished and we finally are ready to program our ESP-01. So let's move on to Part 2  and upload some custom code to it.

Sem comentários:

Enviar um comentário