Drive relay with AVR microcontroller

To drive relay you need more than 20mA – the current can one pin drive. This is why you cannot connect relay directly to microcontrollers pin. To drive relay you need to connect simple amplifier made of one transistor.

One important part of this circuit is the diode, which protects circuit from induction caused when switching relay.

image001.png

This circuit is more general as instead relay you can connect any other load like lamps, DC motors if you need to control more than one relay, you might consider using ICs like ULN2003 or ULN2803. These IC’s have Darlington transistors inside and can drive up to 500mA each.

image003.png

To switch on a relay in this case you need simply write “1” to port pin. And current doesn’t exceed the allowed limit of microcontroller.

3 Responses to Drive relay with AVR microcontroller

  1. Pingback: Firefox Bookmarks « Rabiul's

  2. Pingback: Microcontrollers reset when switching Contactor

  3. Pingback: selecting an IC buffer

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

To submit your comment, click the image below where it asks you to...