RoombaRobot
From
Credits
- Peterbjornx: Hardware, (most) software
- Jurjen: Helping out with the video link, offering his laptop to be used in this project
Goal
The goal for this project is to have a nice and extensible robot platform, which can be used for future projects.
Main Features
- Differential steering
- Rotatable camera
- 4*16 Alphanumerical LCD (Not in current version)
- Arduino based HW control
- Controlled from a Linux powered laptop
Parts
- Roomba without mainboard
- Arduino Uno (At the moment just provides a serial motor and LCD interface)
- Laptop
- 2 Servo's for camera rotation
- USB webcam with illumination
- 4x16 Alphanumerical LCD (Not in current version)
- Cordless drill battery
- Dual h-bridge motor driver:
- 4 IRF530 FET's
- 4 IRF9530 FET's
- 4 BC547 BJT's
- 4 BC557 BJT's
- 8 100 Ohm resistors
- 8 10k resistors
- 4 33k resistors
- 4 47k resistors
- 8 1N4001 diodes
- Temporarily: control PC
- Linux based workstation
- USB Joystick ( preferrably with dpad ON the main stick)
Todo list
- Get feedback from gearbox speed sensors
- Add kinect
Schematic
The schematic i based the motor driver on (i only used different transistors and FET's): I have hardwired the switches on that schematic to two wires per H-Bridge [1]
The Arduino and webcam are linked to the onboard laptop via USB. The laptop is controlled over a raw TCP link and the video feed is done via gstreamer.
Code
Arduino source: [2]
Java source: [3]
You also need http://sourceforge.net/projects/javajoystick/ for the java control example
The message format for the serial/TCP link is c [motor 1] [motor 2] [servo 1] [servo 2]
(Note: there has to be a trailing space)
Motor values :
Stop-Fast 128-255 : Forward 0-127 : Reverse That means 128 = 0 = stop
ser2net server commandline: (On robot laptop)
ser2net -d -C 1337:raw:0:/dev/ttyACM0
gstreamer server commandline: (On robot laptop)
gst-launch v4l2src ! video/x-raw-yuv,width=640,height=480,framerate=\(fraction\)5/1 ! ffmpegcolorspace \ ! jpegenc ! multipartmux ! tcpserversink host=[your robot laptop's IP] port=5000
gstreamer client commandline: (On video viewing PC)
gst-launch-0.10 tcpclientsrc host=[your robot laptop's IP] port=5000 ! multipartdemux ! jpegdec ! autovideosink
Pictures
Before the laptop was added to the robot:
Youtube Video: