Measure LDR Light with Microcontroller - 10bit Resolution

4 replies · 4K views · last reply
TheRedDevil18
Messages
406
Reaction score
2
I have a micro-controller with 10 bit resolution. How can I convert the voltage or digital output of the microcontroller to a Lux reading ?
 
Jony130 said:

I don't have a lux meter. I noticed proteus which is the software I use for simulation has one. What if I used that to find the relationship ?

I used a circuit like this and measured the voltage
Proteus schematic of an LDR light sensor in series with a 10k resistor R1 across a supply, with a voltmeter across the resistor reading 15.1 at top left.


This is the curve I got
Line graph titled Voltage vs LUX, plotting Voltage (V) on the vertical axis from 0 to 5 against Lux on the horizontal axis from 0 to 450. The curve rises steeply at low lux, then flattens toward about 4.6 V at 400 lux, with data points marked at intervals.


So if I find the equation of this curve, then given a voltage I can get the LUX value ?
 
Try to use a transimpedance Amplifier instead of voltage divider.
 
Jony130 said:
Try to use a transimpedance Amplifier instead of voltage divider.

What would be the benefit of using a transimpedance amplifier over the voltage divider ?, From what I've read, it converts current to voltage. I haven't studied this type of amplifier yet