FT232 dtr pin dropping low during powerup causing reset issues on atmega328 - Page 1
Forum section: electronics / projects

author: mribble
author_rank: Regular Contributor
timestamp: November 06, 2011, 05:22:26 pm
content: I have a circuit similar to how Arduino boards have the FT232 chip resets the atmega328 microcontroller. The 328's reset pin is connected to 5V via a 10K resistor, and the 328's reset pin is connect to a 0.1 uF that goes to the ft232's dtr pin. The theory is that this allows the ft232 to pull the reset pin low for a short pulse to reset the 328 to allow easy reprogramming.This seems to work for Arduino boards, and it works most of the time for my boards. After assembling 8 boards I'm seeing about 25% of them show the following problem (meaning 75% of my boards work fine and don't show this problem). The problem is that while the system is booting the dtr pin on the ft232 is goes low which forces the 328 to see a reset signal. The odd thing is the fuses on the 328 are set to have a 65 ms startup delay and a 2.7V brownout so in theory the chip shouldn't be running so why would a reset matter? The observed fact seems to be that it does matter and it is confusing the 328 so that it never starts.Another observation is if I turn off the power and then turn it back on in less than 3 seconds it will always boot successfully on the boards showing the problem. Maybe this has something to do with the caps being charged in this case?Below is a schematic and a scope's graph of voltage for the 5V pin and the reset pin. You can see the 328's reset pin drops to 0V for a short period. If I pick a board that boots correctly or turn a bad board on/off quickly to make it work the graph looks the same except there is no drop on the reset pin. I also looked at the 232's DTR pin and it's graph looks the same (meaning it is not dropping low for a long period and having the cap create a pulse out of it).Does anyone have ideas what might cause this or how to fix it?Schematic:http://www.glacialwanderer.com/_blog/blog2011/10_Oct/ca_schematic.pngScope of 5V and Reset pin:http://www.glacialwanderer.com/_blog/blog2011/10_Oct/IMG_2558.jpgNote that this is a continuation of the following thread. I wanted to start again with a concision summary of what's happening to see if we can get any new ideas. I'd really like to thank Richard for his help in the other thread.https://www.eevblog.com/forum/index.php?topic=5024.0

author: jahonen
author_rank: Super Contributor
timestamp: November 06, 2011, 07:40:32 pm
content: Put a proper reset circuit with a manual reset input (which is driven by the FT232) to drive the MCU reset pin, maybe that will work?Regards,Janne

author: mribble
author_rank: Regular Contributor
timestamp: November 07, 2011, 10:07:58 am
content: Thanks for the reply Janne. Could you describe a little better what you mean by a "proper reset circuit"? A manual reset button would work fix the problem, but I don't think people what to have to press a reset button after trying to turn on the system. That seems no better than having to turn it off/on again. Maybe I misunderstood you...

author: jahonen
author_rank: Super Contributor
timestamp: November 07, 2011, 10:46:00 am
content: I mean a voltage supervisor/reset generator, likeTL7705A. There are much more of similar chips with slightly different features, browse around if that is not suitable.Regards,Janne

author: mribble
author_rank: Regular Contributor
timestamp: November 07, 2011, 11:43:34 pm
content: Thanks Janne, I will try this out.If anyone knows the root cause or a simpler way to fix this let me know know. Thanks!

author: mribble
author_rank: Regular Contributor
timestamp: November 11, 2011, 02:43:23 am
content: Ok, I got a part (http://www.mouser.com/ProductDetail/ON-Semiconductor/CAT803SSDI-T3/?qs=Cu5CrUeLSf3YWd55GsvuMg%3d%3d), and it works as expected by holding gnd low, but that doesn't fix my problemThen I started experimenting and I'm quite confused now. If I remove the capacitor between DTR on FT232 and the Atmel328 then everything works fine. This indicates the problem is a reset issue coming from the ft232 as the graph I linked earlier showed. However, if I hold the ground pin low (either with the chip mentioned or manually with a wire to ground) that doesn't fix it. Also once in this state the reset pin does not appear to reset the 328. If I do a quick power cycle so it boots correctly then the reset pin works as expected.Does this make sense to anyone? I'm not sure what to try next.

author: mribble
author_rank: Regular Contributor
timestamp: November 11, 2011, 03:19:59 am
content: I just found a workaround, but I don't understand it. If I switch my bootloader from Arduino Uno to Arduino Duemilanove W/ ATmega328 the problem goes away. I know the Duemilanove was used with the ft232 chip like I use and the Uno uses some other atmel chip. If anyone knows why the uno bootloader caused a problem let me know.

author: westfw
author_rank: Super Contributor
timestamp: November 11, 2011, 04:34:41 am
content: You might want to check out this thread on the Arduino forums. The observation/theory is that the slightly different reset circuitry on newer Arduino boards can cause a positive glitch above 5v on the RESET pin, possibly causing the AVR to enter HV parallel programming state (or something.) You can try their workaround (an added protection diode to 5V on RESET.)http://arduino.cc/forum/index.php/topic,64256.0.htmlThe Arduino auto-reset circuit is a pretty awful hack, all things considered (though it's wonderfully convenient when you're loading "sketches" over and over again.) If you can leave it out or use an alternative, you should. (modify the bootloader for a longer timeout and use manual reset, use a jumper that leaves DTR disconnected, make the rs232/usb bridge smarter, etc...

author: mribble
author_rank: Regular Contributor
timestamp: November 11, 2011, 01:10:09 pm
content: Thanks for the idea westfw, but this is not my issue. You can see on my graph that the voltage isn't going over 5.5V on the reset pin.BTW, I help debug the issue you pointed to long before that thread started, and I found out later that I wasn't the first to debug it. That issue has probably been resolved dozens or maybe even hundreds of separate times. The diode is probably the simplest and best solution. Atmel's datasheets even suggest a diode to prevent this issue.