Connecting a Relay to Arduino

Arduino Technology
Connecting a Relay to Arduino

arduinorelay.jpg
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.

What will the next generation of Make: look like? We’re inviting you to shape the future by investing in Make:. By becoming an investor, you help decide what’s next. The future of Make: is in your hands. Learn More.

Tagged
Discuss this article with the rest of the community on our Discord server!

ADVERTISEMENT

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 16th iteration!

Prices Increase in....

Days
Hours
Minutes
Seconds
FEEDBACK