westaust55
Moderator
Some information that may be useful to others who decide to experiment with Light Dependant resistors.
I was curious about the variation in the value of the resistor to put in series with an LDR as shown in various PICAXE documents.
PICAXE manual 1 on page 59 shows a 10 KOhm resistor as does AXE050 and AXE092 datasheets.
PICAXE manual 3 on page 28 shows a 100 kOhm resistor.
Being one to try and optimise such things for the best resolution, I started out to see what might best suit my LDR to maximise the voltage range into the analogue input of a PICAXE and have gone a bit further looking at data for several readily available LDR’s being sold here in Australia. Turns out that my own sample is out of spec but to my advantage. Most LDR’s have a fair range of ohmic values for maximum light conditions.
It turns out that based upon the published data, the optimal value for the external series resistor can vary dramatically from 33 kOhm through to 1.2 MOhm with a 2 to 1 ratio for a given LDR depending upon what the LDR’s resistance value is under bight/light conditions.
While for some models of LDR, a 100 kOhm resistor will only result in a small drop in the voltage input range, at least one type of LDR will result in a 21% to 38% reduction in input voltage range to the PICAXE with a 100kOhm resistor and up to 72% drop in available range if the frequently suggested 10 kOhm resistor is used.
Attached is a table I have prepared showing the available analogue input voltage range (as a percentage of the supply voltage – 5Vdc) for some available LDR’s and the effect of various series resistors.
In summary, it is worth measuring the resistance range of your LDR and selecting a series resistor to get the maximum possible voltage range into your PICAXE.
I was curious about the variation in the value of the resistor to put in series with an LDR as shown in various PICAXE documents.
PICAXE manual 1 on page 59 shows a 10 KOhm resistor as does AXE050 and AXE092 datasheets.
PICAXE manual 3 on page 28 shows a 100 kOhm resistor.
Being one to try and optimise such things for the best resolution, I started out to see what might best suit my LDR to maximise the voltage range into the analogue input of a PICAXE and have gone a bit further looking at data for several readily available LDR’s being sold here in Australia. Turns out that my own sample is out of spec but to my advantage. Most LDR’s have a fair range of ohmic values for maximum light conditions.
It turns out that based upon the published data, the optimal value for the external series resistor can vary dramatically from 33 kOhm through to 1.2 MOhm with a 2 to 1 ratio for a given LDR depending upon what the LDR’s resistance value is under bight/light conditions.
While for some models of LDR, a 100 kOhm resistor will only result in a small drop in the voltage input range, at least one type of LDR will result in a 21% to 38% reduction in input voltage range to the PICAXE with a 100kOhm resistor and up to 72% drop in available range if the frequently suggested 10 kOhm resistor is used.
Attached is a table I have prepared showing the available analogue input voltage range (as a percentage of the supply voltage – 5Vdc) for some available LDR’s and the effect of various series resistors.
In summary, it is worth measuring the resistance range of your LDR and selecting a series resistor to get the maximum possible voltage range into your PICAXE.
Attachments
-
81.1 KB Views: 96