How to use LDR Sensor with Arduino | Make Automatic street light 💡
ฝัง
- เผยแพร่เมื่อ 19 พ.ค. 2024
- In this video we are going to use LDR (Light Dependent Resistor) Sensor with Arduino so that we can detect intensity of light.
Based on this we can turn on/off bulb automatically if surrounding is dark or bright.
We will see how we can automatically turn on street light in the night.
I have explained in details each step along with code and connections.
👉Please subscribe: th-cam.com/users/hashinclude...
👉Components list :
✅ Arduino Uno amzn.to/3tjKRMR
✅ LDR Sensor Module
✅ 5V Relay amzn.to/3pWsr2u
✅ AC socket and plug
✅ 7-12 V DC battery
✅ Breadboard
✅ Jumper wires
👉 Shorts Channel :
/ ujwalnandanwar
👉Code and diagram:
github.com/un0038998/lessons/...
👉Rain Sensor:
• How to use Rain Sensor...
👉Sound Sensor:
• How to use Sound Senso...
👉Watch more videos:
/ hashincludeelectronics
👉Follow us on Instagram:
/ hashincludeelectronics
#ldrsensor #hashincludeelectronics #arduino - วิทยาศาสตร์และเทคโนโลยี
Awesome... This is useful... Thanks 👍
Welcome 😊
Very well explained 👏👏👍
Thank you 🙂
What of if I want I use a 40W bulb and solar panel?
That’s a nice idea . However I have not used solar panel yet . You can try and let us know 👍🏻
Can we adjust(high,medium,low) the brightness of AC bulb automatically with the outside brightness??
We can but not in this project . In that case you will need dimmer module . Also the LDR sensor should have the analog output .
@@hashincludeelectronics Can you please help me in anyway to make this project?? I am trying a lot to find a project like this but have not found any on internet.
i have found some where they use potentiometer. But that was not automatic.
hi, first thank you so much for sharing this tuturial, i have an issue with my light sensor, i'm trying to make it print if its HIGH then its the night, if LOW than its the morning but it keeps sending me 0 value
this is my code, can you please help me:
#define LDR 2
void setup() {
Serial.begin(9600);
pinMode(LDR,INPUT);
}
void loop() {
int mia=digitalRead(LDR);
Serial.println(mia);
delay(1000);
if (mia==HIGH){
Serial.println("NIGHT");
delay(1000);
}
else{
Serial.println("MORNING");
delay(1000);
}
}
You need to calibrate the sensors sensitivity. Try changing the knob on sensor
@@hashincludeelectronics it worked sir thank you
@@radiamoon2395 glad that it worked . Good job 👍🏻
Good one❣
I do not understand how do we connect the AC plug does not automatically light up when plugged. how do I prevent it from doing that?
Please check the video slowly and carefully for any missing step 👍🏻
Do you live out ? of india? ?
Currently yes.
can i have the codes on this project bro?
Sure . It’s link is in the description.
Why need battery?
It’s needed to provide power supply to Arduino. You can use ac dc adapter as well
Plz give me code
Code and diagram link is provided in the description of the video 👏🏻👍🏻