In this piece, we are going to build a practical circuit with the Light Dependent Resistor. Recalling, the LDR, we know its resistance, is dependent on the intensity of light incident on it. It has a very high resistance when there is NO or LOW light incident on it and it has low resistance when more light is incident on it.
It is this property of it which we are going to harness to create something magical for ourselves.
So we are going to build a simple light sensing system which is going to read our environment’s light intensity and later Toggle an LED high or low depending on the light intensity of the surrounding.
But just the LDR cant do this magic, we are also going to harness a marvelous behavior of the voltage division to create something spectacular.
Why voltage division?
When you have a voltage divider circuit consisting of just two resistors of the same value like in the schematic on the right, we know that both resistors will have the same voltage drop across them. True or not true?
But we also realize that, if the resistors are of different resistances, there will be surely more voltage drop across the big resistor than the small. That’s very true and can be proven by ohm’s law: V=IR.
Now see this, if the value of one of the resistors is kept constant and the other is varied such that at a point in time, it has more resistance than the fixed resistor and another time it has less resistance than the fixed resistor, you will also find out that the voltage drop across them will be changing as their resistances change. The only property that remains constant is the fact that, “at any time ‘t’ the resistor with the highest resistance has more voltage drop across it. “
And it is this property that we need. Now lets put the pieces together to make some sense. The LDR is going to be our variable resistor, such that, when there is low or no light, it will have more resistance, and hence more voltage drop across it than the fixed resistor. And when there is enough light on it, it will have less resistance and less voltage drop across it.
The objective Logic.
The logic we want to have at the end of the day is this;
when there is no light——-we want to command an LED to come alive. (HIGH).
A question to ask yourself now is, when there is no or low light, which resistor has more voltage drop across it? surely the LDR. And so we are going to connect our load (the LED) across the LDR, thus in parallel with the LDR. So the fate of the LED will always be decided by the LDR.
And on the other side, when there is enough light, the LDR will decrease in resistance and hence decrease in voltage. Now if the voltage drop across the LDR is too small the LED will also not get the required voltage to stay on and will surely go off.
Lets move on to build it real to understand more.
A bread board
A few jumper wires
Your voltage source
An LED of choice
As usual, get your bread board in place with your voltage source connected to the power rails.
Firstly, construct a voltage divider circuit with your LDR and the fixed resistor as in the schematics.
One leg of the fixed resistor goes to positive of the voltage source and the other leg connects to the LDR.
The other leg of the LDR is then grounded to make a complete loop.
Your voltage divider is ready!
So as we learnt earlier on, the LDR will have more voltage dropped across it when it is dark. Hence when it is dark and we want an LED to be lit, that LED will have to tap its voltage source from the LDR.
Connect your LED in parallel to the LDR and see the magic.
The value of the fixed resistor
Depending on the environment you find yourself in and also depending on how sensitive you want your system to be to light, the value of the fixed resistor may change. But you can find a suitable value by using an approach am going to explain here:
Lets take just one condition, thus, at night.
The first assumption is, at night, the LDR will reach its maximum resistance, let that resistance be “y”. Most LDRs can reach 1Megaohm.
If your source voltage is 9V, then about 8V will be across your LED at this time. And hence 1V across the fixed resistor. Let the value of the fixed resistor be “x”.
From the voltage divider rule you can calculate for the value of “x” in 1=9x/(x+y). where “1” is the voltage drop across the resistor during the night condition and “9” is the value of your voltage source.