Introduction: USB ESP-12 Programmer

About: Interested in IoT

I thought it'd be interesting playing around with IoT so i decided to try out the esp8266. I saw the myriad of solutions out there to program the esp8266 so i borrowed some ideas from here https://www.instructables.com/id/USB-to-ESP-01-Boa... and here https://cmheong.blogspot.com/2018/05/using-ch340-u... to program the esp-01 simply with flash and reset buttons included. After i had done that i thought it'd be fun trying to make an adapter mod for it to also program the esp-12.

Parts:

Prices may vary due to discounts and shipping to different countries and what not, but are correct as at the time of writing in my particular situation

CH340 USB to ESP8266 ESP-01 Wifi Module Adapter $0.80

10 pcs Momentary switch button $0.52

ESP-12S ESP8266 $1.95

2 pcs ESP-12 Breakout board $0.40

10 pcs pogo pins $2.05

2 pcs Double Row SMT SMD Male Pin Header Strip Connector $1.33

thin wire

hot glue gun and glue

soldering iron and solder

elastic band

Step 1: Solder the Pogo Pins to the Breakout Board

Solder the pogo pins to the breakout board for the following pins:

REST (RESET)

CH_PC (EN)

VCC

TXD

RXD

GPIO0

GPIO2

GPIO15

GND

The pogo pins are rather small so i had to use a pair of tweezers with some tape around it to insulate against the heat to hold the pins whilst i soldered.

Make sure that the pogo pins aren't shorted with each other by checking for continuity with a multimeter. There are 10k resistors between CH_PC and VCC, GPIO15 and GND on the breakout board so expect a reading between those pins.

Step 2: Solder Pin Headers to ESP-12 Breakout Board and Wire

Attach the two 8p pin headers that comes with the breakout board with the long pins at the front of the board whilst soldering at the back of the board, you don't need to solder all pins to the board just the ones used above (refer here for minimal flashing schematics). The reason for this is if you want to run/program an esp-12 that is already soldered onto an breakout board it should be able to do it (although i haven't actually tried that yet). Now cut a section of the double row smt pin header so that there are two rows of 4 pins. Solder wire connecting the pinout for the 4 pin double row as per an ESP-01 pinout matching to the breakout board.

The names aren't exactly the same (except for GND) but:

VCC = 3V3

REST = RST

CH_PC = EN

TXD = TX

RXD = RX

GPIO0 = IO0

GPIO2 = IO2

GND = GND

Step 3: Solder Buttons to the CH340 USB Adapter

Solder button on the bottom of the CH340 USB adapter for the FLASH mode between GPIO0 and GND pins. Hot glue it to the adapter.

Solder button on the back of the CH340 USB adapter for the RESET mode between RESET and GND pins. Hot glue it to the adapter

Step 4: Hot Glue Pogo Pins, Foam and Double Row 4p Pin Header

Hot glue the inner side of the pogo pins to the breakout board to give them some strength, taking care not to get any glue on the moving pin. Glue a little packaging foam (or any compressible sponge-like material) between the pogo pins so the esp-12 wont fall into the gap too easily. Glue the smt double row 4p header to the back of the breakout board so it wont get disconnected when pulling out of the CH340 usb adapter.

Step 5: Align ESP-12 Onto Pogo Pins and Sandwich With Another Breakout Board

Align ESP-12 (i tested with an ESP-12F and an ESP-12S) onto the pogo pins and sandwich it with another breakout board on top. Use an elastic band to hold it firmly in place. You may need to adjust the esp-12 to make sure all the contacts are touching with enough pressure. It would probably be less finicky if instead of using pogo pins to use spring metal clips for the side of the ESP-12. Here is an example on youtube where someone has used the contacts from a PCI slot from an unused motherboard https://www.youtube.com/watch?v=BvY_T-My9Ls and https://www.youtube.com/watch?v=gI_lKu2uJDs

NOTE: After some more usage i find it very finicky to align and apply enough pressure onto the pogo pins, i therefore recommend people not to try using pogo pins unless they can deal with a lot of frustration

Step 6: Plug Esp-12 Adapter Mod Into the CH340 USB Adapter and Program Away

Plug esp-12 adapter mod into the CH340 USB adapter (with top of board in same direction as usb plug) then stick this into your pc and use Arduino IDE or ESP Flash Download Tool to load your programs.

NOTE: if the flash procedure doesn't work it could be because the contact between the pogo pins and the esp-12 isn't good, adjust esp-12 and/or elastic band to give good even pressure across all pogo pins

Step 7: Flashing BLINK Example With Arduino IDE (optional)

Start Arduino IDE and load BLINK example.

To enter FLASH mode hold down FLASH button (bottom) and press RESET button (back) then release FLASH button (bottom).

Set up the parameters of esp-12

Click upload

If it worked correctly it should behave like in the video

NOTE: if the flash procedure doesn't work it could be because the contact between the pogo pins and the esp-12 isn't good, adjust esp-12 and/or elastic band to give good even pressure across all pogo pins