Raspberry driven TB-2? Or better RPI-TB-2
I finish building this about 2 weekends ago but I never got to actually post it so here it is: Raspberry Pi tracked bot or short RPI-TB-2 :)
Built this one for several reasons:
- Wanted to test my tracked base
- Wanted to make use of the PI
- Intending to add some form of autonomous navigation based on webcam ... someday
The electronics consists of a Raspberry and a custom driver I have build for the olde C.R.A.B which was never the same after seeing Berlin. The driver consists of an ATTiny2313 and a L293. The tiny listens for commands over I2C and controls the motors based on them. Five commands can be sent currently for left,right,forward,backward,stop.
On thing I had to workaround is the level shifting for i2c from 3.3v on Pi to 5v on tiny. I have found this on the arduino playground, and tryed the simple resistor hack. I works great.
On the Pi usb port I have a Logitech webcam and an old ugly wifi dongle.
The Pi is great but it is also power hungry drawing about 700mA by itself, add to that the usb devices and you get around 1 A just for the brainz. This is a bit on the high side for the 7805 regulator causing it to heat up considerably (read burning fingers).
So to solve that I have split the load, on regulator for the Pi one for the USB. To power the usb I'm infusing 5V in the cable directly.
With that done I have all hardware powered.
Now on to software ... I could have used one of the linux distros already out there but most are very bloated, way too generic to be useful on a robot.
So I decided to build my own using Buildroot which is a linux filesystem and kernel build collection of scripts and make files. Somebody did this before me so all credits go there . After a few hours including configuration I had my little Linux all built, installed it on the SD card and booted the Pi. Success.
Next was to configure the kernel to have the needed drivers for my webcam and wifi dongle. Once that was done I had to hack some scripts into connecting the robot to my local network.
Next thing todo was to get the webcam streaming to the network. I used mjpg-streamer to do this.
Last was to create a little server which presents a webpage with the video stream and a form with buttons which send I2C commands when pushed. I wrote that in python ... it's really basic and security is inexistent.
I'm currently having issues with the stupid wifi dongle... it's completely unstable and most of the time the coonection drops. Because of this I never really got to actually do a video on it :/
Will have to find some other dongle or another way to connect.
Update - Think I fried the linears :/
The Pi needs power ... so I got 2 mini SBEC's to fix that ... coming near christmas probably.
Wifi is fixed though, found a post about adding a kernel parameter to fix it. Thanks for mogul, and the others hitting my stream while I was load testing :)
Update - Linears won't do? SBECS man :)
Ok so I got me SBECS from ebay.
Put the thing back together ... and had FrankNeon drive it around me house :) Video added :D