Monday, May 2, 2011

how to connect a LDR

A photoresistor is a sensor whose resistance varies with light intensity. Most decrease in resistance as the light intensity increases. In a typical microcontroller application, this resistance must be converted to a voltage so that an A2D converter can measure it. The easiest way to do this is with a voltage divider circuit.

A voltage divider is just two resistors in series connected between a voltage supply and ground. If R1 is connected to the voltage supply and R2 is connected to ground then the voltage at the junction between the two resistors is:

Voltage divider equation derived from Ohm

If R1 is the photoresistor, the voltage will increase with increasing light intensity. If R2 is the photoresistor, the voltage will decrease with increasing light intensity.

Example Photoresistor circuit that uses a voltage divider.
Sample Photoresistor Circuit

No comments:

Post a Comment