Question on Relays

Discussion in 'General Electronics Chat' started by ke5nnt, Dec 13, 2009.

  1. ke5nnt

    Thread Starter Active Member

    Mar 1, 2009
    384
    15
    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.
     
  2. CaliusOptimus

    Well-Known Member

    Aug 14, 2005
    59
    0
    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
     
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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.
     
  4. Duane P Wetick

    Active Member

    Apr 23, 2009
    408
    19
    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.]
     
  5. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,866
    988
    And there are also these. Sarge told me about them in a previous post. Guess even a noob can contribute once in a while. :)
     
  6. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    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
     
  7. ke5nnt

    Thread Starter Active Member

    Mar 1, 2009
    384
    15
    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?
     
  8. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234

    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.
     
  9. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    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.
     
Loading...