Driving the ‘small’ motors that may be used in robotics doesn’t usually pose much of a problem. Servo motors actually have their own drive electronics, stepper motors can be easily driven by conventional power transistors or by ULN2803 ICs as has been shown elsewhere in this issue, as they rarely draw more than a few hundreds of mA. For small DC motors, simple transistors will suffice, unless you prefer for example the 1131630 from Sanyo, though limited alas to a current of 400 mA and a voltage of 6 V. On the other hand, as soon as the motor starts drawing 1 A or more, or its supply voltage exceeds 20 V or so, the situation gets more complicated — all the more so because many of you don’t much care for power electronics. So, this article hopes to give you a few ideas or research paths for driving such motors.
The first method for controlling a higher-power DC motor is none other than the good old relay, or to be precise, pair of relays. As long as you wire them as shown in Figure 1, you have control over the operating direction, depending on which relay is engaged and which is not, as well as a stop control that acts as a very effec-tive electrical brake, when both relays are in the same position. In this situation, the motor is short-circuited and is braked by its own back emf (electromotive force). Relays capable of switching 10 A and yet only requiring 5 V and a few tens of mA for their coils are commonplace nowadays (see for example the Finder relays) and so can be used in this way without difficulty. If you don’t like this electromechanical solution, we recommend you to use the bridge power IC, one worthy representa-tive of which is the L298 from ST Micro-electronics. As its internal block diagram shows (Figure 2), this IC includes four bridge power amplifiers, preceded by logic control circuitry. Originally designed for driving ‘big’ stepper motors, this IC is suitable for a host of other applications, of which there are a few examples. By virtue of the relative independence of the amplifiers it contains, it can be used to drive four motors, as long as you are content with a single direction of rotation. It is then possible to take one of these motors connections to earth or to the supply rail, as indicated in Figure 3. By juggling with the combinations of logic levels on the control and enable inputs of the L298, you can even have two options for motor stopping, as indicated in the table below: the ‘freewheel’ or unbraked mode, or the braked mode, as seen previously with the relay circuit. Table 1 shows the relevant logic level combinations. If the direction of rotation of the motor has to be able to be changed, it is necessary to use a bridge or H connection, as shown in Figure 4.
Note that it is possible to drive two motors in this way from one L298 since the IC contains four amplifiers. So, a single L298 is usually enough for the right and left propulsion motors of a mobile robot. Although the circuit does have protection against overheating, be aware that you can increase its operating safety by monitoring the current drawn by the motors. To do this, all that you have to do is to fit a very low-value resistor between the SENSE A or SENSE B inputs and earth. All the current drawn by the motor connected to the corresponding amplifier will then pass through this resistance, and by simply applying Ohm’s law and measuring the voltage at these inputs, it is possible to monitor this current. If you don’t wish to use this monitoring, you are recommended to protect the IC against possible shorts of its outputs to earth, which are the most likely to occur in a robot (a motor terminal touching the metal chassis, for example!) In this case, STMicroelectronics recommends the circuit in Figure 5. This circuit trips in 10 its and resets by itself when the short disappears.
The L298 is capable of withstanding a maximum supply voltage of 46 V and each of its power amplifiers can supply a current of 2 A, already a more than comfortable value, even for a relatively heavy mobile robot. If that isn’t enough for you, it is also possible to connect the power amplifiers in parallel, as long as you go about it the right way. You then have a maximum out-put current of 35 A. To do this, you must adhere to the circuit in Figure 6 and no other; that is to say, you must only parallel amplifiers 1 and 4 on the one hand, and 2 and 3 on the other. lust before we reach the end of our arti-cle, cb note that the L298 does not include built-in protection diodes, so it is vital to provide them externally as we have done in each of our figures, otherwise the L298 is guaranteed to be destroyed the first time the robot’s wheels tum! This IC is of course not the only one that can be used for driving higher-power DC motors for robotics applications. More recent and/or higher performance pack-ages do currently exist. But the L298 does have the advantage of being readily available, inexpensive, and able to fulfill a wide range of needs, which to our mind more than justifies this presentation of its various modes of use. And if you are ever so slightly curious, you’ll find copious appli-cation notes about it on the STMicroelectronics website (www.st.com), which will be a good source of additional ideas for implementing it.