which one? i heard someone said pnp, but dont understand why...
Posted on 2004-02-14 20:32:23 by dion
Well, theoretically yes old germanium PNP is better because they have a lower resistance when open
also they need a lower tension to open them 0.23 as opposed to 0.65v and they resist better to inverse voltage peaks generated by the relays coil.

Also because the pnp transistor will be placed on the +Vcc bar it is easyer to have ALL relays conected to a common GND bar; a thing that is a little harder to do with a single npn.

However, In practice an silicium NPN transistor with much better caracteristics than PNP is easyer to find and buy.
Adding an diode to prevent breakdown from coil inducted tensions will solve most ploblems and commanding it with enough tension and current should not be a problem for normal circuits.

The problem with connecting all relays in a circuit at the GND bar for safety still remains, but it is not abig issue unless you are commanding something way to powerfull :grin:

Besides on that occasions you should design an much better command circuit.. than a single transistor to drive the relay.
Posted on 2004-02-14 20:43:41 by BogdanOntanu
I think I have replied to a similar post in the past, but here is my answer again:

The preferred transistor is the NPN, since it can be controlled with respect to GND.
A PNP can be used, but the Vcc should be +5V, otherwise the transitor can turn on even when you do not want it to.
The reason is that the emitter is connected to, say 12V, but your microcontroller's output only goes to +5V (except if it has an open drain output). Thus, current will flow from the +12V supply through the E-B junction of the transistor, through the resistor you will use to drive its base, into the I/O pin of your micro to 5V. Thus, the current is (12V -5V)/Rdrive. That can be enough to turn on your transistor. And if you tweak the resistor to make sure the transistor is off at 12V, it can turn on if your +12V increases a little bit.

The bottom line: I prefer NPN's to drive relays. The allow more flexibility with fewer headaches.
Posted on 2004-02-16 11:32:32 by VVV
Once I would say NPN, as they were slightly better for the same cost, but today there is no advantage in either. Pick the configuration that suits your other needs best, or just re-use a transistor you also use elsewhere (re-using the same part in several places in a circuit can lead to cost savings thru quantity buying)

Otherwise flip a coin.

Have you concidered a FET? The circuit might be simpler, as you can drive the gate direct from an output pin with no base limit resistor.

Or why use a FET? You could use something like a Panasonic UNR5219 which has a build in base resistor (and in a sub-SOT-23 size package no less).

My real point here is neither NPN or PNP switching is inheritantly better, either may be suitable.

Hey, engineering is really an art ya know.



Aside #2: A relay when switched OFF will attempt to blow up the controlling transistor with it's inductive kick. Its basic physics, has to happen. A simple diode will catch the spike. Relay manufacturers know this, many will provide the diode inside the relay for you. Such relays are an excellent value-addition, usually they cost the same as non-diode versions.

Just connect then the correct way.
Posted on 2004-02-18 08:38:07 by Ernie
thanks for all suggestion :)
Posted on 2004-02-19 19:55:44 by dion
I agree w/ ernie- perhaps an N channel FET (lower "on" resistance than a P channel). Might work better to interface w/ microprocessor/controller because of less drive current, etc. Maybe for some extra FET protection, hang a zener diode off the drain.
Posted on 2004-03-20 09:41:52 by engieguy