This first part will deal with how to fit the physical and electrical parts together to make a pile of hardware that can be called a robot because it can move, not because it will actually be intelligent or autonomous.
At the end of this part, you will have a platform that with the help of part 2 (software / drivers) can be used as an expensive remote controlled 2 wheel car that can report on its sensors, and be in a position to have intelligence and automomy programmed into it. It will be similar in hardware composition to the Whitebox 914, but will have cost you $4000 less. It will of course be missing a beautiful shell and software to make it do anything. ( No disrespect to whitebox – the hardware part of this project was completed before the whitebox, but turns out to be very similar. Their product certainly has a beautiful shell and probably has some good software. If you want a finished system: check them out. )
What makes a robot?
For the purposes of this articles we will say that to be able to be called a robot it must:
1) Be able to move using wheels or legs
2) Be able to sense its surroundings, at least a bit.
3) Be able to respond to its senses and choose a move.
There are many ways to accomplish the above, and a $10 BEAM robot, may in many cases perform the above more reliably and with greater fluidity. This article will assume that you want a full PC as brain, either an existing desktop machine or a small PC that will move with the robot.
1) You can program with familiar languages.
2) You have access to large memory and storage.
3) You can use web cams and other commodity parts.
4) You can have access to wifi and the power of the network.
1) Complex system with many parts
2) Slow start up time.
3) Only as reliable as your software.
How do you make a PC move and sense?
These days there are many devices that can plug directly into a PC using serial, or USB and give you access to a vast range of actuators and sensors. Popular examples include, Phidgets, the Serializer and I2C devices. This article will concentrate on I2C devices from a UK company called Devantech mainly because it is what I have most experience with. Although I personally think they are a good option by price, performance and ease, many other choices are possible, and your own research many lead you in another direction.
Easy option: the RD01 Drive system from Devantech. £96.91
It contains the I2C controlled MD23 dual 3A motor controller, two gear motors with 360 step encoders, complete with wheels and mounting brackets. You could just about screw these directly into a laptop and you would nearly have a robot. We won’t be following that route.
How do you talk to it?
We will follow two possible routes:
1) The USBI2C adaptor from Devantech. £16.56
Plug one end into a USB port and plug some I2C wires into the other side. Done.
2) The RF04/CM02 from Devantech £79.88
Plug the RF04 into a desktop PC, and plug the CM02 via some I2C wires into your MD23. The RF04 will speak over radio waves to the CM02. This way you can use your desktop PC as the robot’s brain, and avoid you having to buy another computer for the robot. This will be much cheaper, but communication will have more latency and it won’t be as easy to stick a webcam on your robot.
Both of the above will let you speak to I2C devices through a virtual COM port. You simply send a few bytes to the COM port to tell the device to do something, or send another few bytes asking the device to send you something back. Higher level drivers exist which can do all of this low level communication for you and give you access to the devices via a web page or a service based architecture (more details in part 2).
Once you have established access from your PC to the I2C bus, you can keep on adding sensors and actuators, up to about 122 devices in theory, and even more if you use several USB2I2C adaptors, or I2C bus splitters, but this is plenty already.
SD21 Servo Driver £21.99. This lets you control up to 21 servos, easily enough for a pan-tilt head, a couple of arms, a simple walker, or some other custom mechanisms that you may dream up.
If you are tight on budget and have chosen not to carry the PC brain around with you, you could even use a couple of continuous rotation servos (or hacked servos) as wheels.
Beware, this is a fairly full PC that with added screen and speakers would make a fine home entertainment system. As the software will rely on XP, we have steered away from using compact flash as the hard disk. If you already have a CD drive lying around you could use that while installing the motherboard drivers and XP far enough to get network access, and use terminal services thereafter.
The exact part listing is not important. This list is for a mini-itx system, but an old laptop would be just as good. There are other variants with dual cores, pico-itx, or much lower power consumption – the choice is yours.
Motherboard / CPU: EPIA CN 13000G C7 Mini-ITX Board £109
Ram: 512MB PC4200 DDR2 533 DIMM £45
Hard Disk: 40GB Western Digital Scorpio 2.5" IDE 5400RPM Hard Drive - 8MB Cache £39
Slimline 24x CDROM Drive £25
Netgear 54Mpbs Wireless PCI Card £27
M2-ATX 160W Vehicle DC-DC Power Supply £59
Windows XP Pro £89
This depends on the automomy you require. Obviously the more battery power you have, the longer it will be able to live without recharging, but that power will come at the cost of weight which will slow down your robot. You need 12V for the ATX, but you may also want 6V-7.2V for powering the servos, and 5V for some of the sensors. To avoid having another battery for the servos, we will use two 6V batteries in series, to produce a total of 12V, and we can take 6V from the middle for the servos. In the end, another two batteries and an extra 5V regulator was added to supply sufficient noise-free power to all the sensors.
You can build the chassis out of just about anything, with wood and plastic being amoung the easiest. Basically all you need is a platform to put the pc parts on, with a sturdy frame on which to attach the wheels. Later on you may want to attach bumpers and a higher level for more sensors.
The chassis in the pictures was made out of aluminium profiles bought from a hardware store. It can be cut with a metal bladed hacksaw with a bit of patience and the sharp corners rounded off with a file. You will also need a small drill with some metal bits and a vice to hold things in place while sawing or drilling. Many designs are possible.
The pictures show the wheels in the middle which makes it a little easier to turn on the spot, but the castors at front and back could easily make it get stuck on a small edge of carpet. Many commercial designs sensibly use a circular frame and three wheels which is much less likely to get stuck on corners of furniture and can get over bumps without becoming grounded.
All pretty obvious stuff. The chassis and the wiring take a good deal of patience, so hopefully there will be commercially available cheap kits made by someone in the near future.
Is it finished?
No, not really. I need to make some much shorter USB cables to connect the web cam and the USBI2C. I'll be adding a second webcam for some stereo vision tests, and an arm or two to make use of all the spare SD21 channels. The servos go a bit jumpy while the PC starts, so I'll need to add a few capacitors or re-route power a bit. Also the plastic head is not pretty - I'll probably make a prettier metal head when the second cam arrives.
What software is it running?
XP with MSRS and Devantech Drivers
Is is autonomous?
No, not yet. It can be controlled wirelessly via a Joystick and web pages using MSRS and can report on all its sensors. Autonomy is planned: See: Grid SLAM Explorer
Can it actually do anything?
Ha! No, not really. It could push something around, I guess. It does telepresence and could warn me about a fire or intruder, or speak RSS feeds if I really wanted it to. For the moment though I'll be concentrating on mapping then give it an arm or two.