please dont rip this site

Relay IO

Also:

Hey, don't power it from the regulated supply that is running your processor... use the unregulated DC and connect the controller to the relay via a semiconductor like a transistor, mosfet, etc...

Smallest

            +24
             |
         relay coil
             |
           drain
  +5  ---- gate      N Channel Hexfet
 control   source
             |
            gnd

  • Very low parts count
  • Good for high voltage relay coils
  • Good for high current relay coils
  • High impedance input

Select an enhancement-mode N-channel MOSFET or HEXFET which completely turns on at 5 volts (such devices are often referred to as "logic level" FETs). Choose current and voltage ratings larger than your relay coil requires. An inexpensive device capable of driving 1A at 100V is the IRLD110.

Add a reverse biased diode across the relay coil to protect the driver. Any diode with a current rating higher than the current of the coil and a voltage rating higher than the voltage of the coil may be used. 1N4001 is a low-cost diode suitable for most applications.

See also:

Best for high voltage system where isolation is necessary

Terry Allen Steen, EE of Marina Power says:

The easiest way I have found is to drive the LED half of an optoisolator. Connect the output side to the relay and its source. I use the H11G2 (just because I have them around).
          +-------+
PIC OUT---|       |----RELAY---- High voltage
          |       |
          | H11G2 |
       +--|       |--+
       |  |       |  |
      \|/ +-------+ \|/
      GND           GND

Paul B. Webster says:

And you *did* mean to put a resistor in series with the opto input, did you not? And the diode across the relay?

Lowest Cost where higher voltage, unregulated power matching relay coil requirement is available.

Ken Webster says:

Low cost option:

To turn relay on: raise output to logic "1", Vdd
To turn relay off: drop output to logic "0", GND

The diode shunts voltage overshoot from the coil's inductance when the transistor is switched off and prevents damage to the transistor.

You can substitute similar transistors for 2N3904 if available or cheaper: 2N2222 is a close substitute

Jinx says:

[Here is a] really super-cheap 5V relay driver. It uses an emitter follower so it actually delivers only 4.4V or so to the relay but this has always worked fine for the 5V relays I have used. It does not require a protection diode because the emitter follower won't allow any undershoot.

Use a 2N3904 transistor for up to 100mA. A 2N2222 may be used for up to 200mA. A ZTX689B is good for up to 500mA.

This circuit will NOT work with the open collector outputs on a PC Parallel Port, but will work nicely with a PIC or other fully driven output capable of sourcing a few milliamps.
 

Lowest cost for 5V only supply with higher voltage relay coil

Jinx says:

...you might like this little "junk box" circuit that's helped me out a couple of times when I've had only a 5V supply and only a 12V relay.

Relays will hold at a substantially lower voltage than it takes to energise them. The circuit shown uses a cap to initially supply the relay with twice the 5V. When the transistor turns on, -5V appears at the bottom of the coil, which thus sees 10V across it. This is enough to energise the relay and once the cap has discharged, the "5V in" will hold it. Relays have such a wide operating voltage for the coil that a 12V should work in this circuit (the ones I had were quite sensitive), as its actuating range could be 8.5V to 15V. Apart from needing only a 5V supply the other advantage is that the holding current is much lower than the nominal actuating current at 12V that most of us would power a 12V relay with.

Once you've determined what the hold current is, it's more than likely that the "5V in" could be just one or two PIC o/p pins. That was the case for the 68HC705K1's I tried this on. Note that "5V" is the supply. Some components may need to be altered to suit, but this seems to be a pretty average circuit. The "off" current is mainly leakage, a few uA.

Perhaps the only situation this circuit couldn't be used in is one that has a LOT of vibration or shock, as the hold magnetism is weaker than when the relay is actuated by its nominal voltage.

Paul B. Webster says:

I think the cap definitely should be the other way round, and the 100 ohm resistor should be a diode.

Relay Contact Noise and Failure

Buy the book cover "Noise Reduction Techniques in Electronic Systems" by Henry Ott.

There is a section on relay contact protection, which details the exact failure modes, the different circuit protection topologies, and even design equations to determine the right component values, like R and C in a snubber. It is a treasure on this subject! Thomas McGahee wrote:

Why not use a dual approach?: Have the MT1 and MT2 of your triac connected ALSO to the contacts of a Normally Open relay.

When you want to turn on your 2.5kW load, FIRST turn on the triac and wait about one cycle time. THEN turn on the relay. Keep both activated until you want to turn the load off, then FIRST turn off the relay, **wait long enough for the relay contacts to fully open**, and then turn off the triac. Easy to do with a PIC.

The triac can easily take the initial turn on load. Then when the relay kicks in the voltage across the relay contacts AS THEY CLOSE will be only a volt or two, since the triac is on. But then the relay will conduct the load for the several minutes the load is on. When turning off, the triac will ensure that there is no arcing of the relay contacts. Then the triac turns off.

I have been using this method for cutting down on the wear and tear of a heavy duty relay I use to control an electric room heater. The triac needs only a fairly moderate heatsink, as the relay ends up handling the ON current for all but the turn-on and turn-off transition times.

My unit (which is not PIC controlled, but rather controlled by some logic gates and timer circuits) has been running since 1975 without a problem. Oh, yes, I use a snubber network to ensure the triac does not get re-triggered at turn-off.

That's brilliant! Nil contact arcing for the cost of a cheap triac that is hardly ever on...

See also:

Questions:

Archive:


file: /techref/io/relays.htm, 10KB, , updated: 2007/7/6 18:25, local time: 2008/10/13 23:40,
TOP NEW HELP FIND: 
38.103.63.59:LOG IN
©2008 PLEASE DON'T RIP! DO: LINK / DIGG! / MAKE!

 ©2008 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it!
<A HREF="http://massmind.org/techref/io/relays.htm"> Relays</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be reviewed) Just type in the box and press the Post button. (HTML welcomed!): A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Did you find what you needed?

 

Welcome to massmind.org!

  'What can I do?' - SiCKO

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .