agro empresarios de la región.
5.4 ENFOQUES METODOLÓGICOS Y APRENDIZAJE SIGNIFICATIVO
DC motors use DC voltage (Direct Current, Gleichspannung) to achieve rotary motion. They have two pins with which to control the speed and direction of their rotary motion.
Construction Principles
There are two basic types of DC motors, those with brushes (B¨ursten) and brushless DC motors. In DC motors with brushes, the stator generates a constant magnetic field, whereas the rotor either consists of a set of wire loops and utilizes the Lorentz force, or it consists of one or more coils to generate an electromagnet.1 In either case, the direction of the current flowing through the rotor wires must be changed every 180◦.
N S
Figure 5.14: DC motor with brushes.
1In this text, we will concentrate on motors utilizing the electromagnetic principles, but the general ideas also apply to motors based on the Lorentz force.
5.10. MOTORS 143
Figure 5.14 shows the operating principle of a DC motor with brushes. The stator generates a constant magnetic field, either through a permanent magnet or an electromagnet. The rotor is an electromagnet fitted with acommutator, that is, with two metallic contacts (thecollectors), which are separated by gaps and which are connected to the ends of the rotor coil. Two (carbon) brushes pro- truding from the stator touch the collectors and provide a constant voltage difference, thus energizing the coil. When the rotor turns, the brushes slide over the metal band until they are directly over the gaps when the rotor reaches its apex. At this point, the rotor coils become unenergized and the rotor is simply carried on by its own movement until the brushes make contact with the other collector, energizing the coil in the other direction and causing the rotor to execute another 180◦ turn, just as described in Section5.10.1.
Of course, an actual DC motor is slightly more complex than the one depicted in Figure 5.14, since a DC motor with only two collectors cannot start if the brushes happen to be just over the gaps when the motor is turned on. Therefore, real DC motors have at least three collectors and coils (also called armature coils (Ankerspulen)) as shown in Figure5.15. Since using only three armature coils causes a non-uniform torque, even more coils are generally used to smoothen the movement.
Figure 5.15: Rotor with three armature coils.
DC motors with brushes have a distinct disadvantage: The brushes get abraded with use, ulti- mately leading to bad contacts. As a consequence, motors were developed which did not rely on mechanical brushes. Since without some mechanical contacts there is no way to get current to the rotor, brushless DC motors have a permanent magnet as rotor and several stator coil pairs which are excited alternately to generate a rotating electromagnetic field. In consequence, a brushless DC motor is more complex and hence more expensive than a motor with brushes, but brushless motors have a longer life expectancy.
Analog Speed Control
As we have already mentioned, DC motors have two pins which are used to control their operation. A sufficient voltage difference between the two connectors will cause the motor to turn. The speed of rotationvM is proportional to the voltage differenceUM applied to the pins,
vM ∝UM, (5.5)
and is given in revolutions/minute (rpm). For very smallUM, the inertia of the motor will prevail over the torque, so a certain minimumUM must be applied to make the motor turn.
UM
motor speed
t
acceleration full speed deceleration
t
Figure 5.16: Simplified speed curve of a DC motor.
Figure5.16shows the simplified speed curve of an (unloaded) DC motor. After the motor is turned on, it gradually overcomes its inertia in an acceleration phase until it reaches its nominal speed. It then maintains this speed (within the limits posed by its construction) until it is turned off, when it enters a deceleration phase before finally stopping.
Digital Speed Control
Since microcontrollers seldomly have d/a converters on-chip, controlling the speed of the motor by adjusting the voltage level requires external analog hardware. Fortunately, however, it is also possible to adjust the speed of a DC motor with a digital PWM signal. The idea here is to utilize the inertia of the motor to obtain a relatively constant speed as depicted in Figure5.17.
T
PWMUM
HI
T
average motor speed
t
motor speed
t
Figure 5.17: Controlling the speed of a DC motor with a PWM signal.
The PWM signal will turn the motor on and off very fast. As we have already seen in Figure5.16, the motor does not attain full resp. zero speed at once, but accelerates resp. decelerates. If the PWM signal is fast enough, the motor will be turned off before it reaches its full speed, and will be turned on
5.10. MOTORS 145
again before it drops to zero speed. So on the average, the motor will attain a speed that is proportional to the duty ratio of the PWM signal, that is,
vM ∝THI/TP W M. (5.6)
The period of the PWM signal is generally within 1-20 kHz. The shorter the period, the smoother the motor rotation will become. If the period is too small, however, then the motor will not be able to attain its intended speed anymore.
Direction Control
Controlling the rotating direction of a DC motor is very simple, the direction is determined by the sign of the voltage differenceUM between the two motor pins. Reversing the polarity of UM will reverse the rotating direction of the motor.
DC Motor Control with H-bridge
Since DC motors draw a high amount of current (from hundreds of mA up to several A) and may not even use the same voltage supply as the microcontroller, they cannot be directly connected to the controller. Instead, a driver circuit is required to generate the required amount of current. DC motors are generally controlled by a four-transistor circuit called aH-bridge, see Figure5.18 (the circuit is greatly simplified and only shows the basic operating principle; for a practical implementation, you need free-wheeling diodes and a means to control the transistors with the microcontroller voltage levels). M M U Vmot A B
Figure 5.18: Controlling a DC motor with a H-bridge.
The H-bridge consists of two totem-pole (push-pull) drivers, calledhalf-bridges, with the load, in our case the motor, connected between them. Fourfree-wheeling diodesmake sure that the voltage that is generated when suddenly turning off the motor does not harm the transistors. The H-bridge (also calledfull-bridge) allows to control the motor with two digital signalsAandB, each of which controls one half-bridge. If one of the half-bridges has input HIGH (upper transistor closed) and the other has input LOW (lower transistor closed), then a voltage difference is applied to the motor pins and causes rotary motion. Inverting the states of the transistors will cause the motor to turn in
A B UM motor action
0 0 0 stand still
0 1 Vmot turn for example clockwise 1 0 −Vmot turn counter-clockwise
1 1 0 stand still
Table 5.1: Possible motor actions based on the states of the control signalsAandB of a H-bridge.
the other direction, so the H-bridge allows direction control as well. Digital speed control is easily possible by setting for exampleB = 0and putting a PWM signal onA.
Table5.1sumarizes the possible actions of the motor depending on the states of signalsAandB. IfA = B, then either the upper two or the lower two transistors are both closed. Hence, the same voltage (either Vmot or GND) is applied to both pins, so UM = 0 and the motor will stand still. If A6=B, then eitherUM =Vmot orUM =−Vmotand the motor will rotate.
DC Motor Characteristics
When you buy a DC motor, the datasheet of the motor will contain all necessary information for operating the motor. The minimum information you need is theoperating voltage range, which gives the voltage range within which the motor can operate. As you know, the voltage determines the maximum speed. A lower voltage than given in the operating voltage range is possible, but the motor may not work well. If you exceed the voltage, the motor will get hotter during operation, which will diminish its life-time. The motor also has anominal voltage, which is its intended operating voltage. Furthermore, the datasheet states thecurrentthe motor needs, both for unloaded operation and for operation with load. An unloaded motor draws less current than a loaded one.
Another important characteristic is therevolutions per minute, which states how fast the motor turns. This parameter is generally given for the nominal voltage.
More elaborate datasheets include several other characteristics of the motor, like itsspeed-torque curve, which gives the relationship between the speed of a motor and the torque it can employ to move a load. As a rule of thumb, the higher the speed of a DC motor, the smaller its torque.