connecting 12v relay to micro controller through npn transistor

Discussion in 'Homework Help' started by freddarkomf, Jun 14, 2012.

  1. freddarkomf

    Thread Starter New Member

    Jun 14, 2012
    9
    0
    Hi all, am a newbie in electronics, can someone teach me how to interface a micro controller (Atmega32) which output +5vdc to switch a 12v relay using npn transistor. my transistor is D637 or C458. my problem is how will i prevent the 12v applied to the C (collector) from not appearing at the B (base) to damage my micro controller, it urgent please. thanks.
     
  2. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,576
    231
    Check the top of page 8: http://www.picaxe.com/docs/picaxe_manual3.pdf Different uC, but same interface.
    Looks like the max collector current rating for a 2SD637 and a 2S458 is 100mA. Do you know what the relay's coil current is?...part#?...link?

    Ken
     
  3. freddarkomf

    Thread Starter New Member

    Jun 14, 2012
    9
    0
    Thank you Ken, that was helpful.
     
Loading...