Let's Make Robots!

Minimun circuit needed to ldr?

Okay so can i hook other end of ldr to adc input on 14M and other to Ground?
Or should i add something difficult circuitry? 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

You need to add a "pull-up resistor" as well. Check manual 3, it shows this clearly.

an LDR is simply a resistor that reacts to light.

if you run current into one side, what comes out the other side will be proportionate to the light falling into the sensor.
i think mcu pins measure the voltage applied to a pin to determine if it is high or low, or some analog value.

the easiest way to have an LDR effect voltage is to make a volt divider.
simply connect the LDR with a resistor in series between +v and ground, and draw a line from between them
into the mcu.

by changing the value of the resistor you can tweak the behavior a bit, and u may want to use a potentiometer instead
of a regular resistor for that reason.
also it can be helpfull to measure you LDR to see exactly what its range of resistance is to give you an idea of
what value resister/pot you need to get the right results.

google 'voltage divider' for some theory on it, and also lots of calculators u can use to figure out the value you need.