Page 1 of 1

ESP32 programming circuit

Posted: Mon May 08, 2017 6:44 pm
by johnabel
I plan to use the ESP32-WROOM module on my own board and use the same comms/interface as in the DevKitC schematics with the CP2102.
There is something I don't understand, see pic below:
esp32.png
esp32.png (11.78 KiB) Viewed 15697 times
why Q1 and Q2 transistors' emitters are not just grounded? Is there a good reason to cross connect them to these pins?

Re: ESP32 programming circuit

Posted: Mon May 08, 2017 7:53 pm
by WiFive
The point was to use clever circuit that can work as reset but also allow normal operation of RTS/DTR signals for serial port. If you don't want to ever use RTS/DTR you may do it a different way.

Re: ESP32 programming circuit

Posted: Tue May 09, 2017 6:29 pm
by johnabel
I would have used a pair of single gate open-collector inverters and still would be able to use those signals without loading them!

Re: ESP32 programming circuit

Posted: Tue May 09, 2017 8:39 pm
by WiFive
Actually I guess that was not quite the reason

https://oshlab.com/esp8266-arduino-rese ... m-circuit/

Reason is to allow software reset but avoid undesired reset caused by driver or terminal default behavior by implementing truth table.

Re: ESP32 programming circuit

Posted: Sat May 13, 2017 7:43 am
by johnabel
Oh, I see, thanks WiFive.
Anyways, if the thing to sort out is the low state at start it can be done with a few logic gates, can't it? The V-I characteristics of those pins aren't well known and may vary part to part, not to mention the transistors... My years in the industry told me "it works" doesn't mean at all reliability.

To have a '0' at IO0 when RTS = 1 and DTR = 0 and '1' otherwise, just an open collector NAND plus an inverter are needed. Four single gates or a package with four NANDs will do. I will try that!

Re: ESP32 programming circuit

Posted: Sat May 13, 2017 8:46 am
by loboris
@johnabel

If you want really smart and reliable reset circuit you could use one of TinyAVR microcontrollers in 6 or 8-pin package.
SOT-23 package is smaller than 2 transistors, the price < 1US$, power consumption < 0.1uA (in power down) and can be programmed not only for reset function, but also as external watchdog or any other function you can imagine.

Re: ESP32 programming circuit

Posted: Sat May 13, 2017 9:27 am
by johnabel
Appreciated. I just realized IO0 en EN pins are input, so maybe is not an issue... I worried about currents flowing from the ESP32 to the CP2109. Maybe not a bad idea after all.

Re: ESP32 programming circuit

Posted: Sat Mar 03, 2018 1:28 am
by OutoftheBOTS
I know that this circuit works but for the life of me I can't understand why it works.

I understand what needs to be achieved : IO0 pulled to GND then EN pulled to ground then EN released. Can anyone please explain how this circuit works?
esp32.png
esp32.png (11.78 KiB) Viewed 14178 times