# Questions regarding LDR's

**URL:** <https://forum.arduino.cc/t/questions-regarding-ldrs/879488>\
**Category:** Sensors\
**Created:** [June 28, 2021, 4:45pm UTC](https://forum.arduino.cc/t/questions-regarding-ldrs/879488 "2021-06-28T16:45:32Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bezzero](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/32.png) [@Bezzero](https://forum.arduino.cc/u/Bezzero)\
**Post date:** [June 28, 2021, 4:45pm UTC](https://forum.arduino.cc/t/questions-regarding-ldrs/879488/1 "2021-06-28T16:45:32Z")

</div>

Hello all a an enthusiastic beginner here.  
I have 2 questions about LDR sensors:

1. everyone online using a regular resistor with the LDR. Some use a 200ohm resistor some use 10k ohm.  
Why is that needed?

2. There appear to be resistance levels of LDR's; 5506, 5537,5539 etc.. What do they mean?

Thanks

---

<div class="post-metadata">

**Author:** ![anon94801460](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@anon94801460](https://forum.arduino.cc/u/anon94801460)\
**Post date:** [June 28, 2021, 4:55pm UTC](https://forum.arduino.cc/t/questions-regarding-ldrs/879488/2 "2021-06-28T16:55:01Z")

</div>

The resistance of an LDR, which varies strongly with illumination, can be measured using the Arduino ADC and a [voltage divider](http://hyperphysics.phy-astr.gsu.edu/hbase/electric/voldiv.html).

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.

---

<div class="post-metadata">

**Author:** ![Bezzero](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/32.png) [@Bezzero](https://forum.arduino.cc/u/Bezzero)\
**Post date:** [June 28, 2021, 5:06pm UTC](https://forum.arduino.cc/t/questions-regarding-ldrs/879488/3 "2021-06-28T17:06:35Z")

</div>

Thank you for you quick reply.  
Could you explain why is the fixed resistor needed?

---

<div class="post-metadata">

**Author:** ![anon94801460](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@anon94801460](https://forum.arduino.cc/u/anon94801460)\
**Post date:** [June 28, 2021, 5:07pm UTC](https://forum.arduino.cc/t/questions-regarding-ldrs/879488/4 "2021-06-28T17:07:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Bezzero](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/32.png) [@Bezzero](https://forum.arduino.cc/u/Bezzero)\
**Post date:** [June 29, 2021, 5:51am UTC](https://forum.arduino.cc/t/questions-regarding-ldrs/879488/5 "2021-06-29T05:51:01Z")

</div>

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.

"LDR Photo Light Sensitive Resistor Photoelectric Photoresistor Kit for 5506 5516 5528 5537 5539"

---

<div class="post-metadata">

**Author:** ![justinlucky](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/justinlucky/32/603792_2.png) [@justinlucky](https://forum.arduino.cc/u/justinlucky)\
**Post date:** [June 29, 2021, 6:10am UTC](https://forum.arduino.cc/t/questions-regarding-ldrs/879488/6 "2021-06-29T06:10:38Z")

</div>

Hello @Bezzero  
You were right

> [@Bezzero](#):
>
> 5506 5516 5528 5537 5539"

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

```arduino
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
```

---

<div class="post-metadata">

**Author:** ![Bezzero](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/32.png) [@Bezzero](https://forum.arduino.cc/u/Bezzero)\
**Post date:** [June 29, 2021, 9:04am UTC](https://forum.arduino.cc/t/questions-regarding-ldrs/879488/7 "2021-06-29T09:04:07Z")

</div>

All right, thank you very much!  
So do you what unit of measure is that 5506 5516 5528 5537 5539 ?

---

<div class="post-metadata">

**Author:** ![justinlucky](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/justinlucky/32/603792_2.png) [@justinlucky](https://forum.arduino.cc/u/justinlucky)\
**Post date:** [June 29, 2021, 9:08am UTC](https://forum.arduino.cc/t/questions-regarding-ldrs/879488/8 "2021-06-29T09:08:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Bezzero](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/32.png) [@Bezzero](https://forum.arduino.cc/u/Bezzero)\
**Post date:** [June 29, 2021, 9:12am UTC](https://forum.arduino.cc/t/questions-regarding-ldrs/879488/9 "2021-06-29T09:12:36Z")

</div>

I understand that, but that isn't some known unit of measure? It's just a made up one for these sensors?

---

<div class="post-metadata">

**Author:** ![bezelsanddisplays](https://avatars.discourse-cdn.com/v4/letter/b/7ab992/32.png) [@bezelsanddisplays](https://forum.arduino.cc/u/bezelsanddisplays)\
**Post date:** [June 29, 2021, 11:33am UTC](https://forum.arduino.cc/t/questions-regarding-ldrs/879488/11 "2021-06-29T11:33:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anon94801460](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@anon94801460](https://forum.arduino.cc/u/anon94801460)\
**Post date:** [June 30, 2021, 5:56pm UTC](https://forum.arduino.cc/t/questions-regarding-ldrs/879488/12 "2021-06-30T17:56:49Z")

</div>

> [@Bezzero](#):
>
> "LDR Photo Light Sensitive Resistor Photoelectric Photoresistor Kit for 5506 5516 5528 5537 5539"

I interpret those numbers as manufacturer product IDs.

---

<div class="post-metadata">

**Author:** ![TomGeorge](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tomgeorge/32/215261_2.png) [@TomGeorge](https://forum.arduino.cc/u/TomGeorge)\
**Post date:** [July 1, 2021, 10:10am UTC](https://forum.arduino.cc/t/questions-regarding-ldrs/879488/13 "2021-07-01T10:10:39Z")

</div>

Hi,  
This might help.

> **[Photo resistors, in depth](https://piandmore.wordpress.com/2016/10/14/photo-resistors-in-depth/comment-page-1/)**
>
> Some time ago I bought 50 photo resistors, 10 pieces of 5 different types each. Had no real need for that many but it’s very cheap if you buy them through AliExpress. It turned out to be quit…

Tom... 😃 👍 ☕ 🇦🇺

---

<div class="post-metadata">

**Author:** ![Bezzero](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/32.png) [@Bezzero](https://forum.arduino.cc/u/Bezzero)\
**Post date:** [July 1, 2021, 11:37am UTC](https://forum.arduino.cc/t/questions-regarding-ldrs/879488/14 "2021-07-01T11:37:13Z")

</div>

Awesome thanks!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [October 29, 2021, 11:38am UTC](https://forum.arduino.cc/t/questions-regarding-ldrs/879488/15 "2021-10-29T11:38:01Z")

</div>

Closed on October 29, 2021, 11:38am UTC

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.
