Programming ESP8266 (ESP-01) using ESP8266 Programmer CH340G Chip Adapter-PART 2

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.

Please read my tutorial series on IOT.

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.

ESP-01 ESP8266 Programmer CH340G Chip USB WiFi Wireless UART GPIO0 Adapter

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.

1

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.

2

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.

3

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.

  1. Jumper wires
  2. Breadboard

breadboard_programer_esp8266

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.

esp8266-pinout

Now I was ready to go.

Finally complied and ran the Blink LED example for ESP8266 .

Note:

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.

Alternative:

Is there any other simple solution for the same?

I would recommend you guys buy

ESP8266 Serial WIFI Witty Cloud Development Board ESP-12F Module MINI nodemcu

esp8266-serial-wifi-witty-cloud-development-board-esp-12f-module-mini-nodemcu

  • 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.

Please read my tutorial series on IOT.

In the next article, I will discuss about Pubsubclient and its usage in ESP8266 programming.

If this article helped, give it a share πŸ˜‰ .

UPDATE: (22-01-17)

Thought of sharing this website, where you can simulate arduino circuits.

https://circuits.io/lab/

https://circuits.io/circuits/2958159-the-unnamed-circuit#breadboard

 

Advertisement

8 thoughts on “Programming ESP8266 (ESP-01) using ESP8266 Programmer CH340G Chip Adapter-PART 2

  1. Sharing my solution for grounding GPIO0
    for programming mode πŸ™‚

    Simply hold the button when connecting USB and release after a second or so.

    After my sketches are uploaded the esp8266-01 starts in operating mode.

    Button is held by hot glue

    https://uploads.disquscdn.com/images/1cccf05a3a717789d97f2199d9093b67092d9d65f570d79d3d7dfa591f6cd161.jpg https://uploads.disquscdn.com/images/376315446a3491dbdd981c9fef02e9751aca9a6eff2cef02954c8cb357d6c36d.jpg

    Like

      1. Glad you liked it, I had a hell of a time bending the wires in position. With the solder they dont budge but you could always hot-glue it to make the wiring firmer

        Like

  2. The sad thing with this adapter is that it could be great if they had just wired the CH340G’s RTS or DTR pins to the GPIO0 pin.
    One caveat might be that DTR is high when set to off, so this needs a transistor for inversion, or a change to the regular espflasher.
    If you use e.g. RealTerm, you can set/clear DTR or RTS at will from the ‘pins’ tab.

    Like

  3. I just got my programmer yesterday, and You’re right, it is a disappointment that it has zero provisions on it for a RST or GPIO0-GND.. Someone else told me, I believe on the ESP8266.com forum, they were using the DTR line from a ‘FTDI-Basic’ and toggling it via the terminal program, to handle putting the 8266 into Flash mode. Drawback, would be trying to figure out which pin of the CH340 or the FTDI chip, is DTR? I like Fettkeewl’s idea of the SPST switch on the side, but wouldn’t a jumper be a little more reliable for Flashing? I would think yes, for a reset switch, but flash-enable, should be a constant connection (a jumper, or a slide switch) Also, Has anyone found a schematic for this version of programmer? I would assume it to be in the Public Domain since its design is open-source?

    Like

      1. Anytime Glauber! As always, If something comes in the mail, and doesn’t quite fit the specs we expected, we can always hack it to those specs!

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s