Obviously we need motors for our robot. The easiest option is to buy motors with a reduction gearbox already attached. This will reduce the speed but increase the torque (how "strong" the motor is).
There are a couple of sizes of motors that will fit within the chassis size for PiWars. Some like this which are really common in Arduino robot starter kits or a chunkier metal geared motor like one of these. For our design of a powerful all terrain vehicle I think the first type is going to be too small. These small motors work well for light weight platforms but with a RaspberryPi on board and more importantly enough batteries to run it these little motors are going to struggle.
Looking at the larger motors generally means a bigger supply voltage. We're going to stick to 12V motors. You can get more power to them without much thicker wires than 6V motors, but higher voltage options like 24V means more battery cells which gets heavy.
How fast do they need to be?
The other feature to decide on is speed. All the motors I looked at have a rotational speed specified in RPM: Revolutions Per Minute. So assuming we're going to drive or wheels directly from the output of this motor how many RPM do we need to get a decent walking pace? What is a decent walking pace?
According to some quick internet research the answer to the second question is about 1.5m/s. Next we need to pick some wheels. Bigger wheels have a larger circumference so go further in one revolution. It seems there are a good selection of choices around the 80mm diameter mark.
Given those numbers we should be able to calculate our top speed as an RPM now.
The distance travelled in each rotation is the circumference of the wheel you get this by multiplying the diameter by π. So for an 80mm wheel we travel 80 × 3.14 = 251.33mm. For simplicity let's call it 0.25m.
So over the course of a minute our robot can move up to it's maximum RPM × 0.25m. If we want to hire that nominal walking speed we need to cover
1.5 × 60 metres
(The speed was in metres per second but our motor is in revolutions per minute so we need to multiply the distance or second by 60 second in a minute.)
1.5 × 60 = 0.25 × RPM
Multiply both sides by 4 to simplify things again:
4 × 1.5 × 60 = RPM = 360
So we're looking for motors that can achieve a top speed of about 300 to 400 RPM.
Wonky steering
Another important thing about this kind of DC motor is that no two are really alike. Even if you ran two from an identical supply under the same load one would always go faster. On a robot this means that one side will try to overtake the other and you'll end up going in circles.
We can over come this issue in two ways:
- Use an inertial measurement system that can tell what direction the robot is headed in.
- Add sensors to the wheels or motors to measure how fast they are going.
Actually both have advantages and we may consider option 1 in more detail later on, but a good feature to look out for in motors is encoder output. Encoders are a way of measuring how fast the wheel is moving and sometimes what direction as well. They either use a wheel with slots in (like these, for the yellow motor above) and a tiny light and detector, when a slot is between the light and detector you get a pulse (this is like most mouse scroll wheels) or you use a magnet and a magnetic sensor, as the magnets poles spin past the sensor you get pulses. Either way you can count a number of pulses and know how far your motor has gone. If one motor has gone further than another you can slow it down a bit.
Sometimes you can find motors with encoders built in. You can also find motors where the spindle protrudes both ends so you can attach a motor on one end and an encoder on the other. If you can't find either of these options you might be able to fit something on the main drive shaft with the wheel but it will complicate things.
Our choice
In the end we settled on these motors. The kits include encoders, motors, mounting and wheels and the 12V 320RPM version hits our speed requirement. The encoders are hall-effect sensors with a small magnetic disk and we had a couple of breakages in the post since the magnets are quite brittle and the packaging was poor but it was all resolved with the seller. Hopefully these motors are going to work out well for our design, only time will tell!