Halaman

misther-junett.blogspot.com
  • Web
  • misther-junett
  • Senin, 31 Januari 2011

    HOME Relay and Optocoupler

    Relay and Optocoupler

    Hello fellow freaks!

    I'm trying to drive a 5v relay with an atmega8 and just needed some help.

    This is what i currently have done, but i have some trouble finding the right limiting resistors on both the optocoupler and the BC547.



    Without the optocoupler i think i could do this:
    The relay has 125ohm coil resistance, so it needs 40mA to activate.
    As the BC547 has a minimum hFE of 200, i need to provide it with at least 40mA/200 = 0.2mA of base current. I'll double that, and say i will provide ~0.4mA to the base to be sure it saturates. This gives me a value for R5 (5v/0.4mA = 12.5k) I'll go with 10k
    (thats 0.5mA to the base, should be fine) This works, i've tried it on a breadboard Smile


    Then i wanted to add a optocoupler to make sure nothing will happen to the rest of the circuit, if something went wrong with the relay, but the transistor in the optocoupler must have some voltage drop, so i need to recalculate the value for R5, as the voltage is not 5v anymore, right?

    I've been looking in the datasheet of the CNY17, but can't figure out what value R4 should be. Is the LED just a normal one?


    I hope you can help Smile
    Thanks in advance!


    Artikel Terkait

    Tidak ada komentar:

    Posting Komentar