View Single Post
  #2   Report Post  
Old February 6th 04, 05:17 PM
Tim Wescott
 
Posts: n/a
Default

A more normal setup would be an NPN transistor with the emitter grounded and
your 5K resistor switched from the optoisolator. NPN's are generally just a
bit better than a similar PNP, and you'll have a wider range of choices. A
2N3904 would work, but a 2N4401 would be a better choice.

The minimum current gain for these things is around 40, and you should
design for lower yet, so you should put about 5-10mA into the base of the
transistor to get it turned on good and hard. With a 12V supply rail this
implies no more than a 2.2k-ohm resistor. If your optoisolator can't supply
that then use an NPN Darlington instead of a single NPN.

If you do use a PNP lose the base resistor. The minimum guaranteed current
gain of a 2N3906 is 60, so with 150mA collector current you'd need 2.5mA
into the base - that's a 12.5V drop across your resistor, which means the
circuit just wouldn't work. Even without the resistor you'll still drop
some voltage in the opto, then some more in the emitter-base junction of the
drive transistor. By the time you're done you'll be lucky to have 10V to
the relay.

Have fun.

--------------------------------------
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com


"James W" wrote in message
...

I need to use a 12v relay to control power to a project that is a
12V/20A load.

My plan, is to use an automotive 12v 30A relay. The relay's coils have
~80ohms of resistance. The relay has a builtin diode to handle the
inductive kickback when de-energizing the coil.


I plan is to feed the emitter of a 3906 from 12v, connecting the
collector to the coil, and grounding the other end of the coil.

The base of the 3906 will connect to the collector on a 4N26
optoisolator through a ~5K resistor. The emitter of the 4N26 will be
grounded.

I'll be using an AVR microprocessor to drive the LED in the 4N26.

Does this all seem reasonable? I'm new at designing things like this,
and though it is a simple circuit, I want it to be reliable and safe, so
I'll take any criticism and or suggestions you have ( about the circuit

;-)

- jim