Author Topic: $50 Robot - So close... Need sensor adjustment?  (Read 1587 times)

0 Members and 1 Guest are viewing this topic.

Offline jaabotTopic starter

  • Full Member
  • ***
  • Posts: 52
  • Helpful? 0
$50 Robot - So close... Need sensor adjustment?
« on: May 24, 2009, 09:41:02 PM »
Hello folks:

So, I have posted several times as my son and I have completed our $50 Robot. We have solved soldering problems, voltage regulator problems, servo modifications issues, and a few others. Thanks to all of the help on this forum, we now have a working robot... almost.

He (it) works. It drives along and does react to light on the sensors, which does change the direction of the wheels. So technically from my understanding of what he is supposed to do, it is working. However, we need sensor adjustment of some kind, because the robot just drives forward indefinitely unless I put my hand over a sensor to completely cover it. And even then this is not always fool-proof. I took a video to show you guys. Then it dawned on me to try more light instead of less light.

So I shot a second video and this time used a flashlight. If I shine the flashlight on the sensor, the robot changes direction. Cool. This is progress. So now I was wondering, how do we change the sensitivity of the sensor input so that we get the same results without a flashlight? Is there something we can do in the code?

[youtube]http://www.youtube.com/watch?v=eZHcDYMlswM[/youtube]

Thanks very much.

Offline offy

  • Supreme Robot
  • *****
  • Posts: 340
  • Helpful? 1
Re: $50 Robot - So close... Need sensor adjustment?
« Reply #1 on: May 24, 2009, 10:11:17 PM »
The code for the $50 robot is to stay in light.

Can you post your code so I can see it?

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: $50 Robot - So close... Need sensor adjustment?
« Reply #2 on: May 25, 2009, 01:04:08 AM »
mess around with a few of the values for the sensors and see if that changes anything.
Howdy

Offline Canabots

  • Contest Winner
  • Robot Overlord
  • ****
  • Posts: 245
  • Helpful? 6
  • It's not a bug, it's a feature!
Re: $50 Robot - So close... Need sensor adjustment?
« Reply #3 on: May 25, 2009, 04:17:49 AM »
What you may want to consider doing is change the set value that the sensor compares its data with (I believe in your code, if you got it off the site, this variable is called "threshold") The lower the value means the more often the robot will turn towards a brighter area. The higher the value, the more likely the robot is to move straight because there's a higher chance that both sensors are equal to the threshold...or something like that...

Just experiment with the values and let us know.
My robotics, electronics, software, or other stuff blog:
www.saltech.wordpress.com

Offline jaabotTopic starter

  • Full Member
  • ***
  • Posts: 52
  • Helpful? 0
Re: $50 Robot - So close... Need sensor adjustment?
« Reply #4 on: May 26, 2009, 08:32:12 AM »
Hi folks:

Thanks for the replies. At the moment I am using Admin's code, unmodified. I will do as you suggest and play around with the values and let you know how it goes. Thanks.

Offline jaabotTopic starter

  • Full Member
  • ***
  • Posts: 52
  • Helpful? 0
Re: $50 Robot - So close... Need sensor adjustment?
« Reply #5 on: May 26, 2009, 08:45:57 PM »
Success! In the declare variables section, I adjusted the "threshold" a few times and finally settled on a value of 3. It now moves around on its own and reacts to darker areas by moving back into the light! Cool! I also physically adjusted the sensors to point down a little more so they are about 45 degrees from the floor. This seemed to help as well.

Thanks again for everyone's help. Looks like we have successfully completed our first robot! I will post some pictures and a video in a day or two.

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: $50 Robot - So close... Need sensor adjustment?
« Reply #6 on: May 27, 2009, 12:29:17 AM »
this seems to be one of the most common things people have to adjust for their $50 robots...
and we cant wait for pics ;D
Howdy

Offline jaabotTopic starter

  • Full Member
  • ***
  • Posts: 52
  • Helpful? 0
Re: $50 Robot - So close... Need sensor adjustment?
« Reply #7 on: May 28, 2009, 10:29:22 PM »
I posted some pictures. I created a new post:

http://www.societyofrobots.com/robotforum/index.php?topic=8051.0

Thanks again for all the help.

 


Get Your Ad Here