Thoughts on British ICT, energy & environment, cloud computing and security from Memset's MD
I have recently completed a major upgrade of BOB, mainly adding a plethora of new sensors. The picture below gives an overview:
BOB’s head needs to be able to turn for “pet like” behaviour and to maximise the usefulness of the “ears” and ultrasonic sensor. Having added several sensors to BOB’s head meant that the cabling was going to become a problem, though. I needed to use sensor multiplexers (SMUXs) anyway so I attached one of them to the back of his head so that I could just have one wire coming out of the head unit. The fiddliest part of constuction was building the head so that it was reasonably-well balanced and able to rotate through 180 degrees.
At present his head is still mounted on a single shaft with a 1:1 gearing ratio to the central horizontally-mounted motor. It is proving a little difficult to precisely rotate it and for the next version I will likely introduce some down-gearing.
One of the new challenges faced by this upgrade was a lot of additional wiring. I could not find anywhere that sold suitable cables and the Lego ones were insufficiently flexible or too long for most of my purposes anyway. Nick bought me Extreme NXT (a book) for my birthday which describes how to make your own. The connectors are simple straight-through 6 wires with variants on standard RJ11′s.
I bought some standard telephone cable with six solid cores for most of the wires, especially the short ones. To make the RJ11′s fit into the sockets you just have to trip off the left hand side of the little plastic clip with some wire cutters. Most of the cables did not need to flex so the the solid-core was fine for that. See the diagram on the right.
For the powered SMUX – the touch multiplexer (TMUX) does not need power – I used multi-cored ethernet cable which has eight wires. I used the spare two wires to deliver power to the SMUX’s, which I felt was an elegant solution. This was especially important for the head SMUX since the cable needed to be a) flexible and b) tidy so it would not get tangled.
I also determined that the SMUXs had fairly low power draw and although they each came with a 9v power cell unit it is possible to power several off one 9v battery. Therefore I used a simple bit of vero board to parallel the two SMUXs power wires together and feed them off a single 9v cell.
BOB’s principal range sensor, which is used for avoiding objects, is the ultrasonic integrated into his head. However, it does not work well for fabric-covered obstacles such as sofas so I added a HiTechnic EOPD active light range finder to his left shoulder. Its effective range is under 10cm but it prevents him blundering into soft things!
The few objects he cannot “see” with the ultrasonic and optical sensors, such as low-down objects or vertical table/chair legs that don’t happen to line up, are caught by his front touch sensors. The rear touch sensors detect when he drives into a wall at a very oblique angle, at which point he looks to the side and adjusts his angle to follow the wall at a constant distance.
On experimentation the HiTechnic active colour sensor also works surprisingly well as a range finder. Though less accurate than the EOPD sensor it is perfectly adequate for detecting proximity as the signal increases from zero with brightness so you can determine rough distance. Its range for that purpose is also comparable to the EOPD sensor. Thus his secondary proximity detectors are balanced, one on each shoulder.
A major addition to BOB since version 2 is his ears (left and right sound sensors) and infrared directional sensor, all mounted in his head. I have programmed him so that he can detect noises and swivel his head to attempt to get a bearing which, once determined, he uses in combination with his compass (hidden from view in the picture but in the same position to the accelerometer but on hig right flank) to determine a bearing, which he duly sets off towards navigating around obstacles as necessary*.
*It should be noted that his code is still quite crude and while that is the aspiration he still often gets very confused! Sounds bouncing off walls are a particular problem that I’ve not quite yet solved, also I’ve not done anything yet to address him “getting lost” when going around big obstacles (he doesn’t have an internal map of any sort yet). Once I’ve ironed out a few issues I’ll post some videos!
This means that I can now in effect “call” him to me, even from another room, but when he gets close his directional hearing loses any real accuracy so I added the infra-red (IR) sensor. I intend to wear an IR beacon on my ankle so that once he has used his “hearing” to determine my approximate location he can home in using IR. That actually is working out quite well since the IR’s effective range is only really a couple of meters.
Infra-red challenges: One of the lessons I learned is that during daytime, even on cloudy, rainy days, there is an enormous amount of infra-red radiation around! The HiTechnic IR sensor picks up the Sun’s IR that you can’t feel as heat as a very bright source which interferes significantly with its detection of a tuned beacon unless it is quite close. I’m having to do a lot of optimisation of the of the IR detection routines.
As well asa secondary range finder I’ve programmed BOB to use his colour sensor so I can give him instructions. For example, when he detects the colour of my skin he stops which is useful for debugging (I can just hold out my hand then read his logs which he writes to his screen) and he also “knows” he has found me. I’ve been using other colours to change into different modes (eg. follow wall, go to nearest sound even if quiet, etc).
The accelerometer is there for two reasons: 1) so that he can detect when he is picked up and 2) so that he can detect the tilt when he is about to fall down some stairs!