connecting 12v relay to micro controller through npn transistor

Thread Starter

freddarkomf

Joined Jun 14, 2012
9
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.
 
Top