xGoat
More tea please.

Formica Firmware Release

Formica Logo
We’ve finally got around to releasing the designs and code for the Formica robots. You can find a technical report over at Jeff’s website Warranty Void if Removed. The hardware designs are under a CC license, and we’ve GPL’ed the firmware.

I’ve made the firmware available here. To build this, you’ll need to have an install of mspgcc that’s been built (and probably patched) to compile for the MSP430F2254. If you’re using Fedora 9, then you should be able to use my mspgcc RPMs.

Compilation

Compiling it is as should be as simple as running “make”:

[rob@zarniwoop formica-fw-r468]$ make
./freq.py 500 3500 3 > freq.c
cp .freq.h freq.h
sed -i -e "s/_NFREQ/`echo "$(((1 << 3) + 2))"`/" freq.h
sed -i -e "s/_NBITS/3/" freq.h
sed -i -e "s/_MIN_PERIOD/500/" freq.h
sed -i -e "s/_MAX_PERIOD/3500/" freq.h
sed -i -e "s/_SYMBOLS_PER_BYTE/`./.sym_per_bit.py 3`/" freq.h
curl -s http://users.ecs.soton.ac.uk/rds204/formica/rev.php > .fw_ver
msp430-gcc -o main -mmcu=msp430x2254 -g -Wall -Os -mendup-at=main -DRAND_WALK_SPEED=3 -DFW_VER=`cat .fw_ver`  main.c ir-rx.c freq.c net-rx.c opamp-1.c ir-tx.c ir-tx-data.c net-tx.c adc10.c random.c motor.c virus.c smbus_pec.c battery.c ir.c food.c bearing.c flash.c behav/braitenberg.c time.c behav/parking.c behav/watchdog.c -Wl,-T,lkr/msp430x2254-lower.x
Firmware revision 485
msp430-gcc -o main-top -mmcu=msp430x2254 -g -Wall -Os -mendup-at=main -DRAND_WALK_SPEED=3 -DFW_VER=`cat .fw_ver`  main.c ir-rx.c freq.c net-rx.c opamp-1.c ir-tx.c ir-tx-data.c net-tx.c adc10.c random.c motor.c virus.c smbus_pec.c battery.c ir.c food.c bearing.c flash.c behav/braitenberg.c time.c behav/parking.c behav/watchdog.c -Wl,-T,lkr/msp430x2254-upper.x
Firmware revision 485
cp -f freq.h .freq.h.win
cp -f freq.c .freq.c.win
[rob@zarniwoop formica-fw-r468]$

This will generate two binaries: main and main-top. These contain the same code but they are linked into different regions of the flash. You can load either one of them into the robot’s MSP430. However, when you start working on getting them to flash each other over IR, you’ll need to make sure that you’ve got the right ones loaded.

You may notice that there’s a curl in that make output. This grabs a firmware version number from the web. Obviously you can change the URL this grabs it from, but feel free to use the one that I’ve set up in my ECS account.

p.s. I should add that none of the stuff from the Alife conference has involved the title “Formica” or our logo, which was a little dissapointing. So, let me point out that this is the same project as in all of these news stories.

Posted at 2:12 pm on Friday 12th September 2008
No Comments

Project Formica: A really enjoyable project

dsc01545.jpg Project Formica is now over. We’ve given our final demonstration to our lecturer, and we’ve said goodbye to all of our robots. I think that this has been by far the best coursework that I’ve been involved in at Southampton. It’s a shame that it wasn’t the best coursework when measured marks-wise! I strongly recommend the “biologically-inspired robotics” module to anyone doing electronic engineering at Southampton University.

In the end we built 25 robots. These robots are designed to be very cheap. If you strip away our prototyping costs, then each of them cost just over £10. If you build 1000 of them, then the components only cost around £6.50. That’s quite cheap!

dsc01481.jpg
dsc01513.jpg
We got the 25 robots constructed in a 14 hour build-fest. We are indebted to Klaus-Peter, Tom, Tobias and Justyn for their help in this experience, and hopefully we’ll express our gratitude in some way soon! In 14 hours we managed to solder over 1500 components between us.

For our demo, we got the robots doing a random walk until they found food. Food in this case is a piece of cardboard with a cuboid piece of wood stuck in the middle. They’d then push the food towards light. When they’d reached the light (which they determine through light level), they’d reverse for a bit and then go about finding some more food. Every so often, they’d go and charge themselves from the charging station. Charging is just a case of driving straight into a charging bay — with their prongs and skis making the electrical connections to the power supply. They use their IR communications to talk to other robots and ascertain how much food is left around in the arena that isn’t near the light. The liklihood of going to charge is affected by this food level.

So, all that remains now of my degree is 2 exams and a 3-minute presentation. Pretty scary!

dsc01567.jpg

Posted at 1:38 am on Sunday 25th May 2008
4 Comments

Loads of (reasonably) small robots

A couple of unedited videos of the Formica robots that Jeff, Steve, Alexis, Jo and I have been working on:

More on these soon!

Posted at 1:30 am on Thursday 15th May 2008
No Comments

Programmable matter, fractal compression, etc.

Some of the things that I did today:

Programmable Matter

I read a 1998 paper called “Programmable Matter Methods” — Programmable matter is a multi-dimensional grid of computing devices with local connections. The term is usually applied to grids that have a large number of nodes (like hundreds, millions or more…) and some of the “Connection Machines” are instances of it.

FROSTBURG

Look! Those sci-fi films were right!


Image licensed under Creative Commons Attribution-Share Alike 2.5 Generic, sourced from Wikipedia.

Also read “Richard Feynman and The Connection Machine“, which is good. I particularly enjoyed the part about how Richard Feynman used differential equations with terms in that represented “the average number of 1 bits in a message address”!

Fractal Compression

“Once an image has been converted into fractal code its relationship to a specific resolution has been lost, it becomes resolution independent since the image can be recreated to fill any screen size.” - Fractal Compression, Wikipedia.

Was interested to find that Fractal compression is (or maybe was…) employed in RealVideo, and that fractal image compression failed to become widely used because wavelet approaches also popped up. FIASCO is/was an image format that, according to Linux Journal, is better than JPEG at low bitrates. FIASCO looks cool, but as far as I can tell it’s doesn’t really exist any more. There’s also a surprisingly old Wired article on it.

Whilst searching for bits of software to manage a database of papers, I came across Optar, a tool for encoding data onto paper. Maybe I’ll find some applications for this one day… perhaps the schematic of a PCB could be encoded in it and placed on the PCB surface… The authors mention something about photographing the images and then decoding them — they doesn’t say whether that’s actually possible.

Spent more hours on a tutorial on how to fix some Student Robotics hardware. Ended up editing the video using mplayer edit lists.

Posted at 4:03 am on Saturday 22nd March 2008
No Comments

Formica

Formica Project Logo

We’re about a month into the new semester now (argh!), and the work is piling up. However, it’s all really interesting this semester. There’s no managementy goo courses that we have to take, so it’s a semester of continuous technology and knowledge pumping. Excellent.

One really exciting course is Biologically Inspired Robotics (ELEC6087). For this we have to build robots that are in some way biologically inspired. I’m in a group with Jeff, Steve, Alexis and Jo. Our project is called “Formica”. We’re going to build a lot of really cool and small robots that will hopefully exhibit some sort of emergent behaviour from simple rules.

We built this prototype over the weekend:

Promica - Prototype Formica

The prototype is made from bits that we had lying around the place, but it’s pretty true to the design that we had in mind for the final platform. The motors are pager motors, the big chip on top is an MSP430 and there’s a Li-ion battery attached to the underside. We spent some time trying to find two pager motors that had similar characteristics, and in the end resorted to removing the motor from my mobile and the motor from my Dad’s old phone (which is the same model as mine). So if you try to phone me at the moment when my phone’s on silent, I almost certainly won’t answer. Jeff had a stroke of genius and extracted the battery from his bluetooth headset (it could be a Li-ion Polymer and not just a Li-ion, I’m not sure). The wheels are formed using a magic tool that Jeff lathed up, I’m sure he’ll blog about that soon…

The concept of having around 50 of these things driving around and interacting is pretty amazing. I can’t wait until it’s a reality!

Posted at 9:18 pm on Tuesday 4th March 2008
One Comment

Finally, a Robotics hardware release!

It’s only a few months late, but we released the Student Robotics hardware at about 4 AM last Friday:

The Student Robotics hardware

From left to right: The slug (nslu2), power board, motor controller, jointio board (analogue in, digital i/o), Servo PWM board.

Now these robots can actually get built :-)

Posted at 7:59 pm on Monday 11th February 2008
One Comment

Slug Infestation

Slugs arrived this morning…

Slug Infestation
Posted at 12:06 pm on Monday 26th November 2007
No Comments

I2C Adapters

Since our robotics kit uses an I2C bus, it would be really handy for me to have a USB-to-I2C adapter. With the addition of a simple RJ11 adapter, I’d be able just plug in a module and start hacking on it without the annoying set-up times, that involve sorting out the Slug and power board combo. If Student Robotics had several of these adapters, then any member could just grab a module and start hacking on some code.

i2c-tiny-usb:

I’ve just come across Till Harbaum’s i2c-tiny-usb design. Rather surprisingly this uses a relatively cheap ATtiny45 Atmel AVR and nothing else. It bitbangs the USB protocol. Apparently, this works rather well. What’s even more exciting, is that there’s a kernel driver available for the i2c-tiny-usb. This makes it behave as a proper Linux i2c bus device, so interacting with it from software couldn’t be simpler. This board can be an I2C master with clock speeds of up to 50KHz.

OSIF

The Open Source InterFace (OSIF) is part of the OpenServo project, and I believe was designed by Barry Carter. Carter took the i2c-tiny-usb design, and adapted it to use an AVR with more pins, and upped the maximum I2C clock speed to 400KHz. Furthermore, the board has support for serial (I think UART), 6 GPIO lines and an ADC channel. Barry Carter sells the OSIF for £20 a board.

Carter also provides a kernel driver for the OSIF as well :-D

I bought an OSIF earlier today. I like the way that the OSIF uses work from two previous open hardware projects to create and sell the results. More on how it goes when I get it…

Posted at 5:51 pm on Tuesday 23rd October 2007
2 Comments

Sunday 6th August, 2007

Posted at 12:01 am on Monday 6th August 2007
2 Comments

Hacky hacky hacky hack

args = re.sub( r"/usr/lib/libpng12.so", "", args ) 

s = subprocess.Popen( "/home/rob/ecssr/proj-svn/slug/init-br/build_armeb/staging_dir/bin/armeb-linux-uclibc-g++-orig " + args ,
                      stdout=subprocess.PIPE,
                      shell = True )
Posted at 10:52 pm on Saturday 24th March 2007
No Comments

Site by Robert Spanton. ©2008