Question on Relays

Thread Starter

ke5nnt

Joined Mar 1, 2009
384
Can someone briefly explain the difference between a relay and a transistor when used for an on/off switch function controlled by a MCU? Higher current etc?

Thank you.
 
relays can switch very high current loads, both AC and DC.

transistors can switch medium current loads, DC only (triacs can switch AC)

transistors switch very fast, relays switch very slow.

relays wear out after x amount of cycles, transistors can last longer than the technology itself.

transistors waste more power than a relay
 

SgtWookie

Joined Jul 17, 2007
22,230
A standard bjt (bipolar junction transistor) can be extremely fast. Collector sink current is limited to about 10x the uC's I/O pin current source capacity. You must use a resistor to limit the uC's output current to the transistor's base to a safe level.

For a PIC uC, the pins can sink or source up to 20mA when operating at 5v - but not all of them at once. This means that a standard bjt controlled by an I/O pin could sink or source up to 200mA, provided it is rated for such current. (Note: if you want to sink/source 200mA, select a transistor rated for 400mA or more)

Darlington transistors can source/sink more current with less current input; they consist of two transistors, and their gain is multiplied.

Logic-level MOSFETs are all the rage nowadays. Some logic level MOSFETs can switch hundreds of Amperes on and off.

SSR's (solid state relays) are expensive, but are very capable, quiet, and work great for AC.

Regular electromechanical relays are large, noisy, and slow - and use a lot of current in their coils when actuated. However, they have a low contact resistance, and are pretty tolerant to abuse. You will have much longer life if you use a relay specified for 3x or more the current you expect it to see.
 
Imagine the size of today's computers if we had to use relays to do the switching?
Nuff said...

Cheers, DPW [ Spent years making heaters out of op-amps.]
 

hgmjr

Joined Jan 28, 2005
9,027
relays can switch very high current loads, both AC and DC.

transistors can switch medium current loads, DC only (triacs can switch AC)

transistors switch very fast, relays switch very slow.

relays wear out after x amount of cycles, transistors can last longer than the technology itself.

transistors waste more power than a relay
Another way to isolate the low voltage associated with the microcontroller and that portion of the circuit operating on higher voltages is by using an opto-isolator.

hgmjr
 

Thread Starter

ke5nnt

Joined Mar 1, 2009
384
So would there be any large problem with a relay or other device being switched on and off by a MCU powered with DC +5V to drive a device that runs on 120V AC?
 

BMorse

Joined Sep 26, 2009
2,675
So would there be any large problem with a relay or other device being switched on and off by a MCU powered with DC +5V to drive a device that runs on 120V AC?

For AC loads I would use an SSR (solid state relay) lasts longer than most mechanical relays. Just make sure you get one which can handle the load.
 

t06afre

Joined May 11, 2009
5,934
It should not be a problem using your MCU to control a relay. But you will need a transistor since your MCU not will be able to source enough current to drive the relay.
 
Top