How to connect a light dependent resistor to a picaxe 28X1

vince086's picture

Hi,

I recently go a light dependent resistor 

http://194.201.138.187/epages/Store.storefront/?ObjectPath=/Shops/Store....

and i cant seem to figure out how to connect it to my picaxe28X1, would anybody here know how ???

Any help would be apreciated !!!!!

jka's picture

Try the manual.

vince086's picture

thanks, will see if that

thanks, will see if that helps
vince086's picture

tryed it but i am not able

tryed it but i am not able to figur out how to connect th LDR, would need to see a pic something more detailed
jklug80's picture

I would assume that one pin

I would assume that one pin goes to ground and the other to an input pin on your picaxe.
robologist's picture

LDR Description

That diagram on page 62 of the manual, has one lead of the LDR connected to +5 volts. The other lead of the LDR is connected to a 10 K resistor. The other lead of the 10K resistor is connected to ground. The connection between the 10k and the LDR has a wire that goes to your ADC input if the PICAxe. (ADC1 in the example code). THe example appears to also have LEDs attached to ouputs 0 and 4, to show what the ADC is reading.
vince086's picture

would the 10 K resistor be

would the 10 K resistor be 1/2 W  or 1/4 W ?

this site sells them for a good price so... http://www.futurlec.com/ValuePacks.shtml

yes

I have done exactly that, set up a voltage divider with an LDR and 10K resistor. It works fine for me and is quite easy to build on the end of the ribbon cable, which has connections to +5V and ground as well as the inputs.
vince086's picture

so, a 10K resistor would be

so, a 10K resistor would be : Brown, Black, Red ?
jka's picture

No, brown, black orange. 10K

No, brown, black orange. 10K = 10.000. The first two digits are determined by the first two rings, brown = 1, black = 0. The last ring is the multiplier, in this case 3, because 10^3=1000, and 3 is orange. See http://n1ofz.connares.org/resources/resistor_code.gif
OddBot's picture

Fritz and I were talking

Fritz and I were talking about this earlier with his FritzLDR.

LDR_vs_PHOTOTRANSISTOR.jpg

The diagram on the left is what you want. The resistor value doesn't have to be precise but will affect the sensitivity of your LDR. Some LDR's have a high range of resistance up to 1M or more some have lower values of resistance.  Measure it with it completely covered (dark resistance) and use a resistor of about half that value should give a good response.

rik's picture

completely dark measurement

It's not easy blacking out a sensitive LDR. I discovered that holding an LDR between thumb and index finger would not always give me the highest resistance. For my LDR tests (which I called "robot"), I made little black hoods from shrink tube. The opening in the bottom would let in too much light to make it really dark inside. I needed a second "source of shade", like a carton box placed over the whole breadboard.

8ik

vince086's picture

thank you,will try this once

thank you,

will try this once I find a 10K resistor, hope it works !!!!

thanks again  

resistor

What does the resistor do?
vince086's picture

I'm guessing limmit the

I'm guessing limmit the voltage going to the LDR
OddBot's picture

Resistor

The LDR is a light dependant resistor. when wired in series with another resistor it forms a voltage divider. When you connect your analog input between the LDR and the 10K resistor, the voltage at the analog input will be 5V divided by the total resistance of the two resistors multiplied by the value of the resistor connected to ground.

As the light causes the LDR to change, the voltage read by the analog input will change. If your LDR is connected to + and the 10K to negative then the more light, the higher the input. If you swap the resistors around then the more light, the lowere the input. In the Schematics the LDR is shown connected to positive so that more light equals a bigger value.

Comment viewing options

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