go_away

### Author Topic: 50\$ robot, photoresistors acting weird, please help!  (Read 1779 times)

0 Members and 1 Guest are viewing this topic.

#### ptraider

• Beginner
• Posts: 2
• Helpful? 0
##### 50\$ robot, photoresistors acting weird, please help!
« on: February 10, 2009, 06:21:22 AM »
Hi to all, I just finished my 50\$ robot, the robot works almost fine, let me explain: the robot will follow light but only when I point a lamp directly at the photoresistors, however when the robot enters a dark zone it continues straight and does not turn, at the begining I thought it was probably something wrong with the photoresistors, so I made another couple but the same thing happens. Then I thought may be there is too much light getting to the resistors from all different places, so I made two small cones wrapped them around the resistors so they get light from one direction, but nothing happens.
I am a beginer and I have no idea what else could be wrong, or what else could I try, or is it just a bunch of bad resistors, any suggestions are welcome, before I go can I also ask: What would the correct behavior of the robot be when you turn it on in total darkness? would it just move straight in any direction?

Thanks to all bye...

#### HyperNerd

• Robot Overlord
• Posts: 139
• Helpful? 5
• N3rd1n80r
##### Re: 50\$ robot, photoresistors acting weird, please help!
« Reply #1 on: February 10, 2009, 10:58:35 AM »
Hi ptraider,

When you compiled the code with AVR Studio, did you change any of the values in the Photovore_v1.c, most importantly the 'threshold' value at line 29? This could have an effect on the behaviour of the robot...
The default value is 8 and if that value was higher then there would be more chance of the robot going straight ahead, as there has to be more difference in the amount of light before the robot turns.

Quote
What would the correct behavior of the robot be when you turn it on in total darkness? would it just move straight in any direction?
The robot should drive straight ahead until it finds light on one side. Then it should turn towards the light.

Just had a thought... when the robot drives into the dark area, is it flat on eg.

DARK
---------------------------------------------------------------
^
LIGHT           [ROBOT]

Or is it at an angle like this:

/
DARK     /
/
/   LIGHT
/
/
/
/
/
/
/      ^
/  [ROBOT]
/
/

The robot will only turn if it is dark on ONE SIDE, but if it is dark on both sides, the robot will keep going straight.

If this still doesn't work, you could try bending the photoresistors outwards a bit, so the distance between them is greater.

Hope some of this helps you!

-HyperNerd
There are 10 types of people in the world - those who understand binary, and those who don't.

#### ptraider

• Beginner
• Posts: 2
• Helpful? 0
##### Re: 50\$ robot, photoresistors acting weird, please help!
« Reply #2 on: February 11, 2009, 12:14:52 PM »
Thanks HyperNerd, it is working fine now      I tryed lower values for the threshold, in the end I had to use a value of "1", isn't that weird. Anyway thanks a lot, next step the SHARP IR EDGE DETECTION.

Bye

#### Metal Slug 2

• Supreme Robot
• Posts: 333
• Helpful? 11
##### Re: 50\$ robot, photoresistors acting weird, please help!
« Reply #3 on: February 11, 2009, 02:41:45 PM »
The same thing happened to me.  I noticed that when my robot would perpendicularly cross a line from a lighted area to a dark area the robot would keep on moving foreward.  Its not really a problem though.

#### alllie

• Beginner
• Posts: 2
• Helpful? 0
##### Re: 50\$ robot, photoresistors acting weird, please help!
« Reply #4 on: February 11, 2009, 06:33:55 PM »
interesting...when i saw the youtube video of the photovore on the \$50 tutorial it seemed like it went into the dark fairly often but then always came back.

i haven't quite gotten the courage up to try it yet, still learning

#### Metal Slug 2

• Supreme Robot
• Posts: 333
• Helpful? 11
##### Re: 50\$ robot, photoresistors acting weird, please help!
« Reply #5 on: February 11, 2009, 09:36:48 PM »
Don't wait, try it now.   lol, I just jumped right in head first.  It may be confusing at times but you'll eventually get it.   The youtube vid is also kinda weird.  Based on the code, when both sensors read the same light value, the robot drives straight foreward, yet in the youtube vid Admins robot seems to go into the shadow and then turn out of it somehow even thought both sensors are under the same shadow... :-\hmmm...

#### HyperNerd

• Robot Overlord
• Posts: 139
• Helpful? 5
• N3rd1n80r
##### Re: 50\$ robot, photoresistors acting weird, please help!
« Reply #6 on: February 12, 2009, 10:52:09 AM »
Maybe it was secretly filmed with the r/c version
There are 10 types of people in the world - those who understand binary, and those who don't.

#### Admin

• Administrator
• Supreme Robot
• Posts: 11,665
• Helpful? 169
##### Re: 50\$ robot, photoresistors acting weird, please help!
« Reply #7 on: February 15, 2009, 06:10:40 AM »
Quote
when i saw the youtube video of the photovore on the \$50 tutorial it seemed like it went into the dark fairly often but then always came back.
Actually it never goes into the dark. The light was coming in through a window at an angle, not straight down through the roof. As such, although it drove on a shadow on the ground, the sensors were a few inches above the ground where the shadow did not exist.

Accusing admin of cheating with RC for a mere photovore, so little faith!

#### Metal Slug 2

• Supreme Robot
• Posts: 333
• Helpful? 11
##### Re: 50\$ robot, photoresistors acting weird, please help!
« Reply #8 on: February 15, 2009, 11:54:22 AM »
ahh, Touche.  That explains it, now i understand. Thanks.  (btw I didnt doubt that your robot was a fraud at anytime.)

Get Your Ad Here

data_list