Before we get started, I would like to walk you through my discovery about this programmer. I spend 2 days to get into the following conclusion.
Online presence of this Programmer:
I come from a Computer Science background and I am pretty bad in connecting circuits. Having seen the programming circuit using arduino and 3.3v power circuit (build using LM2950-33, resistors and capacitors) , I decided to find a simple and cheap programmer for this job.
Finally I ended up buying this,
ESP-01 ESP8266 Programmer CH340G Chip USB WiFi Wireless UART GPIO0 Adapter
You can find the same at a cheaper rate from aliexpress, if you are ready to wait for some time.
But, did it solve your problem ?
Ans: Not Really.
Let me tell you why !
In order to program ESP8266 you need to connect GPIO 0 to GND.
The only article mentioning about this Programmer was this one. In that, he created a custom bridge for it.
This would be a tedious procedure. And that was surely, not what i wanted !
Also read my question here: ESP8266 Programming using ESP-01 to USB converter.
But in the sellers page, he mentions something about Jumper.
I couldn’t find any such thing, on the right of 2x4P header, except for the capacitor. Then on the bottom side of the Programmer, there were two minute holes, and I thought for a while, Are they the jumper, seller is talking about?
It was not until, I saw this picture, that i understood, what their intended design was.
With the addition of Capacitor for steady 3.3v supply, they didn’t get any room to fit in the jumper. (That’s what i concluded 😛 )
So what did I do ?
I thought of wiring a switch connecting GPIO 0 and GND (not sure, whether it would work or not). But instead, I made a bread board connection for the same as I already had the components with me.
- Jumper wires
I connected the male pins of ESP to female pins of Programmer using female-male jumper, except for the GND, GPIO 0 of ESP and GND, GPIO 0 of Programmer. I then connected these 4 ports to breadboard using the jumpers.
GND , GPIO 0 from ESP and GND from Programmer were connected together in the same slot.
GPIO 0 of the Programmer was connected in a different slot. (would be used later)
Here is the ESP8266-01 pin diagram for your reference.
Now I was ready to go.
Finally complied and ran the Blink LED example for ESP8266 .
1. When ever you get this error,
warning: espcomm_sync failed
you have to plug-out and plug-in the device.
2. If you want to just run the device after flashing (ie don’t want to re-flash it), remove the GPIO 0 from GND. ESP8266 has 2 modes,
Bootloader, for flashing new firmware
Normal, executing the firmware.
Is there any other simple solution for the same?
I would recommend you guys buy
- This board has a inbuilt input sensor (LDR) and an output sensor (RGB LED).
- It has got button for RESET and FLASH.
- More pins- GPIO‘s, ADC etc.
- Breadboard friendly.
In the next article, I will discuss about Pubsubclient and its usage in ESP8266 programming.
If this article helped, give it a share 😉 .
Thought of sharing this website, where you can simulate arduino circuits.