msgbartop
I will happily conduct a FREE basic web security scan for any genuine organization interested in my services to point out whether or not I can find vulnerabilities in your application. Just contact me.
Need a PHP Programmer, PHP staff or project manager? Contact me now.
msgbarbottom

08 Jul 09 The Linux Robot – In hindsight

Having written 3 major programs for the robot:

1. Move about randomly avoiding objects using proximity sensors as well as stall detection. The stall detection is simple in so far as it’s just a detection of a current spike during continuous motion a certain percentage threshold above existing current consumption.
2. Move randomly to a bass beat of music.
3. Follow a light. The logic for this is simply to rotate all wheels in the direction of which of the photoresistors shows the lowest resistance until they are both equal +/- 5%. When this occurs, assume you are looking straight at it, and move forward until they are no longer equal. Then readjust using turning logic and continue. It works surprisingly well!

What would I do differently next time around?
(more…)

Tags: ,

26 Nov 08 Using distcc for distributed compiling on an alix 3c2

Since I’ve been working on the alix board for the robot it’s become increasingly useful to just compile software on the board itself rather than on a host machine – with an AMD Geode 500MHz processor, it’s certainly capable.

I generally work on a USB hard drive attached to one of the spare ports whilst I’m testing stuff live, and then I back up the hard drive every so often.

I made some modifications to the cp2102.c kernel module and I wanted to recompile the kernel on the board directly as I had some other modules I needed, such as for the wifi card. 2.6.18 compiled eventually over about 7 hours but after wanting to make further kernel changes, I decided that I didn’t have another 7 hours to wait. I decided to use distcc to compile ‘locally’ but use the processing power of any number of other servers.
(more…)

Tags: , , , , , , , , , , , , , , , , , , , , , , ,

22 Nov 08 The Robot: Independant, moving, talking, and controlled via WiFi

Robot

Robot

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

Robot

Robot

/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 ;-)

Robot

Robot

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:

(more…)

Tags: , , , , , , , , , , ,

16 Nov 08 The Robot: Base, Wheels, Motors, and Sabertooth Motor Controllers


After attaching the 4 motors and brackets to the acrylic square, I found that it started to dip slightly due to the weight, and as I’d planned to put a 1.5kg lead acid battery in the center and I realised that this needed to be addressed. Rather than another visit to Homebase for some steel reinforcement, I just stuck (melted) two pieces firmly together with polycarbonate acid glue and then trimmed the edges with an electric saw.

Base

Base

Here is the base, the insulation tape all over the place is to hold down the connectors that I won’t be needing. The motors all contain encoders which I didn’t just want to rip out, so I’ve preserved the connectors for future usage, and just cut the – and + cables in a way that they can easily be reconnected to the connector if I ever want to. They were expensive motors so I didn’t want to ruin them!

If anyone is wondering why I didn’t attach standoff cylinders to the controller’s super large heat sink rather than attaching it directly to the acrylic base [which would normally be a bad idea], it’s because I didn’t have any standoff’s left, and the controllers are capable of 25A per channel. I will never drive them at higher than 4A, and the motors running on 4A for 30m or 2A for 2 hours solidly as a test didn’t generate any noticeable heat on the heat sink at all. At first I had also predicted the use of a fan to suck air in from the base, but I’m not sure it will be necessary, as nothing seems to get remotely hot so far..

I’ve also slightly indented the 4 points where the acrylic cylinders will be glued, just for extra stability. The motors are all wired to the two motor controllers, which has a junction box waiting for 12v now. The picoPSU should arrive some time this week, so hopefully I can get on with it.

Omnidirectional Wheel

Omnidirectional Wheel

The wheels are omnidirectional as they contain rollers. It’s a clever design and it seems to work well. Infact, I’m pleased with the way the motors and wheels ended up. Instead of having to work with two wheels and spending time on calculating angles for servo motors and turn radius, I can just attach 4 motors instead in the configuration that I have and using omnidirectional wheels. The motors will pull a lot of weight and I only have to concern myself with backward and forward for each motor, which in any combination will allow it to move in any direction. Hey, I’m not saying that I ‘invented’ this ingenious combination, just taking the credit for a smart move in implementing it! I have connected a power source directly across each of the motors to test. They are straight, and when I turn them all in the same direction, the board rotates around a ‘very almost perfect’ fixed axis which is great. I had in mind when I was positioning these, that I didn’t want to spend a ton of time in the software compensating for wheels that aren’t straight.
(more…)

Tags: , , , , , , , , , , , , , , , , ,

14 Nov 08 The Robot: A body, Sensors and Good Progress


Progress is going really well and I’m happy so far. Unfortunately I didn’t want to show the body yet as it is so far from finished but as I haven’t posted an update in a while I decided to just go with it.

Front

Front

Head

Head

The body is ever so slightly lop sided by a few mm here and there which is a shame however from a short distance you wouldn’t notice, it stands up straight and weight distribution is equal throughout the base plate so I’m happy with it. Ok, ‘professionally’ the body’s a mess however for my zero experience in that kind of work, I’m reasonably happy.

This is the front of it, top is a mounted webcam, to the left of that is a phidgets temperature sensor and top right is a phidgets light sensor. I am waiting to add 8 colored status LEDs around a small flat panel 5v stereo speaker as a ‘mouth’ (I got it from a Nokia phone bundle).
(more…)

Tags: , , , , , , , , , , , , , , , , , , , , , , ,