Let's Make Robots!

Quab

Object Avoidance
AttachmentSize
quab.bas2.88 KB

Update 3/27: Per request, I've attached the code I used for this guy.

--------------------------------

This is my next little object-avoider, made from spare parts from around the house. I actually made this guy a while ago, but I wanted to try to program a fun personality for it. Since that never happened, I'll just post it and move on.

Parts: Since the bot is powered by low-torque pager motors (yes, with pepsi caps for wheels), the body needed to be lightweight. So i made it out of some old CD cases. I accidentally stepped on the plastic partway through the process, so I ended up with lots of little plastic parts. no biggie; now the shell is just made from lots of little parts. The buck-teeth are made from an outlet cover.

This project also used my first robot part ever: my picaxe project board. While creating my own "Start Here F-type" robot, I accidentally soldered the A/B motor ports into oblivion. So as you can see, I bypassed them, and soldered pins directly to the motor driver chip outs. the rest of the chip is plugged into the board.

Code: I haven't had much success with servos, so I wanted to make an object avoider that didn't use one. To avoid getting snagged on the "blind spots"to either side of the sonar sensor, I made it wiggle from side to side as it moves forward. (I noticed that crabs, who can't move their heads, do the same thing). The goal was to make the bumper switches unnecessary. 

Instead of programming "turn left / turn right" subroutines, i made a single "turn" that either went left or right based on a "direction" bit variable. The main loop then includes an "inc direction" line that toggles which way to go. That way I only have to say "go forward for X, then turn" instead of "go forward for x, turn left, go forward for x, turn right".

QUAB also has a speaker that beep-bop-boops one of dozens of little sounds when he encounters objects, in an effort to give him some personality. But there was a lot of background noise in the movie, so you'll have to take my word for it.

The top of the shell is taken from the same scrapped toy that provided my other bot's housing.quab_top.jpg

Looks tough, doesn't it? The treads are extra Tamiya treads from the infamous gearbox.

quab_front.jpg

I vant to avoid your object. blah!

quab_H.jpg

my jimmy-rigged h-bridge (blue wires).

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
I like the way it moves, and takes decisions very quickly!
Good job  ;)

I'm new to Robots and I wanted to ask if you could send me the code for that robot?

I think this robot would be a good starter-robot.

Thank you. 

Chances are if he sent you the code you wouldnt get the robot to work. Im not calling you dumb its just we have 2-3 new people a week with the same post and since they have little experience they have no idea what the code does and can't build a bot to match the code (doing it that way is difficult). Start small and work your way up. Use the START HERE link at the top of the page as a starter. We also have tutorials that will slowly introduce you to PICs and programming them.

Yes that's right. But anyway, I wouldn't just copy 'n' paste the code. I would experiment with coding too (to be honest, who would NOT do that?).

I suppose the code "tells" the motor what to do in what situation.

 

I didn't mean to be harsh its just in my experience with learning a new language or learning a new PIC it is far easier to write and build code as you learn than it is to read and tear code apart to test.

minimalist

compact

efficient

raw aestethic

 

this bot is what i LIKE

 

 

-i have rated it 5 star..... why i can not see the stars over my post?

 

Very nice crab-like aesthetic! Sometimes I'm into clean designed-looking robots, other times the Junkbot style suits me - in any case - it is the building that matters!

 

Nice video BTW. Looks like Quab is pretty good at avoiding obstacles. Looks to me like Quab has lots of personality!!

I really like the look of this little dude, gonna start saving my bottle tops ! Nice work.

hey man, Im failry new to picaxe and was looking over your code here.... why do you need a counter? (i.e. "Alpha") 

also, if I used a Sharp sensor instead, would I use "readadc" instead of "pulseout/ in"?