Let's Make Robots!

Raspberry driven TB-2? Or better RPI-TB-2

Drives around controlled by a web interface and streams video
AttachmentSize
tiny_driver.tar.gz8.58 KB

Hey all,

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:

  1. Wanted to test my tracked base 
  2. Wanted to make use of the PI 
  3. Intending to add some form of autonomous navigation based on webcam ... someday

The mechanichs is the same as TB-2 not much else to add except it's printed properly this time (blog here) :D

From TB-X

 

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.

From TB-X

On the Pi usb port I have a Logitech webcam and an old ugly wifi dongle. 

 

From TB-X

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.

 

From TB-X

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

 

Comment viewing options

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

Thanks very much for pointing me in the right direction!

Oh, This is cool! I will be following your progress on this. Pi is very promising to me :) Keep us posted, man!

How about combined audio and video streaming ?

... with ffmpeg however it wasn't my target. The noise from the tracked base would probably be the only  thing you would  get  anyways :-) 

Genius Tinhead! I haven't get my Pi to work on any bots yet. Nice job!

One thing always want to ask you. On your track what kind of rod or shaft you use to link them up? They won't fall off after while?

With little pieces of 1.7 pla filament but I guess anything would do . They could fall out but the idler wheels push them in.

You Da Man dude!

Very interested in this :) I have a raspberry pi waiting to be mounted on top of a robot. I'm especially interested in getting it to work with a cheap webcam and wifi dongle.

For the purposes of getting a quick video an ethernet cable might do the job, you just won't be able to get very far.