The AAIMI Project

Various AAIMI devices and interfaces. Picture: Anthony Hartup.

Active Autonomous Independent Machine Interface

AAIMIv1 Hardware Build

This documentation will focus on the first version of the robot, AAIMIv1. I have already tested the design, and most of the software is written for this version.

AAIMI is made up of the following materials and products:

    -A Raspberry Pi model B with good quality 4GB sd card.

    -A Gertboard expansion board (optional)

    -Two 5V stepping motors and driver boards

    -A 5V UBEC or similair voltage step-down converter to power the Raspberry Pi

    -A 1K resistor

    -18 female-to-female breadboard cables, 30 cm long

    -4 male-to-male breadboard cables

    -Three 3-pin headers for splitting power

    -A distance sensor

    -2 Trip-L-grip brackets

    -2 wheels (around 100mm)

    -1 or 2 small castors (I made mine out of mouse scroll wheels)

    -Rechargeable battery pack at least 7.2V and 1.5AH

    -Micro USB lead for powering the Pi

    -USB Wifi dongle

Now for a more detailed description.

I designed this version of the robot to do things I want it to do, but the AAIMI project aims to provide and interface for what you want to do.

You can change or modify any part of this design to suit your needs. The default code may not work with your version, but I'm happy to help you adapt the code to your design.

1/ The Raspberry Pi

The raspberry Pi is a tiny computer that runs a ARM version of Linux. It has a variety of input and output pins that can control sensors and motors.

This will set you back about $40 in Australia, they may cost more or less in other countries. They are quite powerful for that price, and in my experience they are extremely reliable and they run well from batteries. The biggest strength of the Pi is that they are all the same, meaning code that works on one Pi will work just the same on another. You avoid having to worry about driver issues or quirky hardware components. There are also many Raspberry Pi enthusiasts on the web, so there is heaps of information available to help with your projects.

The Pi uses a SD card for its operating system(OS) and internal storage. While most cards will work, cheaper models may be slower.

2 /The Gertboard (optional)

The Gertboard is a breakout board that attaches to the Pi and provides otions such as a DC motor cotroller, Analogue to Digital converters and Digital to Analogue converters. It also has 6 open controllers that can control devices with much higher voltage than the Pi.

The 2WD version of AAIMI with its current configuration can run without the Gertboard. I included it in my design because I plan to add more features to the design and it will reach the limit of the pins available on the Pi.

3/ 5V Stepping Motors

These stepping motors can rotate the robot tiny fractions of a degree at a time. AAIMI can currently align itself perfecftly square to the a wall by rocking back and forth until the measurements line up. She can then rotate 360 degrees, taking 4 measurements at precise angles and calculating the length, width and area of the room. You could not do this easily with traditional DC motors.

If you would prefer your robot to be fast, rather than accurate, you could substitute traditional brushed DC motors for the steppers, but none of the movement function written for AAIMI will work.

4/ 5V UBEC or simlair voltage step-down converter

The Raspberry Pi runs off a 5V USB phone charger with at least 500mA of current. The stepping motors can run off anything between 5V and 12V. The UBEC takes the higher voltage from your battery and converts it to 5V at 3Amps, a safe supply voltage for your Pi. If your battery is within the 5-12V required for the motors you can connect the motors directly to the battery.

5/ A 1K resistor

The distance sensor works off 5V power from the Pi to send measuring pulses but the return signal must be lowered to protect the Pi. A 1K resistor between the Echo pin on the distance sensor and the input pin on the Pi drops the voltage down to a safer 3.3V. Fortunately, this is the last of the elecronics voodoo you need for this robot.

6/ 18 female-to-female breadboard cables, 30cm long

These cables connect the GPIO pins from your Pi or Gertboard to the motors and sensors. They also connect the power system together.

7/ 4 male-to-male breadboard cables

You can cut these in half and solder them across the 3-pin headers for your power splitters.

8/ Three 3-pin headers for splitting power

This is a cheap and effective trick splitting power to the various points on the robot.

9/ Distance sensor

This is vital to tell AAIMI about its environment. It cost $1.60 but it does have limitations. The field of measurement is too wide for really fine work, and the range maxes out at about four metres, but it is fine for initial development. In clear spaces it seems to be accurate within 2mm. I am looking for a better quality unit now.

10/ Two Trip-L-Grip Brackets for motor mounts

These brackets are used in the construction industry and they cost me 35 cents each at the hardwore store. The existing holes were closely enough matched to the holes on the motor so I just had to widen one hole with a drill.

11/ Two wheels

I originally made some wheels out of old lawn mower handle knobs filled with builders bog and drilled out to fit the motors(pictured above-right). These worked alright but they were too small and the robot was taking ages to get anywhere.

I have now bought some cheap but rugged plastic wheels(picture above-left) from the hardware store. These are almost twice the diameter so I hope to gain a lot more speed. They have rubber tyres, albeit a bit shiny, and the have a small contact-area with the floor to aid accurate turning.

The main issue I faced with wheels was how to connect them to the motors. I needed a simple brass bush or sleeve with an inside diameter to match the motors and an outside diameter to fit inside the wheels. I tried every bearing store in my area with no luck, then any other store I could possibly think of. In the end I went through dozens of boxes in the shed and come up with some long nuts from some cabinet-making toggles designed to hold benchtops together.

I drilled holes on either side of the nut then ground the hex shape into a sphere to fit inside the wheel. Then I drilled two smaller holes through the side of the wheels, and used self-tapping screws to lock onto the motor shaft.

I recommend 100mm wheels, as narrow as possible with round-profile tyes. Depending on which wheels you buy you still may need to modify them to attach the the motors.

12/ One or two castors

I first tested AAIMI with two bulky casters off an office chair and they worked okay, but I think they were reducing the turning accuracy due to the 25mm throw as the castors change direction.

I needed something smaller with less sidewards-throw. I also wanted to test the robot with just one castor on the front instead of two.I am sure you could find something on the web, but I didn't want to wait so I made one.

I took a scroll-wheel from a mouse and screwed the assembly to a structual piece of plastic I cut from an old CD ROM drive. I used a small piece of hardwood above the wheel as a spacer then screwed another piece of plastic from the CD drive to the other side to lock the wheel in. I found a sturdy steel sleeve atached to the inside of a broken laptop and it mounted perfectly onto the front of the robot. I drilled a small bolt into the top of the castor assembly and it fits perfectly into the sleeve like a bearing.

This was a fiddly job that took a few hours of scaveging and tinkering but the end result is fantastic. It is silky smooth and the sidewards-throw is down to 10mm, which is counteracted by the slight clearance in the upper bearing. This caster does not seem to influence the turning accuracy at all. It also seems to work well without the rear castor, as long as the robot is weighted accordingly.

Again you may be better off buying a suitable caster. Try to find something slim-line that swivels freely with a narrow rubber wheel.

Rechargeable battery pack at least 7.2V and 1.5AH

The Raspberry Pi runs on 5v with a minimum 500ma but you will need a larger battery than that. This is because the UBEC will need at least 6V to produce a steady 5V. I am using a 12V, 1300mAH drill battery with a true voltage of about 10.8V. It is probably not intended for this purpose but I already had a couple of them and they seem to work well.

I split the power into two lines, one into the UBEC to power the Pi, the other into a splitter then directly to the motor controllers. These controllers seem to be able to handle anything between 5V and 12V.

I am getting over two hours runtime with the motors powered on for about ten to fifteen minutes of that time. I will run a test soon to see how long it lasts with the motors on continuously.

The Pi powers off when my battery gets down to about 8 volts. I suspect by then it is not pushing enough amps. I generally try to power it off before this happens.

Overall, I am happy with two hours runtime for now, but I would like to see how a 4AH battery would go.

USB cable

These leads are used to charge Android phones among other things, so you probably have a couple laying around. You can cut the USB end off and solder the power wires directly to the UBEC.

Wifi dongle

You really need to buy the right Wifi adaptor for the Pi. The ones I have tried off Ebay do not work out of the box, regardless of what they claim. It is not easy installing the driver manually.

Here you will find a list of wifi dongles that do work with the Pi. You will save a lot of hassles.


Now we move on to wiring everything together. The image below shows how my robot is wired.

The wiring layout for AAIMIv1. Right click and select "view image" or "open in new tab" to see larger image

You can change the GPIO pins if you wish but you will also need to change the code to match.

Contact the AAIMI Project