Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: garriwilson on October 11, 2013, 08:44:47 PM

Title: Photoresistors divider circuit on 50$ robot
Post by: garriwilson on October 11, 2013, 08:44:47 PM
Hey, quick question.

The tutorial suggests calculating the resistance value based on R_dark and R_bright. Is that derived formula (sqrt(R_dark*R_bright)) just an optimization? In other words, if I used a resistor value that didn't exactly match up, would that just decrease the effective voltage range that the microcontroller can pick up from the photoresistors?

I am asking this because I don't have a multimeter available. Can someone just give me intuition to what would be the repercussions of using say a 1 kohm resistor or 3 kohm resistor, if your calculated R value was for example 2 kohm? In my mind the 2kohm would be optimal, but 1 kohm and 3 kohm would work, but less effectively.

Correct me if I'm wrong and thanks for your time.

EDIT: here's the page I'm referring to: http://societyofrobots.com/schematics_photoresistor.shtml (http://societyofrobots.com/schematics_photoresistor.shtml)
Title: Re: Photoresistors divider circuit on 50$ robot
Post by: jwatte on October 11, 2013, 09:05:07 PM
If your resistor is too small, then the photoresistor will not be able to "pull down" the voltage, and your readings will mostly be in the higher range of the voltage spectrum. If the resistor is too large, then the photoresistor will pull down the voltage too easily, and the readings will mostly be in the lower range of the voltage spectrum. This may or may not be a problem depending on how good resolution your ADC input has that reads the voltage. (A typical AVR with 8-10 bits would prefer a well matched range.)

The formula on the page gives a resistor value that gives Vout approximately at half when in a mid-amount of light.
Title: Re: Photoresistors divider circuit on 50$ robot
Post by: Roman505 on October 11, 2013, 10:26:24 PM
In my opinion for what it's worth and and all that sort of thing, the cheapest multimeter is better than no multimeter. A few dollars or pounds or euros gets a functional unit new, and you can probably find a perfectly good discarded dial type for less than one major unit in your currency at a recycling or 2nd hand shop.