Posted on 6 Comments

Vlog #66: Let’s define a standard ESP8266/ESP32 programming header

UPDATE: The definition of the ESPFlash header convention is now here:

If you don’t put USB on your project, you have to decide on a programming header to use. But everyone does it their own way: Sonoff has theirs, wESP32 has another, many projects have them and they’re all different!

That sucks, so let’s fix it by deciding what we think should be the conventional programming header format for our projects.

My goals are:

  1. Define a convention for programming headers on ESP8285, ESP8266, and ESP32 boards.
  2. Use that header in our own projects, so that it becomes common and interchangeable.
  3. Lobby ITEAD to use the same header in future Sonoff models.

And the stretch goal: Convince Espressif to document it as a recommended header format for new ESPxx projects.

If we’re super-lucky, maybe we can convince ITEAD to fix the incomplete Sonoff programming header by adding RESET and GPIO0, and make all our lives easier in future.

Places to discuss this


Design decisions

We need to decide on a physical format, and also whether to supply 3.3V or 5V to the target board from the programmer. The pins we need are:

  • GND
  • VCC
  • TX
  • RX
  • GPIO0

Physical format options include:

  • 1×6 0.1″ header
  • 2×3 0.1″ header
  • 1×6 2mm header
  • 2×3 2mm header
  • Something else? Ideas please!

Design considerations

The design considerations for the physical format include:

  • Similarity to existing designs including Sonoff, wESP32, ESProg, and ESP32 Programmer
  • Cheap and easy to use, with easy to source connectors
  • Small footprint on the target device
  • Perhaps leverage some existing standard such as P-MOD
  • Ability to mount permanently as a sub-board in the project if required

Considerations for the choice of 3.3V or 5V include:

  • Sonoff already requires 3.3V on the header
  • 5V can be useful in some cases
  • Switchable voltage would be possible, but could be dangerous and would lead to fragmentation of the convention
  • Connection of programmer directly to VCC on target, compared to input of onboard 3.3V VREG

Interesting options

ESP-01 header

This has the advantage that it’s well documented, and many people have made adapters for it.

wESP32-Prog header

Already implemented on the wEPS32. 5V supply means the input can be diode-isolated from other supply sources on the board. 4 of the pins match the Sonoff header, except that Sonoff requires 3.3V so it’s not a perfect match.

wESP32-Prog header, but with 3.3V

This is the closest we could have to matching the Sonoff header while extending it to add the GPIO0 and RESET lines.

ESP-Prog header

Documented by Espressif. Uses a 2×3 header, which is nice in terms of compact size. Unfortunately there’s no useful overlap with the ESP-01 header.

ESProg header

Doesn’t seem to match up with anything else in terms of pin order, but is perhaps the closest match electrically in a 1×6 format: all the necessary pins, with 3.3V supplied.

ESP32 Programmer by Mike Rankin

Nice 2×3 format header. If power was added this would be a nice format, but it doesn’t have anything to differentiate it from the ESP-Prog format from Espressif.

Other ESP32 Programmer by Mike Rankin

This one has a 1×5 header, which has all the pins we want except power.

6 thoughts on “Vlog #66: Let’s define a standard ESP8266/ESP32 programming header

  1. If we can get manufacturers to add gpio0 and reset, the rest is easy — just build adapters for “our” standard to whatever convoluted pinout they decide to use. A few more dongles in my kit won’t matter.

  2. In my experience it’s been easier to use a single row of pins to program. Also it means you can use through holes and save the cost of a header. Much easier to angle a single row of pins into holes than 2 rows of pins. It also allows for greater design flexibility as you don’t need as big a footprint nor clearance as you would with 2 rows…

  3. Boa tarde, estou com um problema, esta URL my node MCU ESP 8266 da error de download e não aparece na IDE do Arduino a placa nod mcu8266.

  4. BB-ESPADP is another board on the market BUT I think that the right programmer is ESP-Prog from Espressif and their pinout for UART and JTAG. We should also standardise I2C. WEMOS/LOLIN comes out in a JST SH connector with a good pinout. The JST SH connector should be the standard connector for all.

    1. I totally agree about standardising I2C as well! There are a few connectors already but the problem is they don’t bring out essential pins such as VIN and RESET. With all the I2C modules I’ve designed for the I2C Panel project I’ve been puzzling over that problem, and I’ve settled on a 2×3 header for I2C so I can bring out those other pins. I’ll do a video about that later.

      The BB-ESPADP is a strange one. I looked at it briefly but dismissed it as being a useful reference because the connectors are weird. The 10-way header on top doesn’t match anything from Espressif, but you can put an ESP-01 module on it by using only 8 of the 10 connections. The 1×6 header on the edge seems interesting but I can’t find any info about it. The maker seems to have gone out of their way to *not* document it, and just wants customers to buy their matching boards and programmers. If anyone has a pinout for it, I’ll add it to my spreadsheet.

  5. Homesense basic. I can’t find any reference to this product of yours. What is it and where do you sell it?

Leave a Reply

Your email address will not be published. Required fields are marked *