The resistance of an LDR, which varies strongly with illumination, can be measured using the Arduino ADC and a voltage divider.
The choice of fixed resistor depends on the light level, the LDR in question and the application. If you want to detect small changes in light level, then the optimum fixed resistor value should be about equal to the LDR resistance for "typical" illumination.
The fixed resistor is required to make the voltage divider. The Arduino cannot measure current or resistance, only voltages. You will need some basic circuit theory to understand how that works.
All right, I will check about voltage divider. Thank you.
When buying LDR's there are several resistance levels in this unit of measure- 5706, 5738, 5739 etc... Are you familiar with that?
Is it a special unit for light measuring maybe? Thanks.
This value are mean for measurement the are the constant value the reading of a LDR varies in each of the constant respectively
See this reading i do a research while i was learning about it in the past
type or paste code here
If we take the values it shows during daylight, inside the house:
* 5506 5516 5528 5537 5539
975 969 774 619 218
975 968 773 619 220
975 969 773 618 216
975 968 771 616 215
975 968 771 617 221
975 969 774 620 226
975 969 776 622 225
976 969 775 621 221
975 969 774 619 220
975 969 774 619 219
975 968 772 617 216
As you can see, the values are relatively stable. So let’s take one of the values of the 5528, 775. How do we calculate the resistance from that? The analog port has a 10 bit resolution, which means it can go from 0 to 1023. 1023 will be at 3.3V (in my case. If you use a Uno for example it will be 5V). The reading is 496 which means it is reading a voltage of 775/1023*3.3V = 2.5V. So we know the voltage drop was 3.3V-2.5V = 0.8V. So we know V. Now we need to know I and from that we can calculate R. We can calculate R because we know V and R for the other part of the setup, the 10KΩ. I = V/R = 2.5V / 10KΩ = 0.25 mA. Now we take that 0.25 mA and use it for calculating the resistance of the photo resistor.
R = V/I = 0.8V / 0.25 mA = 3,200 Ω. Now you can go to the GL5528 datasheet and see
gl5528
that the amount of light is between 30 and 85 lux. Well, that’s quite a broad range and not really useful for calculating the amount of lux but the deviation of these sensors might vary piece to piece but do not vary that much per piece, so if your sample decides to be more towards the dark side, it will be there with higher or lower light settings as well. What this means is that the sensors are great for detecting deltas in light even though getting a precise lux reading is not really feasible. Ok, well than we need more readings:
light from a normal bulb:
* 5506 5516 5528 5537 5539
974 967 739 623 279
982 981 844 717 437
992 988 870 751 454
994 991 874 758 440
995 991 873 752 325
992 986 836 700 137
985 979 795 654 62
978 972 754 610 34
971 969 792 668 379
988 985 854 727 440
993 990 871 749 440
light from a mobile phone
* 5506 5516 5528 5537 5539
1006 1007 956 925 795
1006 1007 956 925 796
1006 1007 956 925 797
1006 1007 956 925 797
1006 1007 956 926 798
1006 1007 955 925 795
1006 1007 956 925 796
1005 1007 955 924 795
1006 1007 955 924 793
1005 1007 955 925 796
1005 1007 955 925 795
light at dusk
* 5506 5516 5528 5537 5539
834 834 385 208 20
840 838 394 216 22
840 840 402 222 23
840 840 405 225 24
839 839 404 225 24
839 838 404 224 23
840 838 405 225 24
841 839 405 226 24
841 839 405 226 24
844 840 406 227 24
845 840 406 227 24
light in the evening
* 5506 5516 5528 5537 5539
582 583 118 52 1
581 582 118 52 1
580 583 118 53 1
580 582 118 52 1
580 581 118 52 1
578 580 117 52 1
577 577 116 52 1
565 561 109 49 1
584 583 118 51 1
586 587 120 53 1
589 590 121 53 1
There are a few things to notice. First, I thought it was interesting to see that the values fluctuated with a normal bulb. This sample was not an incident, it was doing that the whole time. I think it might have to do with the fact that light bulbs fluctuate because of the way the alternating current alternates but I’m not sure. The second thing to notice is that the 5506 does not really vary that much with light, especially compared to the others. It’s not because it’s broken, but it’s because it’s resistance is small compared to the 10kΩ resistor which means it does not leave a lot of ‘bandwidth’ to show it’s capabilities.
Maybe you get what i mean to convey
And wishing you luck
I was assuming the constant value to be the intensity respectively
Due to the various type of light falling and amount of photon receive in the LDR the value is place accordingly
LDRs are good general purpose devices. However, I have found they give inconsistent readings. Even for those form the same batch. They also tend to vary their out put on the colour temperature. Plus some are made with some nasty chemicals.....
If you need perhaps more accuracy for daylight sending then trying using a daylight ambient sensor - I use the tept4400 Ambient Light Sensor. It has peak sensitivity matched ot the human eye as about 550nm. And its RoHS complient.