Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: silent069 on June 11, 2008, 11:25:13 AM
-
Hey all, im currently working on my 50$ robot and I have a quick and easy question for you guys. Im currently testing my Photoresistors so i can determine which resistors i would need. I have my multi meter set to 20k ohms ( seems to be the smallest setting that gives a reading) and i get numbers around 4.00 to 18.00 +- Im just on my lunch break right now, but was wondering if you guys could give me a little insight on what to do here. So lets say my minumum is 4 and my max is 18 for the equaion... Do i need to multiply these 2 numbers by anything before i stick them into this equation. resistor = sqrt(R_dark*R_bright)
If you could give me an example of how to get my numbers that would be much appreciated.
Thanks in advance,
-
if you read 4k (in the light) and 18k (in the dark) a 10k resistor would be ok: greater enough than 4k and smaller enough than 18k.
all you want to do is having a good voltage partitioning on each case (dark or light).
suppose you are working in the dark and that you connect photoresistor to ground and normal resistor to power supply. of course you read with the adc the voltage in the middle of the serie.
you will have V(ADC) = VDD * PH / (PH + R) = VDD * 4 / (4+10) = VDD * 2/7 < VDD / 2
while if you work in the sun:
V(ADC) = VDD * PH / (PH + R) = VDD * 18 / (10 + 18) = VDD * 9/14 > VDD / 2 (not very good indeed... maybe move theshold a little bit down)
actually a R value of 8-9k would be even better... try these simple calculation to maximize differences between readen value and VDD / 2 (or the treshold you prefer).
by the way, I guess $50 robot works in differential mode... so you don't have precise treshold: all you want to do is to detect which photoresistor is more enlighted... then a 10k Ohm resistor would be perfect...
-
awesom, thanks for the help guys, ill let ya know how it turns out!