• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

12 v Transistor switch Relay load over/under

Thread starter #1
I had a problem getting a 12v relay to energise.
Suppy is 12v, transistor base supply = 5v (2n2222 etc) i.e. low power GPT
Initially I had the relay coil between the Emitter and Ground. but It would not energise.
When I checked the circuit I found that the input to the coil was about 5v,

When I changed the configuration so that the load is above the Transistor i.e
12v now goes to the coil
The other side of the coil goes to the Collector
The Emitter goes to earth
It works.

I get exactly the same using a 2n7000 MOSFET
So the load under the transistor doesn't work, but above does.
I've used both configurations with 5v devices before and no problems.

Does anyone know why the load has to be connected to the Collector when using 12v (and presumably any valid voltage over 5v).
 

Les Jones

Well-Known Member
#2
In the case on the NPN transistor The base needs to be more positive than the emitter by about 0.7 volts for current to flow between the emitter and collector. So if the voltage source which is feeding the base (Which should be via a current limiting resistor.) is 5 volts then the emitter con not be at more than about + 4.3 volts. So if you want to get the emitter up to +12 volts you would need the voltage source driving the base to be greater than 12.7 volts.
The same sort of thing applies with you 2N7000 N channel mosfet. but the gate must be more than about 2.5 volts more positive than the source. (The actual value of the "2.5" volts i quoted depends on the actual threashold voltage of that sample of the device and how low you want the RDs(on) resistance to go. See the data sheet on the 2N7000.

Les.
 
Thread starter #3
OK I that makes sense to me.
The 5v relay works connected to the emitter because it would be getting 4.3V which is less positive than the base.
You've also put me straight in my thought process about current flow.
I was thinking Positive to Earth which didn't make sense because I couldn't see how the base made it work.
I just had a quick look, holes not electrons. Now I understand how the base works.
Holes move up making room for an electron to move down.
Seems the arrow of the emitter in the transistor symbol is there for a reason! :)
Although it's a long time ago, it seems valve technology is still in my head.
 

ronsimpson

Well-Known Member
Most Helpful Member
#4
A picture = 1000 words.
1546779979476.png
Normally there should be a diode across a relay coil to protect the transistor.
The top two transistor are done correct.
The bottom two transistors do not work right. The voltage across the relay coil is small.
 

sagor1

Active Member
#5
RonSimpson has a beautiful diagram. I always think of the NPN or N-Mosfet as a "switch to ground". That helps me remember which way to connect these. These top two designs work well with NPN or N Channel interfaced to digital logic (5V max).
You could do the bottom two relay designs, but with PNP or P Channel devices. However, to trigger those types, you may need more than 5V on the Base/Gate, making it much more difficult to interface with digital logic devices (like PIC or Arduino). That is why PNP or P Channel are seldom used directly with digital interfaces (but one can get driver chips for those to make more complex interfaces).
Stick with the NPN or N Channel devices, they can do almost anything you want. The 2N7000 are very cheap to buy, I use those by the dozens for low level interfacing. For larger loads, I use things like IRL530N Mosfets, the "L" meaning full on resistance at "Logic levels".
 
Thread starter #6
A picture = 1000 words.
View attachment 116014
Normally there should be a diode across a relay coil to protect the transistor.
The top two transistor are done correct.
The bottom two transistors do not work right. The voltage across the relay coil is small.
Thanks for the photo.
I always put a diode across the coil.
I have used those circuits many times but usually with a max supply of 5V.
I normally use which ever position upper/lower is convenient, but now I will take due consideration.
I've never used a 12v relay before.
I just couldn't understand why one position worked and the other not, but the explanation by Les Jones fixed that.
Like most magic, it's obvious when you know how it's done!
Now I can say that the bottom 2 will work with a device that needs less than 4.3v like an LED.
 

Nigel Goodwin

Super Moderator
Most Helpful Member
#7
I normally use which ever position upper/lower is convenient, but now I will take due consideration.
It's really VERY much better to have the relay on the collector/drain, which is why anything decently designed does so.

There's some useful examples of such things in my PIC tutorials:

http://winpicprog.co.uk/pic_tutorial_extras.htm

Notice high side switching using other than the processor supply (5V) requires two transistors.
 
Thread starter #8
It's really VERY much better to have the relay on the collector/drain, which is why anything decently designed does so.

There's some useful examples of such things in my PIC tutorials:

http://winpicprog.co.uk/pic_tutorial_extras.htm

Notice high side switching using other than the processor supply (5V) requires two transistors.
Are you saying my designs are indecent?
I was about to try out the 2 x transistor method, but since it is in a DIY custom pcb with only 1 x tranistor, it was easier to rework the configuration
from Source to Sink (using the terminology in your examples).
I like the way you explain your examples too.
 

Latest threads

EE World Online Articles

Loading

 
Top