How to connect a relay to arduino
I recently needed to connect a relay to my arduino so I could control a thermostat. Luckily Connecting a relay to Arduino is pretty easy and worked well for me.
Why use a relay with an Arduino board?
Individual applications will vary, but in short – a relay allows our relatively low voltage Arduino to easily control higher power circuits. A relay accomplishes this by using the 5V outputted from an Arduino pin to energize an electromagnet which in turn closes an internal, physical switch attached to the aforementioned higher power circuit. You can actually hear the switch *click* closed on even small relays – just like the big ones on street corners used for traffic signals.
Sparkfun recently posted a nice tutorial on using relays to control mains supply power – strongly recommended for those interested in controlling ‘wall powered’ devices – Controlling Big, Mean, Devices
1,337 total views, 1 today