Driving a relay or other device
KenM
Posts: 657
FYI,
The schematic posted below has been shown several times in this forum.
The circuit will work well but has a serious drawback if you want to use more than two with your stamp project.
The reason is as follows:
With a 220 ohm base resistor as shown, the stamp pin will need to source approximately 19.5 mA (5v - 0.7v / 220 ohms =· 19.5 mA).
19.5 mA is very close to the maximum any one pin should source·(Page 11 of Basic Stamp Manual v 2.0).
On top of that, any group of 8 I/O pins (P0-P7, P8-P15) should not exceed 40 mA.
So attempting to drive more that two in this fashion·will exceed specifications.
Just FYI
Post Edited (KenM) : 4/23/2005 11:12:29 PM GMT
The schematic posted below has been shown several times in this forum.
The circuit will work well but has a serious drawback if you want to use more than two with your stamp project.
The reason is as follows:
With a 220 ohm base resistor as shown, the stamp pin will need to source approximately 19.5 mA (5v - 0.7v / 220 ohms =· 19.5 mA).
19.5 mA is very close to the maximum any one pin should source·(Page 11 of Basic Stamp Manual v 2.0).
On top of that, any group of 8 I/O pins (P0-P7, P8-P15) should not exceed 40 mA.
So attempting to drive more that two in this fashion·will exceed specifications.
Just FYI
Post Edited (KenM) : 4/23/2005 11:12:29 PM GMT
Comments
·· If you have read all the forums, you'll notice that I myself use 1K resistors in my transistor driver circuits.· I have a slightly different reason for doing so, and have not yet confirmed your math, but I will agree that the value is smaller than I would recommend.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Yeah......I completely agree with your 1k value for a base resistor.
A 1k base resistor will still have plenty of drive for the max collector current of 2n3904. This is assuming a max collector current of 200 mA and a worst case beta of 100 at room temp.
Vbase resistor / (IC/beta) = rbase
A max collector current yields.......4.3 / (200mA/100) = 2.15k ohms. With your value you could drive an entire bank of 8 without coming close to the 40mA max for OUTL or OUTH.
But of course if you are driving that many you would probably go to a ULN280? since the component count and wiring would be easier.
So how do you like CA so far?
k