I'm trying to measure ambient brightness values with a CdS light-dependent resistor (R2 in the below diagram.) R1 is a known value, and the resistance of R2 has an inverse log relationship with the current ambient brightness.
I can use the voltage in the middle of the voltage divider to calculate the value of R2, and therefore the brightness, in software. I intend to use the A-D capabilities of my PIC chip to measure that voltage. Although CdS cells are inherently a bit imprecise, I'd like to get the best precision possible. Is the input current flowing into pin AN0 negligible?
Vdd ---
|
R1
| -|--|-
+------ AN0-|IC|-
| -|--|-
R2
|
Vss ---
Bonus question - anyone know how I can linearize the inverse log response of my LDR? At 1 lux it's 1 megaohm, at 10 lux it's 100k, at 100 lux it's 10k etc. I need to calculate values as accurately as possible between 10 and 600 lux, so if I just plug it into my A-D I'm going to have to pick one end that has much crappier resolution.