npn or relay

Thread Starter

duxbuz

Joined Feb 23, 2014
133
Hi

I wonder what is needed to protect a 5v circuit whilst powering a motor.

I initially thought that if something such as a motor was used, that needed some extra voltage from batteries, then a relay would be required.

Since then I have seen a lot of circuits that just use transistors.

In some examples transistors are used as relay switches with batteries and in other circuits transistors are used without batteries because of their amplification capabilities. (I don't know if this is correct I think I read this, but I may have read it wrong or misunderstood)

I am wondering how big a voltage a transistor can be used to switch in stead of a relay whilst protecting the 5v circuit that switches it.

Also how much power can it provide as an amplifier(if this is true). Could it power a small motor?

Thanks
 
Last edited:

Alec_t

Joined Sep 17, 2013
14,328
I am wondering how big a voltage a transistor can be used to switch in stead of a relay
Check the datasheet for a given transistor to see its maximum Vce rating. Some go to hundreds of Volts.
Also how much power can it provide as an amplifier(if this is true)
A transistor doesn't provide power, it only controls the power (from batteries etc) used by a load such as a motor. In fact, the transistor actually wastes some power and gets warm/hot in the process.
 

Thread Starter

duxbuz

Joined Feb 23, 2014
133
Thanks

Hundreds of volts.

Why would a relay be used if higher voltages can be handled by transistors?
 

Alec_t

Joined Sep 17, 2013
14,328
Why would a relay be used if higher voltages can be handled by transistors?
A relay can provide ciruit isolation and may have multiple sets of contacts, for greater versatility. Any relay must have a reverse-biased diode across its coil to protect the device/circuit which switches the coil voltage from the back-emf generated when the coil is switched off..
 

Thread Starter

duxbuz

Joined Feb 23, 2014
133
That's where I am confused. It seems that circuit isolation can be performed by transistors.

I presume it depends on the voltage?

I want to use 9v and switch it with 3.3v but I don't want to damage the gpio.
 

KMoffett

Joined Dec 19, 2007
2,918
That's where I am confused. It seems that circuit isolation can be performed by transistors.

I presume it depends on the voltage?

I want to use 9v and switch it with 3.3v but I don't want to damage the gpio.
If you experience a collector-base breakdown in the transistor, for whatever reason, you could be applying 9v to you GPIO terminal. There is no galvanic path from the relay terminals back to the GPIO terminal.

Ken
 

Thread Starter

duxbuz

Joined Feb 23, 2014
133
Ok so relays are the only real solution here.

Transistors offer no isolation and should be avoided at 9v?

Thanks
 

Alec_t

Joined Sep 17, 2013
14,328
The above-mentioned opto-isolator (aka coupler) would be my choice for optimum protection of the micro port. Cheaper than an SSR. The opto output would then drive a transistor (BJT or MOSFET) to switch the motor power.
 

KMoffett

Joined Dec 19, 2007
2,918
You never mentioned what your 9V(?) motor current is. Depending on the gain of the transistor, you can provide some protection to your controller's output with a transistor. Add a Schottky diode from the output pin to the +3.3V supply (cathode to +3.3V). The transistor's base resistor then becomes a voltage dropping and current limiting device, should 9V ever appear at the transistor's base.

Ken
 

MaxHeadRoom

Joined Jul 18, 2013
28,696
I am wondering how big a voltage a transistor can be used to switch in stead of a relay whilst protecting the 5v circuit that switches it.

Thanks
A relay will only offer ON/OFF control, Transistor/Mosfet can offer RPM control.
What do you need?
Max.
 

eetech00

Joined Jun 8, 2013
3,956
That's where I am confused. It seems that circuit isolation can be performed by transistors.

I presume it depends on the voltage?

I want to use 9v and switch it with 3.3v but I don't want to damage the gpio.
Just in case your not clear, a relay provides isolation between the control circuit and the "load". The isolation is, basically, an air gap between the control circuit (the relay coil) and the load (the circuit connected thru the relay contacts).

A transistor doesn't, by itself, provide isolation. There is a silicon conductor between the control circuit (the transistor base) and the load (transistor collector-emitter junction).
 
Top