Difference between revisions of "Controlling AC devices with AVR using Relays"
Line 6: | Line 6: | ||
The Ultra AVR Dev board comes with Relays on board. You simply need to hook up the relay inputs with the the port pins as shown in the figure below. | The Ultra AVR Dev board comes with Relays on board. You simply need to hook up the relay inputs with the the port pins as shown in the figure below. | ||
=Code= | =Code= | ||
+ | The code turns ON and OFF the relays, every 5 seconds. | ||
+ | |||
+ | =Demo= | ||
+ | |||
=Demo= | =Demo= | ||
[http://exploreembedded.com/wiki/images/0/0a/Schematic_AVR_Interfacing_Relay.pdf '''Schematic'''] | [http://exploreembedded.com/wiki/images/0/0a/Schematic_AVR_Interfacing_Relay.pdf '''Schematic'''] | ||
[[File:Schematic AVR Interfacing Relay.JPG|680px]] | [[File:Schematic AVR Interfacing Relay.JPG|680px]] |
Revision as of 17:45, 28 March 2016
Everyone of us wants to control a bulb, a fan etc at some point in time. We will look at driving single phase AC devices with a Relay using Atmega32.
Basics
Hookup
The Ultra AVR Dev board comes with Relays on board. You simply need to hook up the relay inputs with the the port pins as shown in the figure below.
Code
The code turns ON and OFF the relays, every 5 seconds.