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