Find all your DIY electronics in the MakerShed. 3D Printing, Kits, Arduino, Raspberry Pi, Books & more!

arduinorelay Connecting a relay to Arduino
From the MAKE Flickr pool

After fielding a few questions about connecting relays to an Arduino, Anachrocomputer drew up this basic schematic for proper wiring.

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

Update: Anachrocomputer adds - Another reason to use a relay is for electrical isolation. The switching contacts of a relay are completely isolated from the coil, and hence from the Arduino. The only link is by the magnetic field,
represented in the diagram by a dotted line.

Collin Cunningham

Born, drew a lot, made video, made music on 4-track, then computer, more songwriting, met future wife, went to art school for video major, made websites, toured in a band, worked as web media tech, discovered electronics, taught myself electronics, blogged about DIY electronics, made web videos about electronics and made music for them … and I still do!


Related
blog comments powered by Disqus
Follow

Get every new post delivered to your Inbox.

Join 26,175 other followers