Obstacle-Avoiding Robot with a Personality!

 by RPisces
Featured
IMG_0926.JPG
IMG_0931.JPG
IMG_0933.JPG
Unlike most roaming 'bots, this one actually roams in such a way that it actually seems to be 'thinking'! With a BASIC Stamp microcontroller (Basic Atom, Parallax Basic Stamps, Coridium Stamp, etc.), a chassis of some kind, a few sensors, and some sophisticated code from this instructable, you can create a robot that will execute movements you never even programed into it!

Here's a video (it's kind-of low quality, but I'm working on that. (I am still trying to work out the part that it's too slow.)


 
Remove these adsRemove these ads by Signing Up

Step 1: The Sensors

The (name?)...Well, let's just call it Bob. Bob has five sensors

  • Ultrasonic Rangefinder (aka "sonar")
  • 2 Sharp GP2D12 IR Sensors
  • 1 Standard IR Assembly (more on this later)
  • 1 CdS (Cadmium Sulphide) Photocell

The ultrasonic rangefinder helps Bob see obstacles that are right in front of him; they also tell him what distance the object is from him. This can be obtained from many sources. You can find them from (Parallax ; they call it the "Ping)))"), Acroname, HVW Technologies, and so many more sites. No matter where you go to find them, they all cost about the same (~ $30). The two IR sensors made by Sharp are very easy to use when used for simple object detection as in this case. You can get them at may online stores, such as the ones listed above. They help Bob see obstacles that the ultrasonic rangefinder can't; obstacles that are coming too close to the sides of the chasis. They cost about $12 to $15 depending on where you get them. The "IR assembly" I made myself; see step 2 for assembly. The CdS Photocell (or light-variable resistor, whatever your preference) is for detecting changes in ambient lighting. Bob uses them to know when he's in a dark or light room.

If anyone who has prior experience with any of the Sharp IR rangers, FYI, they are not being used for actual distance measurement in this robot. I do not have an ADC (Analog-to-Digital Converter), neither do I know how to use them that way. They are simply providing a HIGH or LOW signal to the BS2 microcontroller.

The datasheets for the Sharp IR's as well as the Ping))) sensor can be found on the net, but if you're lazy like me, you can scroll down a little further an there they are!
tzq33tdq says: Oct 18, 2010. 4:44 PM
do you know how much this costs? and were do i get the stuff to build it with?
This is awesome and please answer my questions.
willrandship says: Dec 22, 2009. 4:07 PM
This could, thanks to the sonar being used, theoretically be used to map places out, removing the necessity of a manual map-out of areas. This could be implemented in such things as automatic vacuums and such! The robot goes out to map the area, determines the best area covering and sets out on its mission. Coming upon an obstacle, it could update its maps, and hence never need user input!
LinemenOwn says: Oct 31, 2009. 1:21 PM
In step 4, what is the VDD voltage needed for the IR Detector?
RPisces (author) in reply to LinemenOwnOct 31, 2009. 9:15 PM
5v
miketwo says: Oct 22, 2009. 9:31 AM
That's a really cute robot.  The startup chirp is the best.
omega9o says: Aug 17, 2009. 12:30 PM
to make it move faster remove the 100 milisec pause in the ping coding
RPisces (author) in reply to omega9oAug 18, 2009. 11:13 AM
...and I WOULD, except that that delay is required to wait for the ping sensor to refresh; without it, the sensor would not function properly because it is being polled too often.
airyna says: Jul 30, 2009. 10:05 AM
why does the source code have an error....got error on string when i run it using the Matlab
kenny789 says: May 8, 2008. 2:39 PM
were do you get the mini bread boards they look really useful or did you jsut but the boe on the robot
RPisces (author) in reply to kenny789May 8, 2008. 5:56 PM
I get those at Radioshack.
kenny789 in reply to RPiscesMay 8, 2008. 6:14 PM
but theres no radioshack in candda :( only the crappy source witch dosent sell electonics
thepelton in reply to kenny789Feb 18, 2009. 2:59 PM
American Science and Surplus has a lot of parts for robot building. Just Google them. Not sure what the dollarUS/dollarCA exchange rate is any more.
step23 says: Dec 4, 2007. 10:50 PM
hm... i want to build a robot, aswell but i dont' want to spend much money... so i guess my best bet would be to salvage parts from broken electronics... so where do i start and how much did this project cost you
godfreyandthandi in reply to step23Jan 12, 2009. 5:46 PM
you should try the $50 dollar robot on societyofrobots.com
RPisces (author) in reply to step23Dec 5, 2007. 3:56 PM
The whole thing cost me about $210
Evilthingamabober in reply to RPiscesJul 21, 2008. 7:32 PM
HEARTATTACK!!!!!!
will421 in reply to EvilthingamaboberJun 21, 2009. 7:04 PM
$999,999,999,999,999,999,999,999,999,999,999,999,999,999,99?
*Grabs chest* UGHHHHHHHHHH... *BANG*
thewoodcarver in reply to step23Dec 5, 2007. 9:45 AM
try this bookmy son found it useful in making robots some out of "found" parts ....motors from broken toys parts from a mouse etc.
kiss my donkey says: Oct 1, 2008. 5:35 PM
Nice looking forward to build P.S fry lock is awesome
koolgalforever says: Aug 23, 2008. 4:01 AM
please could u tel me the range of the CdS photocell u've used...
RPisces (author) says: Jun 25, 2008. 6:25 PM
**UPDATE** 'BOB V2.0' soon to come! BOB V2.0 will have hearing, extra brain power (master-slave) so he doesn't 'jerk-crawl' anymore, more stamina, sensors, and more advanced behavior! Keep your eyes open...
RPisces (author) in reply to RPiscesJul 7, 2008. 6:41 PM
Woow. I just did the math on power consumption for the new power setup I'm using for 'BOB V2.0', and it's pretty striking. 'BOB 2.0' is going to need a switching regulator, because with 19.2V worth of rechargeables, and at least 250ma max current draw, that comes out to at least 3.55W power loss! I could have cooked an egg on that linear VR!!!
Da_Fudge says: Dec 4, 2007. 10:46 PM
This is absolutely awesome! Is that just a aluminium base? looks really cool! Plus from me.
RPisces (author) in reply to Da_FudgeJun 25, 2008. 6:20 PM
Yes, that's an all aluminum base. Thanks!
sonic55575 says: May 29, 2008. 9:01 PM
looks kinda like WALL-E!
Brandon121233 says: May 5, 2008. 4:16 PM
Nice job, but I'm curious as to why you have it stop and go in a jerking motion?
RPisces (author) in reply to Brandon121233May 8, 2008. 5:55 PM
Well, that's due to the slow microcontroller. I have the Basic Stamp loaded up with soo much code, and it is polling so many sensors and doing so much math, that it is a bit of a burden for it. The microcontroller only does like 4,000 instructions per second, where as your average AVR does like 20 MIPS! (million instructions per second). That's why I DON'T use the BS2 anymore! If I were to use the Arduino (I'm sure you've heard of it) as the 'brain' for 'Bob', then it would go REALLY fast!
Brandon121233 in reply to RPiscesMay 8, 2008. 9:16 PM
Yeah my robot Walbot http://www.instructables.com/id/Make-a-wall-avoiding-Robot!/ uses the Arduino board, and it works great.
dbc1218 says: Dec 7, 2007. 5:30 PM
Get the ServoPal from parallax or any servo controller, then you won't have to send the pulses to the servo every 20 or so milliseconds. Then it will run smooth and not jerk.
RPisces (author) in reply to dbc1218May 8, 2008. 5:58 PM
Yeah, but I don't believe in spending a crapload of money for some part that helps the handicap of a $50 microcontroller when I could purchase a $3 AVR chip that does three times as much as the BASIC Stamps, and is ***5,000*** times faster than the BS2 (and yes, it's that much faster)! Thanks for the info, though.
backcountry says: Dec 5, 2007. 10:45 AM
Here's video of an obstacle avoiding robot I made that uses no microcontroller, no programming, and only a single 9v battery. 2 distance sensors, 2 relays, 2 transistors, and a resistors/capacitors/diodes is all it takes.
http://youtube.com/watch?v=zW1pwJyjOVI
http://youtube.com/watch?v=szJ0eleTgSk

sunithaya in reply to backcountryDec 7, 2007. 6:49 AM
Great job on this one. The speed is impressive. How about posting an instructable on it?
Brennn10 says: Dec 6, 2007. 5:33 AM
That is really great, nice job!
Jr Hacking kid says: Dec 5, 2007. 7:44 PM
hay i have that thats called the boe bot right? boe bot stand for 'borad of education bot'
killerjackalope says: Dec 5, 2007. 3:26 AM
if you give it a suicidal oersonality does it still avoid walls or does that only affect the drop off sensors
GorillazMiko says: Dec 4, 2007. 9:03 PM
cool! you must be really smart to make something like this, unlike me, haha.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!