Это видео недоступно.
Сожалеем об этом.
LDR with Arduino - Measure Light Intensity using Photoresistor
HTML-код
- Опубликовано: 16 авг 2024
- Lets learn how to interface LDR with Arduino Uno. We'll first setup the circuit and then write program to measure light intensity. The LDR which is Light-Dependent Resistor changes the resistance value based on intensity of light falling on to it. This change in resistor then can be measured in the form of Lux or illuminance. The LDR or Photoresistor is an Analog Sensor. We'll connect LDR Sensor to A0 Pin on Arduino Uno and use simple analogRead() function to read light intensity (lux) from LDR
Nicely done. Concise and complete, without dragging in a quantum physics lecture about photons and electron hole transport.
Many thanks!
Great tutorial! Thank you for making this simple enough to understand on my first day of using arduino!
Thank's Ms. Emily for your time to leave a comment. I wish you a good luck to all your upcoming events.
Does you know what's a GAS DISCHARGE LAMP!! And can you make your own LIGHT INTENSITY METER ???
ruclips.net/video/JTcircQha3A/видео.html
Go find out
@@thearchetype9829 *Do you know what a gas discharge lamp is?
LOVE IT !
THIS INLUEDES ALL THE ACCECORIES THAT I HAD TO MAKE THIS PROJECT
thank you for making this video possible for us!
thanks!
You are so welcome!
very clear explanation and very good video, i like your 3 way split video setup...
Glad you liked it!
you're the best!!! really your tuto help me so much to understand light sensor
@@thearchetype9829 i will do!!
Thank youu so much...great explanation in simple language!!
You can make the value go up instead of down by reversing the voltage polarity through the LDR and resistor.
Yes, its possible
I think at least one of the three-pin modules with the resistor built-in actually shows a pin out diagram wired this way. As far as I can tell, either way works, just be sure you know what you're expecting.
Thank you so much for the code and all that!
by the way: great channel
Does you know what's a GAS DISCHARGE LAMP!! And can you make your own LIGHT INTENSITY METER ???
ruclips.net/video/JTcircQha3A/видео.html
Go find out
I tried something similar with temperature, and my experience says that you need some error to avoid oscillations between on and off state. What I mean, is that you better set two values close to 100, one lower value for on and one higher for off. Let's say the two values are 99 and 101, you want the led to be on when the intensity is 99 or lower, and you want it to be off when intensity is 101 or higher. In case of any values between 99 and 101, the led maintains its previous state
Hi Chris, thank you very much for your suggestions. Next time when I'll write arduino code wherein LDR data will be checked for lower threshold as well. Have a beautiful day!
Great, simple and very useful.
CAN YOU MAKE YOUR OWN LIGHT INTENSITY METER with CIRCUIT EXPLANATION???
ruclips.net/video/JTcircQha3A/видео.html
Go find out
Nice video sir. i like it. make it sir much more videos that can will study it.
Hi Devadatta, I will keep adding more videos around Arduino and Raspberry Pi related topics in days to come. Thanks for your nice words concerning video lessons. It means a lot. Thanks
Thank you for your super informative video 👌🏽
CAN YOU MAKE YOUR OWN LIGHT INTENSITY METER with CIRCUIT EXPLANATION???
ruclips.net/video/JTcircQha3A/видео.html
Go find out
Wow that was easy to setup thanks
Yes, indeed. You should try connecting LDR with Arduino. It'll be a fun project.
Best wishes
1st sketch ever! thankyou
Hi Maco, welcome! And good job, cheers!
Great video tutorial, Thanks.
Glad it was helpful!
Great explained ,thank you.
Glad it was helpful!
Awesome video, thanks so much. Would you mind adding the LDR used and the resistor used to your description? Thanks again!
I see you say 1 kOhm in the video (it's labelled as well).
Does you know what's a GAS DISCHARGE LAMP!! And can you make your own LIGHT INTENSITY METER ???
ruclips.net/video/JTcircQha3A/видео.html
Go find out
really great sir, thank you a lot
You are most welcome Divya
Hi, great video but could you explain to me what the resistor going to the ground is for? I'm very new to arduinos and circuitry. Thanks!
Hi, you can use resistor of value 10K with LDR Light dependent resistor. Its standard across all input of 5V DV devices. Just like Arduino Uno which also operate on 5V DC. I hope this may help answer your question. Good luck and best wishes!
Thank you very much for this video. I need to make a DIY CT Scanner and I am planning on using these. Could you make a video for the code for getting the reading of multiple resistors at a time please? Also, What's the difference between these photoresistors and the Gowoop photosensitive resistance sensors?
CAN YOU MAKE YOUR OWN LIGHT INTENSITY METER with CIRCUIT EXPLANATION???
ruclips.net/video/JTcircQha3A/видео.html
Go find out
Thanks for this nice explain
But i would if someone please tell me applications for ldr sensor matrix 6×6 or 6×5
Because I have a project for college and i little confused how can I deal with that... And thank you so much
Hi Omer, thanks! I think you can consider using LDR sensor to measure light intensity of surrounding and then take two or three 6x6 dot matrix display connect them together and show light intensity which means lux value on display. This could be one simple application to show in college. Also, you change the brightness of Dot Matrix display based on value of Light Dependent Resistor. I hope this may find useful. Good luck and best wishes for your project!
@@BINARYUPDATES thank you so much for your help , can I contact you in another your email , what's up or telegram?
And thank you again ❤️❤️❤️
good one
Is it possible to make a code in arduino that sends your computer to a URL?
Does you know what's a GAS DISCHARGE LAMP!! And can you make your own LIGHT INTENSITY METER ???
ruclips.net/video/JTcircQha3A/видео.html
Go find out
Great job sir🙏
Thanks for the informative video! I'm trying to create a way to convert morse code light signals into text but I'm curious on how the photo resistor would be able to decipher and differentiate between dots and dashes. Do you have any advice on how to proceed?
I’m not entirely sure but you could try somehow reading a 0.5 second blink as a . And a 1 second blink as a - or use your own timings, whatever makes most sense to you
Far easier to generate Morse Code.
Reading it gets messy. I'd use the millis() function (Arduino milliseconds since boot)
sit in a while() loop waiting for the signal to go high. Grab the millis() and sit in another while loop waiting for the signal to go low. Grab the millis() again and subtract the starting millis() to get the pulse duration. This millis() stamp also begins the space.
repeating this process lets you build up an array of pulse and space times. the following rules may help you sort out the difference between pulses individual letters and words, but the timings are pretty variable, especially with human generated code, so you're going to have to be a bit clever with your math. once you think you have a bunch of letters, decoding it is just a matter of referencing a table of type byte, with each letter represented as binary digits.
The length of a dot is 1 time unit.
A dash is 3 time units.
The space between symbols (dots and dashes) of the same letter is 1 time unit.
The space between letters is 3 time units.
The space between words is 7 time units.
Awesome video--thanks.
Glad you liked it!
Thank you for the video sir. May I ask why are you using the 1kOhms resistor specifically?
Hi Reinalto, that 10K resistor connected with LDR circuit form voltage divider circuit which generate variable voltage. This variable voltage we measure using Arduino Microcontroller. And later on this voltage itself will interpret as a light intensity or lux value. I hope this help you. Good luck and best wishes!
@@BINARYUPDATES this definitely help. I was using a 2k and it's not working properly, now with the 10k resistor everything is working just fine. Again, thank you for the video and keeping the good work! You're blessed!
7:17 In which units the LDR sensor gives the output. In serial monitor
Hi Vamshil, the values getting on serial monitor is the equivalent of change in resistor because in the end LDR is resistor whose resistance changes as light falling on its surface changes. Usually, we need to convert this value into lux because light intensity is measured in lux. I hope this help you understand LDR's functioning. Good luck and best wishes!
Thank you so much!!!!
Good, Thank u
Can you please paste the link for complete project?
Hi, I wanted to build a small box wherein light would fall on a piece of paper and the sensor should calculate the area of the paper which is blocking the light?? Is it possible??
Hi Gaurav, it is possible
@@BINARYUPDATES Hi thanks for the response. Can you guide me how this can be done I am in need of the same for school project. If you want we can discuss this on email or anywhere else suitable
Thanks.
Nice one
can i have the program plizz
Dear sir, LDR and Arduino board is ok but there is no change in the value on serial monitor.
I have also connect LED in digital pin 13 but not glowing on covering LDR.
Can you please help me?
Hi Virendra, please make sure LDR and Resistor connected properly to form voltage divider circuit. The value of lux or LDR data depends on what value of resistor you've connected across LDR while connecting to A0 pin on Arduino Uno. Best wishes and good luck!
Arduino Uno- Serial Monitor is showing up like 200 or 217 . Is this 200 or 217 in light unit Lux ?
guess this is late, but its only a number from 0 to 1023, no unit.
It doesnt give you any unit, its just a value which is given based on the resistance the LDR is at the current light level (Not the resistance in ohms either).
really simplified
i found error: system show this message.
'serial' was not declared in this scope
Hi Hasnain, It seems like your Arduino Code has issue. You have to write "S" capital in Serial. I hope this may help. Good luck!
I'm terrible at electronics
I use the esp8266 microcontroller and I'm getting values from 20 to 50 although I did the same wiring ???
The value for LDR may vary as ESP8266 runs on 3.3V and Arduino runs on 5V. The other important thig contribute to accuracy of data based on value of resistor you've used with LDR Sensor. I hope this information may help you. Wish you good luck and best wishes!
@@BINARYUPDATES thanks for the help
Is a breadboard that big necessary ,can it work with a smaller one too?
Hi Katianuriu, Yes it will work with smaller breadboard as well. Just setup LDR circuit with Arduino on available tie points on small breadboard. Good luck and best wishes!
That is not lux.
Then what is it?
Cool!
thank you
if i add 1 more ldr and what do you add to the code
Hi Omar, you can add other LDR to A1 Pin which is analog sensor. So we'll declare new variable to store light intensity of second LDR using analogRead(A1) function. I hope this may help. Best wishes and good luck!
this out values, are they in some unity of mesurement? like lux, or lumens
He doesn't know himself :D
Usually light intensity is measured in lux
Since LDR is light dependent resistor we read change in resistance through ADC counts on Analog Pin of an Microcontroller. The circuit we use in this project create voltage divider arrangement to let us measure change in voltage when light falling on sensor changes. I hope you get now.
Good luck
so i uploaded it but it stays at 0. Any reason for that???
Hi Sam, please do check your connection between LDR and Arduino. Sometimes its possible because of bad connections you won't get to see data....
What LDR are you using, can you send a link please
CAN YOU MAKE YOUR OWN LIGHT INTENSITY METER with CIRCUIT EXPLANATION???
ruclips.net/video/JTcircQha3A/видео.html
Go find out
For some reason my LDR only works like a resistor, even if I try to move it to brighter space or cover it
I try replace the LDR with a resistor and I can tell that the variable are completely the same so it is kinda working
I used both of my LDR, the main one and the spare one and both aren't working
You have any ideas?
Hi, you need only one LDR for this project and other would be a normal resistor of value around 10K to form voltage divider circuit to measure the light intensity in lux which is an result of equivalent ADC counts from microcontroller on arduino uno. Usually, the two reason this may not work, One is wrong connections and other one is power make sure your arduino boards GND and 5V pin provide enough power to functions voltage divider circuit. I hope this may help you. Wish you beautiful day. Thanks
Thank you bro ❤️
Welcome Bro😊
Bro what is the units of output lightning intensity? Is it LUX or not?
Hi Pulitha, the light intensity from LDR can be measured in Lux:
The "lux" which is the SI unit of illuminance, measuring luminous flux per unit area.
CAN YOU MAKE YOUR OWN LIGHT INTENSITY METER with CIRCUIT EXPLANATION???
ruclips.net/video/JTcircQha3A/видео.html
Go find out
Hello, please how can I set it to high sensitivity? I mean how can I do that In series window would be for example 6 numerie numbers?
Hi Adys, to achieve more resolution you need ADC with high resolution. In Arduino, ADCs are 10-bit means the output will be between 0-1024.
Sir, please make a video with ws2812 rgb led strip, LDR and arduino with code please.
Please reply
Hi Virender, I'll soon make video to show how to interface and program Arduino Uno with WS2812 RGB LED Strip. Thanks and have a goo day
so how do we make FreeRTOS LDR sensor with seperated task ? like make on and off led in seperated task, i still can't do it 😩
You need to use FreeRTOS Library in Arduino Code. And create independent task for turning LED ON/OFF. Not sure your objective because you can achieve simple LDR interface without FreeRTOS. I recommend use millis() function instead
Sir why are we using the resistor here?
Hi SRG, it forms voltage divider circuit which help you measure change in output voltage because of change in resistance across LDR. I hope this may help. Best wishes!
@@BINARYUPDATES Thank you Sir
Is the A0 input or output
A0 on Arduino is an Analog Input Pin can be used to read any analog sesnor. As in this case we used LDR light dependent resistor
What is the ohm value of resistor?
You can use 10K Ohm resistor with LDR Light dependent resistor to form voltage divider circuit with Arduino Uno Pins.
Best Wishes
Team BINARYUPDATES
THAAAAAAAAANK YOUUU
My Pleasure Emma!
Why did you use pin 13 in code?
Also you didn't connected any wire with pin no. 13.
the yellow onboard led on the arduino is connected to pin 13 internally
you placed that breadboard wrong.. its slightly up
hey hello I had a question,
can we measure wavelength of a particular led using the intensity of light measured by ldr?
my suggestion would be using a low and high pass filter. if you want to be approximate some colored plastic might do the trick!
@@LUCABALUCA but how to.measure wavelength will it give direct value?
Technical Engineer ah to measure a wavelength scientists use light spectrometers. To my knowledge they use filters to measure at each wavelength and then look at the graph ti figure ou which wl it emits at
CAN YOU MAKE YOUR OWN LIGHT INTENSITY METER with CIRCUIT EXPLANATION???
ruclips.net/video/JTcircQha3A/видео.html
Go find out
mine jump from 300 to 700 and back to 300.. and if I block the light it jump from 0 to 1023 and back to 0...
why?
I believe it maybe because LDR connections will be loose on breadboard. Please confirm once and give it try once more
what is 200 that is showing? 200 what?
Its a value of ADC counts which will vary based on amount of light falling on the surface of LDR Sensor. So later we can calculate Lux or illuminance
how can we use it to calculate lux please?@@BINARYUPDATES
Can i replace arduino uno with raspberry pi with same cooding?
Hi Azri, unfortunately Raspberry Pi don't have any analog pin on board. So you need to connect external ADC converter chip to interface LDR with Raspberry Pi.
@@BINARYUPDATES okay thanks for your response. I will use Arduino. Actually my project same like this, I was planed want to use LCD 1602 to view my result. What step I need to do to to get output on LCD?
Please "pin" the components used in your configuration, ie, what is the size of the LDR used with your 1K resistor
The LDR used in video lesson is very commonly used LDR. One can find in any online store these days even on amazon
The photo resistor is pretty standard, there are usually one or two included in most of the beginner kits for Arduino or elegoo. But I would double check the resistor value. The photo resistor modules I've seen, where the resistor is built on a little 3-pin board, use 10K resistors.
Why my LED has a very low intensity? Any idea?
Hi Beatrice, LED brightness depends on specification of an LED. If in case you've same LED then maybe your Arduino is not providing enough power to LED. And i consider you've not connected any current limiting resistor before LED. Usually resistor before LED used to control the current flowing through LED which in result control brightness of an LED. I hope this may help you. Good luck, best wishes
instead of putting the wire at 5V, can I put it at VIN?
No VIN pin on Arduino Uno is to give input voltage to Arduino. Not to take from arduino to supply 5V to other devices like sensors, displays, motors etc.
@@BINARYUPDATES ok
How to insert this to lcd?
Hi, you can interface Character LCD in 4-bit mode or use OLED display with I2C protocol. This will let you show light intensity value LUX from LDR on LCD screen. I have video posted in Arduino playlist on how to interface LCD Display with Arduino. I hope, you may find that tutorial useful. Good luck and best wishes!
Thanks
How we can obtain the graph of the same
Hi Vishaka the easisest way is to use Arduino Serial Plotter in Arduino IDE under Tools menu. I hope this may help you. Wish you good day, thanks!
could i use the 3.3V or would that not work
Yes Kate you can use 3.3V as VCC as a reference voltage with LDR Light Dependent Resistor
can you please give me circuit diagram
will this work with an arduino uno?
Yes, as per video. I've shown the same. The LDR to interface with Arduino to measure light intensity in surrounding.
What colours does the resistor have?
Not sure about color code since its very old method to recognise value of resistor. I use multi meter to measure value. Usually with LDR Light Dependent Resistor you can consider using resistor with value between 1k-10k Ohm. I use 10K Ohm for optimal performance to get accurate value of LUX from LDR Sensor
how many ohms is your resistor used?
I've used 1K ohm but you can use any resistor value between 1K to 10K while interfacing LDR with Arduino. Good luck!
you don't have to sport a foreign accent... be whatever you are. btw, great tutorial.
Hi
Plz send the code
The LDR and Arduino Code is simple you can pause video for a moment and type. Good luck!
thank you