Pi IoT In Python Using GPIO Zero - DC Motors |
Written by Harry Fairhead & Mike James | |||||||||||||||||||||||
Monday, 23 November 2020 | |||||||||||||||||||||||
Page 1 of 2 Motors are a central part of the IoT but they are often taken for granted. In this extract from a new book on using GPIO Zero on the Pi in Python we look at basic DC Motors. Raspberry Pi IoT In Python Using GPIO Zero
|
|
1 |
2 |
3 |
4 |
---|---|---|---|---|
Stator | Permanent | Permanent | Electromagnet | Electromagnet |
Rotor | Permanent | Electromagnet | Permanent | Electromagnet |
Type | Can’t work | Brushed DC | Brushless DC | Series or shunt |
Arrangement 1 can’t produce a motor because there is no easy way of changing the magnetic field. Arrangement 4 produces the biggest and most powerful DC motors used in trains, cars and so on. Arrangement 2, Brushed DC, is the most commonly encountered form of “small” DC motor. However, arrangement 3, brushless DC, is becoming increasingly popular.
Different arrangements produce motors which have different torque characteristic – i.e. how hard they are to stop at any given speed. Some types of motor are typically low torque at any speed, i.e. they spin fast but are easy to stop.
Low torque motors are often used with gearboxes which reduce the speed and increase the torque. The big problem with gearboxes, apart from extra cost, is backlash. The gears don’t mesh perfectly and this looseness means that you can turn the input shaft and at first the output shaft won’t move. Only when the slack in the gears has been taken up will the output shaft move. This makes a geared motor less useful for precise positioning, although there are ways to improve on this using feedback and clever programming.
Brushed Motors
To energize the electromagnets, a brushed motor supplies current to the armature via a split ring or commutator and brushes. As the rotor rotates, the current in the coil is reversed and it is always attracted to the other pole of the magnet.
The only problem with this arrangement is that, as the brushes rub on the slip ring as the armature rotates, they wear out and cause sparks and hence RF interference. The quality of a brushed motor depends very much on the design of the brushes and the commutator.
Very small, cheap, brushed DC motors, of the sort in the picture below, tend to not have brushes that can be changed and when they wear out the motor has to be replaced. They also tend to have very low torque and high speed. This usually means that they have to be used with a gearbox. If you overload a brushed motors then the tendency is to demagnetize the stator magnets. The cheapest devices are basically toys.
Higher quality brushed motors are available and they also come in a variety of form factors. For example, the 775 motor is 66.7x42mm with a 5mm shaft:
Even these motors tend not to have user serviceable brushes, but they tend to last a long time due to better construction.