relay

Discussion in 'General Electronics Chat' started by RoboToy, Jul 28, 2010.

  1. RoboToy

    Thread Starter New Member

    Jul 28, 2010
    4
    0
    I use HFD27/005-S relay dpdt device that work with 5 volt and minimum 40 mili amper
    I want to turn on this relay with PIC18F the leg of the relay need to receive 5 volt for "1" logy
    The problem is that the PIC can out maximum 25 mili amper and this is give that "1" logy is 3 volt and not 5 volt
    I search after solution for this problem
     
  2. tom66

    Senior Member

    May 9, 2009
    2,613
    214
    Use an NPN transistor on the output. Do you know how to make an open collector output? You must already have a 5V supply for this relay to work. It *may* work just about at 3V but you risk it not closing sometimes. Also, don't forget your flyback/catch diodes.
     
  3. RoboToy

    Thread Starter New Member

    Jul 28, 2010
    4
    0
    Can you explain about open collector output ?
    Can you give more information
     
  4. tom66

    Senior Member

    May 9, 2009
    2,613
    214
    See images.
     
  5. RoboToy

    Thread Starter New Member

    Jul 28, 2010
    4
    0
    can you explain it
     
  6. tom66

    Senior Member

    May 9, 2009
    2,613
    214
    Is this homework??

    The transistor acts as a switch. The coil is either conducting current or not, which turns the relay on and off.
     
  7. tom66

    Senior Member

    May 9, 2009
    2,613
    214
    You will also need a flyback diode across the relay coil. I omitted this for clarity.
     
  8. BillB3857

    Senior Member

    Feb 28, 2009
    2,400
    348
    Now you are really confusing the issue!













    (For the noobe, the Flyback Diode protects the transistor from the inductive kick when the relay is de-energized.)
     
  9. RoboToy

    Thread Starter New Member

    Jul 28, 2010
    4
    0
    I will glad to recieve more comments
     
  10. tom66

    Senior Member

    May 9, 2009
    2,613
    214
    I was only demonstrating controlling a relay, which is what he wanted. The diode would be a 1N4148 or 1N400x series across the relay coil.

    What comments do you want, RoboToy??
     
  11. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234
    It is usually best to include a whole circuit and explain each function of the components especially for noob's.... can not hold someones hand half way across then let go :(



    @RoBoToy:

    This is a typical circuit on how to control a relay with a pic output... you can not drive the relay directly from the pic pin, this could damage the pic, you should always use a transistor such as the 2n3904 to turn on the low current relays, the 1N4148 diode across the coil of the relay will snub out any back EMF(electro magnetic field) when the relay is turned off, this will protect the diode and the rest of the circuit from getting big current spikes.... the 330 ohm resistor between the pic pin and the transistor base prevents the transistor from damaging the pic pin from drawing too much current, and prevents the transistor from getting saturated which could cause it to over heat, and possibly get burned out quick...
    pic Relay Control.png

    B. Morse
     
    Last edited: Jul 29, 2010
Loading...