### Author Topic: Photoresistors divider circuit on 50\$ robot  (Read 603 times)

0 Members and 1 Guest are viewing this topic.

#### garriwilson

• Supreme Robot
• Posts: 345
##### Photoresistors divider circuit on 50\$ robot
« 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
« Last Edit: October 11, 2013, 08:50:09 PM by garriwilson »

#### jwatte

• Supreme Robot
• Posts: 1,345
##### Re: Photoresistors divider circuit on 50\$ robot
« Reply #1 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.

• Jr. Member
• Posts: 44