Buy from Farnell Buy from The Pi-Hut

Toast-E: chassis

Picture

The picture above is of the 'chasssis'. The part before I put a 'head' on it. For the motors I used 12V geared motors. These are suprisingly small but have full metal gears. Very power full especially the 50RPM ones (Slow, but powerfull) I found the motors for £7.80 but also for $4.50 albeit with two weeks waiting as they had to come from the US. The left and right motors are connected in parallel. For the motor insulation I used heat-shrink tube, but tape will do as well. Use tie-wraps to tie them to the board. Also shop around for the DC/DC converter to get a good price. You can use the Gertbot C or Python examples to control it. To set up the WIFI use a USB hub for the dongle keyboard and mouse. You must use a WIFI router which gives out the same IP address to the same mac address. To control it I start a remote shell over WIFI. The control program is all ASCII so I don't need to run X over WiFi.

Picture

Toast-E: complete

Picture

Toast-E:head

Picture

For the head movement I used again DC geared motors but slow ones (50rpm). Even that was too fast so I set the gertbot to run with a PWM of 30%. I made a small coupling where the two axles meet but a simple alternative is to solder the two axles together under 90 degrees. The ends of the axels are D-shaped which gives two small flat surfaces to solder on. I had to make one a bit longer and I used a M3 screw with the head cut-off for that. The crew is filed flat and soldered on flat bit of the axle.
Each motors has two endswitches which prevent it from moving beyond the mechanical limit. The gertbot takes care of stopping the motors whne they are activated which keeps the software simple. I had to put some RC filters on the end-stops as the noise of the motors would trigger the end-stop interrupt routine. I now plan to add filtering to the next version of the software.
The 'mouth' is build up from 7 LEDs in a set of 3+2+2. That allows it to smile and frown.
Picture Picture Picture Picture

Video streaming

Dom helped me with the video streaming. Low latency is essential if you have to move the robot and you have only the camera as orientation. Therefore we set up a camera server on the "camera" pi that other clients can connect to. This is the script: raspi-vid. On the "camera" pi, that script must be started after booting. To do that copy raspi-vid to /etc/init.d (requires 'sudo') and then type: 'cd /etc/init.d; sudo chmod +x raspi-vid; sudo update-rc.d raspi-vid defaults'

On the receing side Dom made a special hello-video version. Hello-video is a video debug program but it is very efficient for this and uses the Videocore hardware accelerator. hello_video.bin . This version accepts four arguments which tells it where to place the output window on the screen. To show the video you need to know the IP address of the "camera" pi. This is the command which then receives the video stream and shows it:
nc 192.168.0.101 5001 | ./hello_video.bin 0 0 640 360
192.168.0.101   is the IP address ofthe camera Pi       0 0 640 360 is the place on the screen where to display the video.

Software

This is the control program plus all the gertbot drivers plus the makefile. I think that the steering would be easier if the motor speed would be set to minimum (~25%) if only the left or right side is running. I leave that as exercise for the reader. As for all .tgz files on this website here are the instructions for unpacking.

Parts list

Not all parts are listed. e.g. for the 'mouth' LEDs you can use arbitrary LEDs. Also many parts can be obtained from various vendors. I only list the ones I used. A bit of searching might give you a better price or a shorter delivery time.
DC/DC converter (9V battery to 5V).
That one can do 1.5A so is sufficient to supply power to both the Pi and the Gertbot.
uk.farnell.com/....     uk.rs-online.com/....
Driver motors
4x: 12V geared motor ~200 RPM used for the wheels.    http://www.dx.com/....
Head motors
2x: 12V geared motor ~80 RPM used for the head movements     http://www.amazon.co.uk/....     http://www.dx.com/....
Head end-stop switches
These are the smallest I could find at short notice. Altough they work fine the lever material can not be soldered and is also difficult to glue (even with super glue)     uk.farnell.com/....
'eyes'
The 'eyes' are mode from an ultra sonic distance sensor: HC-SR04. I don't know where I bought mine but searching for that on the internet will give a few thousand hits.