My good friends Joe and Lou left for Morocco in a modded Transit van in early July. Since then, they’ve been performing copious amounts of windsurfing and kite surfing and probably some other water-sports that I’m unaware of. They made it to Morocco a while back and are now on their way back. This week they had a guest appearance on their blog.
In the month running up to their departure, Joe worked really hard at modding the interior of his van so that they could sleep and cook in it and store all the equipment they’d need — including windsurf boards, sails, bikes, kites and many more things. It was an impressive feat, and it was finished days before they were due to leave.
Earlier this year, in February I think, I subscribed to fitting a dimmed LED lighting system into the back of the van for Joe. I didn’t actually get around to doing this until about a week before Lou and Joe were due to leave. At this time I was working for ECS and was due to leave for Iceland in a few weeks. Unfortunately, the electronics that we needed to take to Iceland really needed a few more months until I’d certify it as shippable — so I was already working reasonably long hours (the extremely long hours didn’t start until the week before we left for Iceland, but I’ll leave this story to another time) and only had a few hours each evening to work on it. Thus I had to bodge the dimmer together fairly quickly.
The dimmer was an MSP430F2002 connected to two FETs and two pots. The MSP430 used PWM to control the lights. Joe and I put the circuit into wall-mounted dual-knob dimmer switch casing and recycled its pots. I bunged the circuit onto stripboard in an ad-hoc manner and then Joe and I gave it a test in the van. There were two major problems:
- The lights would flicker. Due to the hardware limitations of the chip I was using, the PWM outputs had to be switched on and off by the software from a timer interrupt. I realised that I’d been suffering from a similar problem Alexis and I had before on the SR PWM board, and moved all other functionality out of the interrupt routines so that nothing could add noise to the PWM timing. This mostly solved the problem, but not completely. I think there was quite a lot of noise in the readings from the pots, but I didn’t get to the bottom of this in time. In the end, I added two filters — a moving average and an IIR filter that both acted to low-pass the readings from the pots.
- The MSP430 would brown-out sometimes when the board was initially switched on. This meant that the electricity supply to the back of the van needed power cycling every time this happened (there is a switch on the dashboard). This was really annoying and could have been solved by a reset controller. Unfortunately, I had none.
-
The pots turned out to be non-linear. In my initial investigation of the pots, I’d put my multi-meter across it’s terminals and seen a linear change in resistance. I obviously hadn’t investigated this thoroughly enough, as when I came to fit the pots into the circuit I found that the thing acted non-linearly. On closer examination, the resistance changed linearly between two terminals of the pot and the other two were linked by a fixed resistance. If you do your sums, you’ll find that this results in a non-linear change in output voltage if you just use this thing as a voltage divider.
I went mad. Then Jeff took apart one of the pots. We looked at it. We cried. We scratched off some of the resistive track that formed the fixed resistance. If we could reconnect the now free terminal to one end of the track then we’d be done. After a rather unsuccessful attempt at doing this with a rivet, we gave up on that approach.
If we could get our hands on the innards of a linear pot that was the right size, then maybe everything would turn out alright. We ferreted around in the pots we had lying around. It turned out that a pot that I had from a project we’d been doing about four years ago was exactly the right size. And I had two of them. Perfect. Jeff spent a few of the early hours in the morning cutting away bits of the pot casing to fit the new ones in. Success. The first pot was now linear. Then came the second pot. I was dead at this point, so I went to bed. Something went wrong with the second pot mod. Luckily, Maplin still sell a pot that’s of a compatible size! Joe went there the next day. Problem solved.
Jeff also spent the last few days in the run-up to Lou and Joe’s departure building a dashboard-mounted battery monitor for them. I’m sure he’ll blog about it soon.
Then they left. I heard very little about my precious LED controller for two months. Jeff heard nothing of his battery monitor either. We were worried. Was the electronics working? Lou and Joe were blogging, but about the wrong things! They were talking about wind surfing, kite surfing and camp sites. Were they avoiding blogging about the electronics because it had stopped working? It was great to hear about their progress along the way, but come on guys! Where were the electronics posts?! All Jeff and I could think about whilst we were walking around on an Icelandic glacier was “is the van electronics still working?”*.
So. September began. Jeff decided that he was going to fly out and stay with Joe and Lou for a week. Obviously he chose to do this to find out how the electronics was doing. And pretty soon after his arrival he provided me with an update. Now he’s managed to get the required information into their blog.
And the moral of the story is: if you need to find out about the status of a remote system you’ve put together, send an Engineer. Wait, that’s not entirely connect. Perhaps this is better: If you need to find out about the status of a remote system you’ve put together, sending an Engineer works.
* OK. So that’s not entirely true.
Justyn alerted me to the existence of this LinuxDevices article about the Beagle Board. This platform looks like a good candidate for the robot controller for Student Robotics 2010! If it stays at $150 that is.

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:
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!
I’ve been using various I2C things in Linux for the past year and a bit, and I’ve learnt a few things about it from that. Here I hope to collate some of this information.
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
- Add 4 lines to the firmware for the MSP430s that sequence the stepper motor drivers so that they half-step (so that there are sometimes two active coils).
- One’s resolution has doubled.
- Dance.
- Push changes up to public firmware git repository.
We did have a resolution of 0.2mm per step. Now we have 0.1mm. w00t.
I just wrote some code for the MSP430F2011/2/3 to control two H-bridges connected to a bipolar stepper motor. Available in git form here:
git clone http://users.ecs.soton.ac.uk/rds204/git/stepper-driver.git
Takes a STEP and a DIRECTION signal - ready for connecting to a parallel port for use with EMC.
As for what it’s driving - it’s amazing. More on that later!
Just been browsing Maxim’s range of switch-mode controllers. The MAX1724 [datasheet] looks really good. It requires only two external caps and one inductor to operate. Input voltage range: 0.8v to 5.5v. 0.8v!
I should also mention that it’s in SOT23-5…..
/me attempts to find somewhere to buy lots of them…
- 0830: Received a text from Tom containing a highly compressed set of questions relating to the power board. Set about answering them when I got up.
- Processed some paperwork.
- Worked on Farnell screen scraping - progressing nicely. Some nasty problems involving Unicode strings getting munged about though.
- Read about John’s escapades.
- Had some xbee related conversations with Phil. Sadly massively diverged into setting up his ssh config.
- The random period of immense internet laggyness started early today. Around 7pm I guess. Moaned profusely.
- Performed a very short investigation investigation into radio modules for general stuff-monitoring projects. Decided that the CC2420 might be good - but a little expensive (~£5 a chip from Farnell). Will continue search for cheaper alternatives. Would be good to produce a large number of devices that use them.
- Looked for an extension lead casing manufacturer. Was pretty unsuccessful. Wanted to find an extension lead casing with space for some extra electronics in it…
| Older Posts >> |
Site by Robert Spanton. ©2008







