Robotics
My latest toy!
Core components are the Slug
and the Velleman K8055 interface board 
I found a K8055-control program somewhere on the web (if you need to know, drop me a line and I’ll find it again). Unfortunately it uses some modules apparently not available for uNSLUng and I can’t hack the source to bits and recompile, so I’ve ended up writing my upper-level code in C (compiled on the Slug with gcc), and executing the K8055 binary then catching its output in my code. A bit of a long way around (and a bit slow), but it works and will do for now.
The project hasn’t got very far as yet. I have a “roller” program which switches each of the eight digital outputs on one at a time, giving a “Knight Rider” effect on the indicator LEDs, while waiting for a digital input to be switched, at which point it terminates. Not exactly rocket science. But a start. If I can switch an LED on, I can switch a motor on. If I can sense an on/off input, I can tell when I’ve hit a wall, etc.
The unit also has two analogue inputs (temperature and distance, maybe?) and five analogue outputs (speed, brightness, etc.) so there is still lots of fun to be had.
At the moment, the Slug is running off a 160GB HDD. This is fine, it works well. But I really want that drive as a backup target for the laptop, and it is a bit more power-hungry than I like for something that’ll eventually be battery-powered. 160GB is also just a huge waste of space, I expect the thing to run in well under a gig when I’m done, although in the interim I might need another gig to handle compilers, editors, tools, libraries, etc. Slugs all over the place are running happily from USB thumb-drives, but not mine yet – the one suitable drive I tried it with just would not work properly. Alternatively I have a 6GB 1.5″ HDD (from an iPod Mini) and a 4GB one as well. These pretend to be Compact Flash cards, and have to go via CF-IDE and then IDE-USB or preferably CF-USB adaptors before the Slug can work with them. So far I’ve had no luck with either one, although they both seem to work OK on CF-IDE adaptors plugged into a PC. Maybe the problem is my CF-USB adaptor? I don’t know. Like the lack of integrated direct software control of the K8055, it bothers me but for now what I’ve got in place works, so I’m not going to bother with it at this point in the project.
What next?
As you’ve seen, its all very Mickey-Mouse at the moment. Time and financial contstraints will limit any huge bounds forwards. But here’s a very rough road-map of what I hope to be doing:
- Get the switched digital outputs working. So far this has me stumped. I’ve taken an LED torch apart, and wired it through a board ouput, but switching doesn’t seem to work externally yet. Must do some more reading.
- Find a couple of low-voltage DC motors somewhere.
- Construct the drive-train. I’m leaning towards a motor on each side, driving tracks rather than just wheels. And I’ll probably need to get a couple of simple gearboxes somewhere too -those little motors are usually all about high RPMs, and I’m not interested in speed, I just want the torque. Wheechair-motors, perhaps? Probably too big & heavy?
- Find a few rechargable battery packs. The slug needs 5V. Motors will need something, don’t know til I get them.
- Get (or make?) some simple push-switches to use on the bumpers.
- Write some bump-n-go code… keep moving forwards until you hit something. Then stop, back up, turn 90ยบ and continue. Repeat until told to stop.
- Put it all together, case it up (an a5-sized Really Useful Box, maybe?), and let it loose in the lounge.
Longer term goals:
- (Shooting really high!) “Find My Charger”. When low on power, locate charge point and plug in. Disconnect when full. I have no idea where to even start with this…. I guess colour-recognition might be a good option? Paint some bright pink around the charge-point…. hmm…. won’t worry too much about the details until I’ve got basic mobility going.
- (even higher) Climbing the stairs. This is where I get to learn the basics of mechanical engineering! Of course, it will have to climb down again. Looking forward to that challenge.
- Greet me when I get home, and tell me if I have any new emails.
And then maybe… if I have some success with this, and still have a few minutes to spare every now and again…. I’ll acquire another Slug (possibly just use the already-always-on FSG instead? it does have four USB ports, I’m sure I could spare one) and a couple more K8055 boards (maybe even something a bit fancier) and start on some home automation. Could be fun!

