Friday, April 14, 2006

Slightly off-topic

Today, I finally got fed up with the Linux distribution I was using (Ubuntu) and canned it for my old favourite, Slackware.

After 2 full kernel freezes in an afternoon, I was getting flashbacks to being a Windows user. I don't know if it's anything to do with the 2.6 kernel or the Ubuntu/Debian flavour of it, and I don't care. My machine is now at least 25% faster after having re-installed Slackware with it's 2.4.31 kernel. No crashes either.

Now, to the point of this diatribe - when I tried to use the alien trick to install the packages, it all went pear shaped. Alien is not amongst Slackware's slim package repository, nor was I able to download the official sources using svn, because apparently they don't exist.

My only choice was to recompile the AVR-GCC compiler from scratch, which I was able to do by following these instructions. It's nowhere near as tricky as it sounds - and the instructions work fantastically.

It can be done, and it's easy!

Thursday, April 13, 2006

Odometry Graph

Odometry Graph
Originally uploaded by andomonir.
I find when working with data that a picture paints a thousand words. Having taken the fairly meaningless data from the odometry sensors for the wheels, it starts to make sense once plotted onto a graph. Here's the code:

# (C)2006 Matt (
# Released under the GPL v2 Licence
#!/usr/bin/env python

from serial import *
from gdchart import *
ser = Serial()
 while 1:
   Itemlist = reading2.split(': ', 2)
   temps = Itemlist[1]
   temp = int(temps.strip())

except KeyboardInterrupt:
  print datastore
  x = _ chart(GDC_AREA,(1024,768),"graph.png",datastore.keys(),datastore.values())

Sunday, April 09, 2006

Asuro software for Linux

Flashing your asuro
Originally uploaded by andomonir.
The software (EEPROM Flasher, AVR cross compiler) all comes in RPM format. This is great if you use Red Hat, SUSE or Mandriva, but not for the rest of us. However, I converted the packages to my standard .deb format with Alien and it worked perfectly.

The software I'm using:

  • Jed - Programmer's editor based on Emacs. Don't let this put you off though!

  • GCC-AVR Cross compiler from the Asuro CD

  • Python 2.4 - This is on the PC side for data capture and analysis.

  • Pyserial package for serial comms in Python

  • GDChart package to generate graphs for visual representation of the data

I'll post a couple of Python data capture programs soon.

Asuro line following sensor test

So far, so good. The Asuro's line sensors work well, and give a different enough reading when travelling over black and white to be usable.

Transmitting information back to the PC for analysis was a bit of a pain - the line sensor information is stored in an unsigned int array. The serial connection can only send characters, so I had to find a way to convert between the two.

This is not easy. In the end, I had to include the AVR stdio library, and use the function sprintf() to convert the data into a string which I could read in a Python program for capture and formatting. This doubled the size of the flash, which means less space for my programs in the future.

It also seems that the odometry data is pretty useless for counting wheel revolutions. I'm going to try to shield the two photoresistors from external light to enhance the readings.

Thursday, April 06, 2006

The finished article

The finished article
Originally uploaded by andomonir.
Well, after about 5 hours of soldering and such, I finally finished it and got a positive self test. Phew!

A couple of pieces of advice - a multimeter is not optional. You'll need it.

The resistor list did not match that for the parts included. I spent about an hour figuring out which resistor was going to *probably* be ok...

I've managed to flash it a couple of times, so I know that works.


1. Wonky axle. My dodgy soldering I'm afraid...

2. One wheel did not mesh with it's gear, so I had to superglue it on.

3. The status LED only ever comes on green, when it's meant to be a three coloured affair.

More soon!

A screenshot

Originally uploaded by andomonir.
Just a little proof that the Infra-red transceiver works - The garbage at the bottom is the output from my freeview box's remote control!

Wednesday, April 05, 2006

Step 1 complete

Originally uploaded by andomonir.
Well, after completely ignoring imminent deadlines for University, I decided to start on my Asuro.

Everything went reasonably well. The manual is clear and the PCB is marked so clearly even I could get it right!

Unfortunately, there is an error in the manual. P13 section 4 states that the R3 resistor should be 470 Ohms, with the colours yellow/violet/black/gold. This is wrong!!!

The reistor should be a 470 Ohm resistor, but the colours should be yellow, violet, brown, gold.

Apart from that, all I had to do was solder it up and trim the preset resistor. Step 1 complete indeed.

The ASURO Software

Originally uploaded by andomonir.
I noticed a couple of problems while compiling the SelfTest program - There is a case problem in SelfTest.c. it's looking for "test.h" when it's really named "Test.h". This won't be a problem on Windows systems, but Unix systems are case specific. If you are a Unix/Linux user, You'll need to edit this.

What's in the box

Originally uploaded by andomonir.
Nothing comes assembled with the ASURO, including the serial infra-red unit that connects to the PC. This means that if it doesn't work, it's my fault.

Notice the ping-pong ball in with the kit - the ASURO uses this as a pivot/sled in contact with the ground. I might replace this at a later date with a caster pivoting wheel.

I'm still waiting for my soldering station to arrive, so assembly won't begin until the weekend.

The ASURO programmable robot

Originally uploaded by andomonir.
This blog will be dedicated to the assembly, construction and programming of the ASURO programmable robot.

I'll blog every step of the journey from kit to (hopefully) fully working robot, and my attempts to build a fully functioning neural network in only 1K of user programmabe memory space!

Wish me luck!