The first part of this project is to get the required parts that we are going to use for our energy consumption meter and power switch project. Apart from the Arduino Yún board, which will be the "brain" of the project, you will need to have two main parts ready on your desk when building the project. These parts are the relay module, which we will use to switch the lamp on and off, and the analog current sensor, which is used to measure the power and later the energy consumption of the lamp.
A relay is basically an electromagnetic switch used in projects where we need to switch a really large voltage (110V or 230V) using a small voltage as the command signal (5V from the Arduino board). For the relay, we used a basic 5V relay module from Polulu, which can switch up to 10A and is more than enough for many home appliances such as lamps. (In Europe, with 230V, you can connect up to 2300W.) The module itself is simply a relay mounted on a printed...