# Society of Robots - Robot Forum

## Electronics => Electronics => Topic started by: pomprocker on March 10, 2008, 01:19:57 AM

Title: \$50 robot photoresister question
Post by: pomprocker on March 10, 2008, 01:19:57 AM
I just used the photoresisters that were listed in the parts like which were 1.62k I believe. I didn't actually do the math that was in the photoresister tutorial. Now when I put the robot in the kitchen where there is light everywhere it just keeps going in circles, it does not go straight. Is this normal?
Title: Re: \$50 robot photoresister question
Post by: goatfish on March 10, 2008, 02:14:38 AM
i am really sorry ,but i just laugeh when i read thsi,god-dammit now thats gonna happen to me lol.maybe the photoresistors dont thave the same resistance and makes the robot confused ;D
Title: Re: \$50 robot photoresister question
Post by: pomprocker on March 10, 2008, 02:50:11 AM
I built this guy out of the cardboard box that the digikey parts came in  :)

I went with the KISS principle for the first time robot here. I will improve on it and upgrade it as I am able to.

This was a lot of fun  ;D

(http://a996.ac-images.myspacecdn.com/images01/103/l_9ac22904b74f220c84435dae92bdf333.jpg)
Title: Re: \$50 robot photoresister question
Post by: pomprocker on March 11, 2008, 02:02:47 AM
anyone have an answer for my first post here?
Title: Re: \$50 robot photoresister question
Post by: airman00 on March 12, 2008, 06:49:11 AM
hmmm

the only thing I could think is wrong is that the photoresistors are not the same values

maybe you should play around with the fudge factor , or the balancing factor.

What the fudge factor is is the amount of accpetable difference. Like say one photoresistor has a value of 12 and the other ahs 22 under the same light.

So a fudge factor of + - 10 will say if the values are within 10 from each other , they are considered equal , so 12 and 22 are considered the same.
Title: Re: \$50 robot photoresister question
Post by: superchiku on March 12, 2008, 08:46:00 AM
take a look at the fudge factor and the 50\$ robot's resistance value was based on the admins's calculated values

urs may be different so u should have calculated it...

also photoresistor may be cheap but certainly not the best try to use IR or other sensors like sonar etc on ur bot
Title: Re: \$50 robot photoresister question
Post by: pomprocker on March 12, 2008, 10:58:53 AM
I haven't learned how to implement IR or Sonar yet  :'(
Title: Re: \$50 robot photoresister question
Post by: airman00 on March 12, 2008, 05:24:59 PM
@superchiku

He is using  photoresistors to detect light levels not for obstacle avoidance

@pomprocker

Title: Re: \$50 robot photoresister question
Post by: pomprocker on March 12, 2008, 05:30:55 PM
haven't gotten a chance to play with it yet, im pretty busy during the week.

I don't know how to play with the "fudge factor" anyway.
Title: Re: \$50 robot photoresister question
Post by: ed1380 on March 12, 2008, 08:12:01 PM
Ive had the same problem. for a long time i thought my servo was mesed up while i was modding it, cause i resoldered the pot for sore resistors.

how would we go about changing thing fudge factor. what is it called in the source code?
Title: Re: \$50 robot photoresister question
Post by: Admin on March 15, 2008, 06:33:53 PM
So lets say the left photoresistor reads 10 points lower than the right even in the same exact light.

This means the left pr needs some fudging . . .

Code: [Select]
`int fudge_factor=10;//left pr is whack, 10 points too lowleft_photoresistor = adc(0) + fudge_factor;//read value and fudge it upeat_fudge();//mmmm, robots like to eat fudge!`
Title: Re: \$50 robot photoresister question
Post by: airman00 on March 15, 2008, 08:19:38 PM
So lets say the left photoresistor reads 10 points lower than the right even in the same exact light.

This means the left pr needs some fudging . . .

Code: [Select]
`int fudge_factor=10;//left pr is whack, 10 points too lowleft_photoresistor = adc(0) + fudge_factor;//read value and fudge it upeat_fudge();//mmmm, robots like to eat fudge!`

I actually made up my own word for fudging it. I call it sensor biasing.