Reset transistor redundant
Peter Jakacki
Posts: 10,193
All the schematics from Parallax have always shown a typical capacitor coupled NPN driven from the DTR signal for the reset circuit. Recently I did up a new pcb but forgot to put any reset circuitry on there for the FT232 chip. Although I was still able to reprgrogram it via my standard PropPlug style connector I wanted to be able to do so via the USB. So I looked at my pcb and saw I could do a quick easy mod if I simply ran a cap from the DTR to the reset line so I hooked up a 10nf. Suffice to say it works perfectly as does a 1nf cap too. With the 1nf cap I effectively get a 4us low pulse (below 1.5V) with no negative or positive overshoots. Of course without the NPN the Prop resets off the negative edge rather than the positive edge but since the DTR is sent as a short pulse and the Prop must wait at least 50ms before it does anything then it doesn't matter which edge is used.
Thinking about it the NPN was probably really necessary with RS232 circuits as the DTR signal could easily swing between +/-12V and an NPN was an easy way to interface this but with USB chips the output is a simple 3.3V logic level, so why bother with the NPN then? I know someone will come up with the old argument that they are cheap so put them in anyway but really there is no need at all.
Thinking about it the NPN was probably really necessary with RS232 circuits as the DTR signal could easily swing between +/-12V and an NPN was an easy way to interface this but with USB chips the output is a simple 3.3V logic level, so why bother with the NPN then? I know someone will come up with the old argument that they are cheap so put them in anyway but really there is no need at all.
Comments
The modern solution would be a Digital Transistor, as that cuts part counts and gives a good threshold+ ability to ignore narrow impulse noise, and it allows very short connections to the reset node.
Much of the same circuitry was borrowed for the Propeller because by then, the transistor and capacitor addition was a proven design that could withstand several unpredictable circumstances.
BTW) if someone has an archive of the back-n-forth email discussions between Jeff and I, I would greatly appreciate the re-read 16 years later :-)
1997 post from the Basic Stamps email List ...
...perhaps the first DEBUG terminal with QBASIC code at the bottom
For sure you need to connect the BOEn pin to Ground which disables the BrownOut detector and enables a 5k pullup at the reset pin inside the Prop.
For propper function with a Terminal you need to invert the DTR output of the FT232 (with the FTProg tool), otherwise the reset happens if you open the Terminal (COM port) and not when you close it. This is not necessary if you only want to download code, and don't need Terminal communication.
Andy
-Phil
Love to help you with the old emails but I've checked my pockets and there's only jelly babies in there. Jelly baby?
You said "from any unknown RS232 voltage levels" which is my point as we are using this transistor on 3.3V USB circuits and it indicates it is redundant. As for the state of the DTR line I have not had any problems in Windows or Linux with this and shouldn't the DTR line be set to inactive before it is pulsed anyway? That is good programming practice.
So what I am saying is use the transistor in a RS232 circuit but don't bother in a USB circuit, it can't help or hurt.
It depends on how close the USB is to the Prop,
I'd still prefer a RET (digital transistor) and short reset leads, and a cap in the base to longer traces/USB/any RST source.
http://www.nxp.com/products/bipolar_transistors/resistor_equipped_transistors_rets/
Choosing the largest Rb RET will give the best impulse noise rejection, and a equal value RET gives appx TTL thresholds.
Is this one a good choice then?, npn 47k/47k
http://www.nxp.com/products/bipolar_transistors/resistor_equipped_transistors_rets/ret_100_ma_50_v/ret_100_ma_50_v_single_npn/PDTC144EMB.html
Yes, - it can sink ~ 4mA @ -40'C, and ~10mA @ 25'C, which is plenty for RST work.
The package of that exact part code is a bit of a challenge, and I've somewhat standardised on Dual RET as the price is not much more.
That part sure is small, too small, but nice. I normally use SOT-23 style packs and in fact I already use a DDTD digital transistor for my reset circuit in other boards. The point here though is that especially in designs with built-in USB that the transistor is really redundant and a simple 1nf cap is all that is necessary. I agree with jmg that using the right resistor ratio would improve the noise threshold for those designs that have external USB.
If you are happy to ignore the reset caused by swapping windows programs, then the transistor is not required if you are not using high voltages (which will probably be ok using a cap anyway due to the internal protection diodes in the prop.
Look Ray, you know me and I don't really care if I add a transistor or not and a PC is only ever normally connected during development reprogramming anyway so it's no skin off my nose if Windows being Windows does weird things, I think everyone expects that with MS
The thing is to be aware of the fact that you can have a simpler circuit that just works. There always seems to be a bit of hocus pocus carry-on about electronics especially when it is not properly understood, understood?
Yup. The cap inline (like on Arduino clones) creates a positive and negative spikes on rising and falling edges, respectively. The (NPN) transistor with resistor from base to ground is turned on by only positive going edges.
I should add that commonly, AVR circuits connected to FTDI use an inline cap, only. Are there issues with the Prop RESET seeing negative spikes? Sounds like no.
I've built my Prop boards with and without the transistor. I recall only ever having major DTR weirdness on Linux.