Hello guys, welcome back to my SriTu Hobby blog. In more than 20 of my previous articles, we have explained the basics of the Arduino. I believe you have acquired that knowledge. Today we are going to use that knowledge to create a very useful project. That is, we make a clap control table lamp. This creation is very helpful for your house. You can also use it for wall lamps if desired. Also, it is a specialty that we can do at home at a low cost. OK let’s see how does work this table lamp. As you know from the title, this project is activating from clap sound. Yes, this lamp works by detecting sound. But applause is not necessary. You can use any other sound. But this is not active for normal sounds. For that, the sound has to be presented in a special way. For example, when clapping control. This is activated by two claps. But this must be done in a timely manner. Also, It also requires two applause to deactivate it. Therefore, this table lamp does not activate for sounds in the environment. For that, I mainly used the sound-sensitive sensor. A full description of this sensor is given in a previous article. Please read it using this link. So it does not need to be described here. Also, In addition to this sensor, a relay module is used. We can ON or OFF a bulb through this relay module. But you have to remember to provide less current than the current mentioned on the top of the relay. Please click this link for the full description of this relay. The Arduino Uno board is used to control all this. But you can use the Arduino nano or pro mini boards. Also, I used cardboard to make the table lamp cover. You can use other suitable materials for this cover. So, we talked a lot about this project. Let’s go do this project. The required components are listed below and can be easily purchased through the links provided.
This code is very easy for beginners. Please read and understand this code. For the first time, five variables have been created to help this code. Later, the sensor pin is defined as the input pin and the relay pin as the output pin, which is included in the void setup function. Void loop code includes relay on/off functions. Ok, the program is over.
Ok, let’s select the correct board and port.
Finally, upload this code.
Ok, this project is complete. Now power this table lamp. To do this, supply the Arduino board with a voltage of 5 to 12 DC and a potential that matches the bulb we are using. If you use an AC voltage, please be careful ok.
Now we can test this project. Use two clapping sounds. Below is the full video of this project. Please watch it.
So today the project is done. I think this project may have helped your life a lot. Please comment below on your issues while creating this project. Ok, we will meet in the next project. Have a good day. Bye-bye.