This project is all about producing variations of sounds in buzzer according to the intensity of light.
It can also be used as an alert system to get alerted whenever someone enters your room and switches on the light.
Any person provided with the ready hardware and software components can do this project within an hour.
Then
What are we waiting for-?
Let's jump in !!!
- LDR sensor reads the value of the light intensity from the value 0 to 1023.
- Buzzer takes the value from 0 to 255 to make variations in the noise it produces.
- When we connect these two components with the Bolt Wi-Fi module and combined this with the right software program, we can reach our objective.
STEP-1
- Connecting jumper wire from GND in the Bolt Wi-Fi module to the breadboard.
STEP-2
- Connecting the LDR sensor to the circuit.
- One end of the LDR sensor is connected to a 3.3v pin and another end is connected to the pin A0.
STEP-3
- Connecting the Buzzer to the above circuit.
- The buzzer has +ve and -ve pin. The long endpin is known as the +ve pin and the short endpin is known as the -ve pin.
- The positive pin of the buzzer is connected to pin number 0, and the negative pin of it is connected to GND.
STEP-4
- Connecting the 10kohms resistor to the circuit so that it forms a potential divider circuit across the LDR which allows MCU to read the voltage across the LDR.
- One end of the resistor is connected to the pin A0 and the other end is connected to GND.
STEP-5
- Connecting the Bolt IoT Wi-Fi module to the Bolt IoT cloud.
- Now after every 10sec, the LDR sensor senses the intensity of the light to give the input to the Buzzer.
- The can be given from 0 to 1023, but the buzzer can only receive the input from 0 to 255.
- So we must divide the input value obtained from LDR by 4 so that the input values from 0 to 1023 can be converted to 0 to 255.
STEP-1
- Installing python library in Ubuntu 20.04 / or any other Linux distros.
sudo apt update
sudo apt install python3-pip
STEP-2
- Writing a program using the terminal of ubuntu. here
- This video shows the variation in the sound of the buzzer when there is a flashlight and when it's off.
Feel free to comment down below to ask any doubt/question regarding this project.
Comments