Electronics › Electronics › howto operate a 12 volt dc RELAY with 89C51 › I never recommend you to use
April 18, 2012 at 2:25 pm
#7487
AJISH ALFRED
Participant
I never recommend you to use ULN2004, just to drive a single relay. It has 8 output pins and you are going to use only one. It will just increase the cost and make your circuit complex and bulky.
Try using a transistor as a switch method,
Take any general purpose NPN transistor, ground the emitter, collector to one end of relay coil, connect the other end of the relay coil to VCC. Connect the output pin of the controller to the base of the transistor via a resitor of value 10k or less.