I’ve made some excellent progress over the last week! The Robot is now independant, and it moves freely. I’ve written a simple shell script to take the following characters as control:
a – left
s – stop
d – right
w – forward
x – back
q – hard stop
k – turn anticlockwise
l – turn clockwise
This sends a single byte to the serial port. I am using 2xUSB to TTL converters which show up as
/dev/ttyUSB0 and /dev/ttyUSB. Each serial port controls two motors through the sabertooth controller. As we control two motors with only a byte, each motor has a 7 bit resolution from full reverse to full forward. For motor 1, 0 is stop, 1 is full forward, 64 is stop, 127 is full reverse. Motor 2 starts at 128 for full forward, 192 for stop, and 255 as full reverse. Although 7 bits of accuracy, speed changes only seem to occur at roughly 4 intervals, so we technically have about 32 different speeds, 14 forward, 2 stop, 14 reverse. We’re only using 3 speeds though as I can’t see the benefit in programming for any more right now.
The movement now seems to be working well. Smooth, controlled and straight which is something of a miracle
The battery is a 12V/7.2Ah sealed lead acid battery. With USB devices active, the board running and the processor 100% active, as well as peripheral fancy LEDs, digital outputs high, wifi active, etc, it uses 12v/800mA.
With all four motors moving at full speed, it uses 12v/6A. Seeing as the motors will be in action for short periods only, I would expect 6h+ battery life.
I have tested the sensors, and they are all working and reporting data except for the top back one which I’m going to have to investigate. Here are some more pictures:
Tags: digital output, espeak, Linux, Linux robot, motors, sensors, serial port, the robot, usb devices, usb sound, usb to serial, usb to ttl
I’ve been struggling to think of a good project to start on. I’m currently writing the APNIC Box series here, and I’m on part 4 of maybe 7 or 8 right now. I like to keep at least one personal project of interest on the go at a time so back to struggling for inspiration.. Feel free to tell me that this is an awful idea and suggest something else, but until I hear otherwise I’m going to roll with it.
Linux Robot – Requirements
Here’s what I’m thinking. Small embedded device, way smaller than the Mikrotik 532a used for the APNIC Box. The board will need USB [as we're going to use the 5v for charging later]. I’d like to start with a powerful enough board that it can be expanded later with relative ease.
The device will initially have few inputs and outputs. It will support miniPCI, USB, Serial Console, CF card, GPIO or some other good method for controlling a relay board and some motors. The device will have 4 small wheels, maybe rubber [old mouse] balls instead and some ultrasonic sensors, 4, 6 or 8.
(more…)
Tags: embedded, fm, Hardware, Linux, Linux robot, minipci, motor, oscillator, relay, Robot, sensors, servo, usb