Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Arduino By Example

You're reading from  Arduino By Example

Product type Book
Published in Sep 2015
Publisher
ISBN-13 9781785289088
Pages 242 pages
Edition 1st Edition
Languages
Authors (2):
 Adith Jagadish Boloor Adith Jagadish Boloor
Profile icon Adith Jagadish Boloor
Adith Jagdish Boloor Adith Jagdish Boloor
Profile icon Adith Jagdish Boloor
View More author details
Toc

Using relays to control appliances


Here, we learn what relays are and how they can be used to control everyday electrical/electronic appliances. Also, to make them useful, we will connect them to the Arduino and create a Blink.ino program, except this time it will be your lamp that will be turning on and off.

Understanding the basics of the relay

A relay is basically an electrical device, usually consisting of an electromagnet, which is activated by a passing of current in one circuit to open or close another circuit. You could think of it as a switch that requires current to turn on or off.

Why can't we simply connect a pin of the Arduino to the switchboard, and switch the fan on or off like we do with an LED? Well, an Arduino can output only 2-5V, whereas the fan or any other appliance in your house uses around 200-250V that comes from the electricity grid. This number is different depending on where you are from. Also, we cannot simply connect the Arduino to the switch of the fan because...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}