CURRENT ISSUE
Contests
Feature Article
|
|
Issue #200 March 2007
Inertial Rolling Robot
by Jeff Bingham & Lee Magnusson
Start | Electronics | Drive Motor | Servo Motor | Pressure Sensor | Software | DC Drive Motor Control | Servo Motor Control | Mechanical Components | Manufacturing | Assembly | Findings | Sources & PDF
DRIVE MOTOR
We used a brushed DC drive motor that has a+ and a– inputs. Forward drive
is produced by connecting the positive input to the motor-voltage supply
and the negative input to ground. Reverse drive is produced by switching
the two inputs. Power amplification and bidirectional rotation is accomplished
by means of a MOSFET H-bridge. International Rectifier IRL3103 MOSFETs
with 64 A of continuous drain current were selected because of their low
on-state resistance and their ability to handle extreme currents without
a heatsink.
The motor has a stall torque of only 2 A, but you can upgrade to a larger one if you want. The average voltage to the motor is varied by switching between high and low states of the H-bridge at a high frequency (10 kHz). This is accomplished by pulse-width modulating the voltage signals to the motor. The MOSFET H-bridge is driven by the two International Rectifier IR2184 Half-bridge MOSFET drivers. The IR2184 is designed for automotive use and will operate with 10 to 25 V. Thus, the same 12-V source from the batteries is used for both the gate-drive supply to this driver as well as the voltage supply for the MOSFET H-bridge.
The MOSFET driver has only a single IN command, which makes for convenient interfacing. The driver will turn on the high-side MOSFET for a logic level of 1 and the low side for a logic level of 0. This behavior is optimal in an H-bridge circuit with an inductive load, because the current will automatically continue through the low side of the bridge (see Figure 4). However, by turning on the low-side MOSFET, current can be carried more efficiently through the MOSFET, rather than through the parallel diode. Even though the IR2184 can be connected to the microcontroller directly, a buffer circuit is used to prevent damage to the microcontroller in case of misconnection. The buffer circuit also performs convenient logic functions so that only one PWM channel and one I/O port are necessary on the microcontroller.
![]() |
| Figure 4—During the PWM on state, current passes through the upper-left MOSFET and then the lower-right MOSFET. When the PWM switches off, current continues through the motor inductance and then through the lower-left MOSFET. To reverse the motor’s direction of rotation, the opposite side of the H-bridge is switched. |
Table 1 is a truth table for this logic circuit, which uses a 7404 inverter and two 7402 NOR gates. Thus, the logic circuit sends the PWM signal from one driver to the other, depending on the value at the I/O port. The opposite driver is sent a logic level of 0.
| PWM (TMOV port) | I/O (P72 port) | PWM1 | PWM2 | |
| 0 | 0 | 1 | 0 | |
| 1 | 0 | 0 | 0 | |
| 0 | 1 | 0 | 1 | |
| 1 | 1 | 0 | 0 | |
| Table 1—A logic circuit provides an interface to a single PWM output and a single digital I/O port on the microcontroller. In this truth table, TMOV and P72 are the outputs on the H8/3664 microcontroller. PWM1 and PWM2 are the inputs to the H-bridge. | ||||
A Hall effect current sensor (Allegro ACS706) is set up in series with the motor in order to measure motor current for control purposes. The sensor’s connection is relatively straightforward. It outputs a voltage corresponding to the motor current offset at 2.5 V for zero current, with a sensitivity of 130 mV/A, and has a range of ±15 A. The sensor is connected directly to an ADC port, but it is not enabled for control in software at this time.
We were accidentally shipped a 6-V motor instead of a 12-V motor. The motor worked well for a while, but it eventually burned out. Be sure to purchase a 12-V motor for this electrical design.
|
