Go Down

### Topic: LDR light sensor does not return my expected value (Read 5365 times)previous topic - next topic

#### Magician

#15
##### Aug 10, 2011, 06:21 pmLast Edit: Aug 10, 2011, 09:04 pm by Magician Reason: 1
Code: [Select]
`// calculate the illumination, 100K Ohms,   int lux = 500 / ( 100.0 *( (5.0 - v_out) / v_out ) );`

Don't think this is correct equation.
Basically, there are two variable:

1. LDR resistance , which is depends on specific chemistry of the sensor. You should make your research on what material LDR made from, how resistance of given sensor depends on LUX. Most cases it isn't linear, but could be approximated to linear with log scale. If you get a formula
R = f (LUX), next task would be transform resistor values to voltage, that arduino can measure.

2. Voltage output of resistor divider, composed of LDR and constant resistor. Voltage output is  depends of both resistors values, and is not linear too.

Good articles to start research:
http://www.acroname.com/howto/photoresistor/photoresistor.html

edited:
Good tutorial on alternatives for resistor divider :
http://saba.kntu.ac.ir/eecd/ecourses/inst%2086/Projects/Instrumentational%20Amplifier/Shayeste%20Kiaei/conditioning%20circuit-sent/resistance-to-voltaget.htm

Go Up

Please enter a valid email to subscribe