0

So I'm trying to use a photo-resistor and I learned that you should have a "fixed" resistor in the circuit. So my question is, what resistor should I have be the fixed resistor? My photo-resistor has a resistance of 18-50 KΩ at 10lux and a darkness resistance of 2.0 MΩ at 0lux.

4
  • 1
    please include the circuit diagram ... what are you trying to accomplish?
    – jsotola
    Aug 25, 2021 at 23:16
  • 1
    What voltage swing to you want. What are you connecting the output to. Post a schematic along with links to technical information on the parts you are using.
    – Gil
    Aug 26, 2021 at 1:21
  • What part of the “light curve” are you interested in and what will you be connecting the LDR output / voltage divider to? An LDR that has a resistance of, say, 20k Ohms at 10 lux (which is a very low “candlelight” light level) can have a resistance of only 100 Ohms in daylight (10.000 lux or more). Your voltage divider (input to an ADC i presume?) should be matched with the values you are interested in.
    – StarCat
    Aug 26, 2021 at 6:22
  • @StarCat does the resistance of the fixed resistor change what kind of values I'll get? Also, what is a "light curve"? And btw I connected the output to the 5V pin on the Arduino. Aug 26, 2021 at 15:09

1 Answer 1

2

What part of the “light curve” are you interested in and what will you be connecting the LDR output / voltage divider to?

A photoresistor (LDR) that has a resistance of, say, 20k Ohms at 10 lux (which is a very low “candlelight” light level*) can have a resistance of only 100 Ohms in daylight (10.000 lux or more). Your voltage divider (input to an ADC i presume?) should be matched with the values you are interested in.

That said, if I make the assumption that you want to distinguish between daylight and darkness and you want to connect the LDR voltage divider to an ADC input on your Arduino that has the same range as your power supply (usually 5V or 3.3V), you could build the following voltage divider using your LDR and a 10k Ohm resistor (R1, your "fixed" resistor):

schematic

simulate this circuit – Schematic created using CircuitLab

This will give you a fairly wide range of values (with higher values being brighter) and allows you (by experiment) to determine when it's time to turn the lights on, for example.

*Actually, the definition of 1 lux is the amount of light one candle generates at a meter distance, so 10 lux is the light of 10 candles.

2
  • 1
    Change R1 to a (trim)potentiometer so you can adjust it to your needs.
    – SBF
    Aug 26, 2021 at 10:04
  • fun trick: put LDR from ADC to GND, then take the other lead to a GPIO set to "INPUT_PULLUP". Depending on the type of ldr, this can give you full range or sometimes just about 1/4 range, but often that's good enough to tell "it's dark"...
    – dandavis
    Aug 26, 2021 at 19:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.