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

preview_player
Показать описание

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, wEPS32 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.

And if we're super-lucky, maybe we can convince ITEAD to fix the incomplete Sonoff programming header and make all our lives easier in future.

Go to the link above to discuss it on the SuperHouse forum or Discord server.

Рекомендации по теме
Комментарии
Автор

Why not both: Allow the 2.54mm 6 pin sonoff+2 type header, and the tiny 2x3 pin header. On the programmer, put one on each side of the PCB. This way, it is easier for itead, other companies and your personal projects where you don't care about size, but you'll still be able to use the very small connector when there is just no room

positivemelon
Автор

Just add the two extra pins. This way it will keep the old standard and be backwards compatible with the the older sonoff gear.

karinyafields
Автор

The 1x6 header would be easier to use by pressing at an angle against the pads on the PCB. It would probably be darn near impossible to reliably hand press a 2x3 header long enough to program the board. (assuming that there aren't actually sockets to plug in to).

aspork
Автор

I think asking for design changes is like like a kid asking the bus driver to pull over for an ice cream.

What I’d like to see is a printable mount, one for each board type, to which attaches a clampdown unit. On this clampdown unit would be the necessary electronics to flash. Pre located thanks to the exact guidance of the mount, the clampdown unit would have spring mounted pins that are correctly spaced to mate with the holes. Thus no soldering to get good electrical contact. Spring mounted pin will not do damage should there be misalignment. Add or remove pins like detachable teeth and you future proof it for when board designs change. Wiring back to the electronics would be swappable to pick voltage, TX RX etc.

Procedures are
Take units out of housing
Select base locator for that model and attach to clampdown unit
Connect punch down pins to electronics via appropriate wiring
Insert SD card
Insert board to be flashed
Engage punchdown
Lock
Turn on
Start button to begin flash process
Unit indicates complete and turns off
Unlock and remove, repeat for next board “factory style”

Just seems more future proof if it could be done?

BC-oprj
Автор

Sonoff + two extra pins. 2.54" pitch. That is good enough.

irukard
Автор

Having a short cable from the programming adapter to the target probably makes it simpler to connect. How about trying to standardize the order, and then provide the 2mm vs. 0.1" pitch connectors on the programming device to make it easier to have inexpensive ribbon cables that are 'straight-through' for both formats.


The other aspect, independent of the physical connectivity is to define the programmer interface. While it can emulate a serial port and support using the usual serial programming tool, wouldn't it be interesting if it looked like an OTA target as well? Something to proxy that first programming step before the target is capable of OTA upgrades.


Part of the recommendation to expressif might be the pad layout with slightly offset alternate holes, so you could insert pins and have them stay in place, rather than needing to populate a header that's only going to be used once.

lmamakos
Автор

ITead's Sonoff products all have different headers as it is anyway. The pins locations are defined as much by the position on the board as they are by any "standard."

I think it would make a lot more sense to come up with a standard endorsed by EspressIf than focus ITead. Especially given ITead aren't the only company making products based on the ESP chips any longer. Sonoff are great. I have a lot of them. But I think the focus shouldn't be just that range of products.

stevec.
Автор

I was just thinking about this couple hours ago, when submitting my project to jlcpcb and boom, YouTube shows me your video. +)

VitaliyGura
Автор

Great effort, My view is to add the extra pins you already have the working design and I believe in the KISS approach. I would think the best option is to use the de-facto standard from the majority which is the 4 pins, and add the two pins to make programming easier. This still allows the flexibility to use a daughter board for any of the existing variations that scatter the pins around. Even ITEAD have some that are scattered but you already have a daughter board to fix that.

billjessep
Автор

Really like the idea. One of the other advantages of having usb chipset elements on a seperate board along with the bootloader is evident for projects that look to minimising power requirements. If you have the CPU capable of running at extremely low consumption levels, having to power unnecessary usb interfaces negates the benefits, or you need more complex schematic to switch this extraneous circuitry off when not in use.
I don't have a preference for single in-line or 2x6 interface. If it becomes a standard doing forward it doesn't really matter, but having a 5v to 3.3v regulator on board would be a real boon.

captiveimage
Автор

I would vote for both a 1x6 2.54mm pitch and a 2x3 2mm pitch as options. More annoying for the hobbyist who ends up having both adapters lying around; but more flexible for PCB layout, as there are form factors that don't suit 1x6 (2.54mm wide and 15.24mm long) and other form factors don't suit 2x3 (about 4mm x 6mm). 3.3v and a standard order of signals too.
Given the manufacturers at volume are pre-programming their chips and don't strictly need these pins at all, it's somewhat nice that they are offered at all.

SittingDuc
Автор

I think we should keep the ITEAD standard and just pitch to add the extra two pins. Certainly a lot easier and it is a format a lot who use ITEAD products are already use to using.
It is more than just lobbying ITEAD though. There is Shelly and a host of other brands that use ESP chips in there various variants. I think it would need to start by lobbying at Espressif as the chip designer to add it as a "recommended practice" to the datasheet.

EsotericArctos
Автор

Here is what I would say, come to a consensus on 2 or 3 options for the pinout design. This way manufacturers have options based on the space available for the esp products. Then the ESProg have it be 3 sided plus USB input and each side is the diff pinout so it can be used with either of the 2-3 "standards"

techdaddykb
Автор

2 extra pins would be perfect and I believe easy to implement for everyone.

Simonbove
Автор

Good idea. I did they same through my designs with ESP32 only with a muuuch smaller header to save space.

mathieudezutter
Автор

Simple for the pinout, but not voltage.
Support 1x6 in order you specified for both 2.54 mm and 1 mm spacing.
For 2x3, use same pin order and support in format 2.54 mm and 1 mm. Then programmer can accept straight and 2x3, and then make programmer autodetect if it needs to supply voltage.
Edit: I really like the 3x2 on the edge, but access in system might be limited.

TheStuartstardust
Автор

shelly has a header that exposes gpio0 - unfortunatly they have been changing the header to add various extra pins based upon developer feedback (I guess!) but the pins are on a standard 2.54 pinout and easy to access (and build a connector for programming).
Whilst not all shelly products can run Tasmota, a number of them can.


i dont think a standard header will be easy across multiple brands, and even EspressIf would struggle to make this happen. BUT you could lobby to get a single vendor to be consistent across their own products. It is a selling point which is why I would consider shelly for certain options over Itead.

RichardHamblen
Автор

Does the format realistically make any difference, it really is a matter of six of one and half a dozen of the other. As you say both formats have their good and bad points. So why not actually try to mandate both, let the project makers choose. You then promote the inclusion of the six pins and their layout. That way if someone really wants to use a JST or a 2x5 you still get straight through pin compatibility.
Yes it makes a difference to the programmer but you could simply put a 6x1 on one end and a 3x2 on the other just increasing the BOM cost slightly. And you can also pragmatically deal with the voltage in the same way put a 3v3 regulator on the programmer board and a switch/jumper pins to choose which you use, you can also allow for the third option of no supplied power if the target has its own power. Again an increase in BOM but this is a 'one-off' cost and not an increase into the project costs which get multiplied.

zaragonrl
Автор

Being a software engineer I would prefer to see a 'box' that contains everything necessary to control a sonoff using its diy mode. I believe it should have a WiFi access point preconfigured with the sonoff diy ssid/password, an http server and a piece of software that would give the user the interface to discover all sonoff devices and control them by calling all supported DIY API restful commands including flash. This could perhaps be packaged in a USB dongle and it would replace eWeLink while being completely local.

Since Sonoff went the way of the diy mode it may make more sense to try to lobby them into making such a device instead of redesigning their PCBs and changing their whole manufacturing process.

ky
Автор

I like this idea. Have you considered contacting each of the company's and see if they are interested in building a industry standard? This project could support project well into the future after the esp32 is out of date.

mastermoarman
join shbcf.ru