LDR light sensor does not return my expected value
Topic: LDR light sensor does not return my expected value
(Read 4714 times)
Per aspera ad astra.
Re: LDR light sensor does not return my expected value
Aug 10, 2011, 06:21 pm
: Aug 10, 2011, 09:04 pm by Magician
// 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:
Good tutorial on alternatives for resistor divider :