ESP32 programming circuit

johnabel
Posts: 46
Joined: Sun Mar 26, 2017 5:06 pm

ESP32 programming circuit

Postby johnabel » Mon May 08, 2017 6:44 pm

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 14852 times
why Q1 and Q2 transistors' emitters are not just grounded? Is there a good reason to cross connect them to these pins?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: ESP32 programming circuit

Postby WiFive » Mon May 08, 2017 7:53 pm

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.

johnabel
Posts: 46
Joined: Sun Mar 26, 2017 5:06 pm

Re: ESP32 programming circuit

Postby johnabel » Tue May 09, 2017 6:29 pm

I would have used a pair of single gate open-collector inverters and still would be able to use those signals without loading them!

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: ESP32 programming circuit

Postby WiFive » Tue May 09, 2017 8:39 pm

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.

johnabel
Posts: 46
Joined: Sun Mar 26, 2017 5:06 pm

Re: ESP32 programming circuit

Postby johnabel » Sat May 13, 2017 7:43 am

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!

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: ESP32 programming circuit

Postby loboris » Sat May 13, 2017 8:46 am

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

johnabel
Posts: 46
Joined: Sun Mar 26, 2017 5:06 pm

Re: ESP32 programming circuit

Postby johnabel » Sat May 13, 2017 9:27 am

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.

OutoftheBOTS
Posts: 1
Joined: Wed Feb 21, 2018 10:31 pm

Re: ESP32 programming circuit

Postby OutoftheBOTS » Sat Mar 03, 2018 1:28 am

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 13333 times

Who is online

Users browsing this forum: No registered users and 50 guests