Let's Make Robots!

Duck Pie

Navigate via ultrasound

My first robot. A crudely built clone of the start here robot using a raspberry pi and an HC-SR04 ultrasound sensor. A friend named it when I mentioned that I had used the Duck branded duct tape to stick so much of it together. He put duck and raspberry pi together in a somewhat poor pun.

It was intended to have a servo to pan the sensor, but I was having a bit of difficulty with the narrow angle, I may add the servo with only the abilities to look forwards and left rather than right aswell. For now instead of the traditional start here robot pan sensor the robot itself spins on the spot taking sensor measurements as it goes, it just stops when it likes. The sensor appears to have a few issues with accuracy when I have the motors present, remove the motors and its fine, going to have to chuck some caps in I think. Looking at the screen when my video ended there was a false entry for a distance of 2cm which was probably motor interference, otherwise the program does indeed stop when I wave my hand 10cm infront of the sensor (easy method to stop a runaway bot)

We have 2 motors with traditional differential drive and something not so clear from the main picture is that I built a caster wheel from lego at the back. 2 CD's taped back to back and a pencil across the bottom make up the main chassis. I'm using a raspberry pi with raspbian, python and the excellent RPIO module for control. Full code as it *currently* stands is here:http://pastebin.com/WEBsrC7b I have a 6xAA battery holder on a very slow boat to the UK from hong kong, but thats what happens when you spend £2 including shipping. Until then the robot isnt going very far. In the testing video above it is running from 2 mains > USB adaptors, 1 with a micro USB cable for the pi, the other has a USB > TTL serial cable plugged in which just happens to break 5V, Tx, Rx and GND into 4 female jumpers, this I use for the motors, probably not the best idea but the cable still seems to work and the motors turn so I'm happy enough.

Tomorrow I hope to get some more pictures up for you (I know you guys - and myself - dislike posts with only 1 pic)

Special thanks to jscottb for very generously donating parts which at the moment I cannot afford to obtain myself.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Great start, keep it up!

very nice

 

Congrats :D (now I to search for my next long time lurker - but no robot yet victim to harass :P )

 

I'm curious... what's that little thing sticking out on the back that looks like a steering wheel?

That would happen to be a Lego technic steering wheel piece. Its part of my caster wheel. I've been busy today but when I find some spare time I will take some photos, might make the caster wheel more obvious.

Looks cool. Well done :)

I might give the RPIO library a try. I'm not sure what the difference is between it and RPi.GPIO, now that they both have software PWM for all pins, though.

Looks like it's made out of a CD, so if you add a second sensor, you can enter it in the Jameco coaster bot contest.

Well, I have some micro switches, bumper sensors?

 

But yeah, its 2 blank CD's taped together, 1 on its own was too bendy, still bends now but there is more flex from the tape on the motors than there is from the CD itself so it will do, alleviated some of the stress by taping a pencil between the 2 motors.