Edge detector reset circuit

Thread Starter

tttapa

Joined Jan 31, 2016
22
When programming ATmega microcontrollers, I use an edge detector circuit to reset the chip when uploading new programs. This is the same circuit used in the Arduino Uno, for example. When a sketch is uploaded, the DTR line of the serial port is pulled low, so by using an edge detector (see schematic), you get a short low pulse to reset the chip.
edge_detection_schematic.png
Now I'm trying to use the same circuit for an ESP8266. However, for some reason, it only works with a 2.2µF capacitor, whereas the Arduino uses a 100nF cap. According to Espressif, the minimum reset pulse width of the ESP8266 is 100µs, so using a 10K pull-up resistor and a 100nF should work (= 1000µs, assuming any voltage under 63% of Vcc is considered 'low').
Why doesn't it work with a 100nF cap, and why do I need a 2.2µF cap (= 22ms)?

I created the schematic in an online circuit simulator, it's at this URL. I understand how the edge detection works, but not why the voltage on the output drops on a rising edge. It should rise ~700mV and then be clamped down by the diode, but why does it go lower than 3.3V?
reset_edge_detector.png

Thanks a lot!
Pieter
 
Last edited:

Thread Starter

tttapa

Joined Jan 31, 2016
22
That may be, but your simulation uses 5V.
The offset voltage of my square wave was indeed wrong at first, but now it's updated, and it still shows the same behavior.
When I delete the diode, it goes up to 6.6V on a rising edge - as expected - and then goes to 3.3V again, until there's a falling edge, and it goes to 0V.
But when I add the diode, it does weird things again.
 

kubeek

Joined Sep 20, 2005
5,795
I think you should try a different simulator than falstad. For example LTspice is free and widely used on this forum and many others.
 

Thread Starter

tttapa

Joined Jan 31, 2016
22
I'm currently on Linux, so I can't try it right now, but I'm glad I'm not the only one who finds it strange ;) .

Any idea why I'd need such a large capacitor?
 

kubeek

Joined Sep 20, 2005
5,795
Is that serial port an RS232 or a TTL one? If it has large source impedance than it could affect what cap you require.
 

Thread Starter

tttapa

Joined Jan 31, 2016
22
Is that serial port an RS232 or a TTL one? If it has large source impedance than it could affect what cap you require.
It's TTL: FTDI FT232RL. I've used it with an ATmega328P with a 100nF cap before (at 5V, it has a jumper to set the output driver supply voltage).
I don't think it has a high impedance, it can easily drive an LED without dropping voltage.

Here's what LTspice says, using 100nF :
View attachment 120136
Thanks, that looks a lot better.

I think I'll just use a 2.2µF cap in my design. Let's hope it doesn't explode ;) .

Thank you both for your kind help!
Pieter
 
Top