Motor controller uses fleapower

Texas Instruments CD4001B CD4013B

A simple, permanent-magnet dc motor is an essential element in a variety of products, such as toys, servo mechanisms, valve actuators, robots, and automotive electronics. In many of these applications, the motor must rotate in a given direction until the mechanism reaches the end of travel, at which point the motor must automatically stop. Although you can use microswitches to stop the motor at the end of travel, their size, weight, and cost can be prohibitive, particularly in low-cost, portable items. The circuit in Figure 1 implements a low-cost, micropower, latching motor controller that uses current sensing rather than switches to stop the motor. The design is optimized for a supply voltage of 3 to 9 V, making it well-suited to battery-powered applications. To understand how the circuit works, assume that cross-coupled flip-flops IC1A and IC1B are both in a reset state, such that the D input of each one is high. Because both Q outputs are low, the H-bridge transistors, Q1 to Q4, are all off, and the motor is idle.

This latching motor controller uses current sensing, rather than switches, to stop the motor.
Figure 1. This latching motor controller uses current sensing, rather than switches, to stop the motor.

A momentary closure of the Forward switch latches the Q output of IC1A high and turns on MOSFET Q2. This action, in turn, provides bias for Q3, causing the motor to run in the forward direction. The circuit is now latched, and, because IC1B’s D input is now low, any closure of the Reverse pushbutton has no effect on the H-bridge, and the motor continues running in the clockwise direction. IC2 contains a comparator and a bandgap reference-voltage (nominally 1.182 V) output at the Reference terminal (Pin 6). The motor's armature current generates a sense voltage, VSENSE, across current-sense resistor RSENSE. The comparator compares VSENSE at the IN+ input to a reference voltage, which R5 and R6 set, at the IN– pin. Under normal running conditions, VSENSE is lower than the voltage at the IN– input, and the comparator's output at Pin 8 is low. However, when the mechanism hits an end stop at the limit of travel, the motor's armature current increases rapidly, causing a corresponding rise in VSENSE. The comparator detects this increase, and the comparator's output goes high, thus resetting flip-flop IC1A. Transistors Q2 and Q3 now turn off, and the motor stops running.

Because IC1B’s D input is now high, closing the Reverse switch latches IC1B’s Q output high. This action turns on Q4 and Q1 in the opposite arm of the H-bridge, such that the motor now runs in the counterclockwise, reverse direction. IC1A’s D input is now low, thereby disabling the Forward pushbutton, and the motor continues to run in the reverse direction until the mechanism hits the opposite end stop. Once again, the comparator detects the increase in armature current, and the comparator resets IC1B and turns off the motor. The motor's cutoff threshold is a function of RSENSE, R5, and R6, and the bandgap voltage at the REF pin. RSENSE should be in the region of a few ohms to ensure that VSENSE is also small when the motor is running under normal loading conditions. Keeping VSENSE low makes practically all of the supply voltage available to the motor and ensures that the gate-source voltage of Q2 and Q4 is as large as possible. You should choose values greater than 300 kΩ for R5 and R6 to minimize the loading on the REF pin. In noisy environments, it may be necessary to decouple the IN– pin.

Filter components RF and CF serve a dual purpose. They are necessary to smooth the relatively “lumpy” voltage appearing across RSENSE and are also essential to prevent the motor's in-rush current at turn-on from tripping the comparator. Values of 100 kΩ and 100 nF should be adequate, but some experimentation may be necessary to determine the best time constant for your application. Reset components C2, D5, and R7 ensure that the comparator's output is high at power-up. You should select all transistors in the H-bridge to produce minimal saturation voltage when the devices conduct the maximum motor current. Choose low-VCE(SAT) devices for Q1 and Q3, and make sure that MOSFETs Q2 and Q4 can receive full enhancement at the minimum operating voltage. Depending on the type of MOSFETs you use, you may need to add a resistor in series with each gate to prevent spurious oscillation.

You should select resistors R2 and R3 to provide adequate base drive for Q1 and Q3 at the lowest supply voltage. Depending on the application, it may be possible to replace Q1 and Q3 with p-channel MOSFETs, in which case R2 and R3 can be fairly large. Freewheeling diodes D1 to D4 are necessary to commutate the currents generated by the motor's back-EMF at turn-off. You may require capacitor C1 to suppress any noise that the motor's brushes produce. The circuit's quiescent, motor-idle current drain is extremely low, making it ideally suited to battery-powered applications. Measurements on a breadboard circuit operating from a 9 V supply voltage reveal a quiescent current of just 9.5 µA. You can adapt the circuit to produce a nonlatching version in which the motor runs in the forward or the reverse direction only while the associated switch is closed. However, this approach is not simply a matter of gating the comparator's output with each switch; that action merely causes the motor to hiccup at the cutoff point. Instead, you must again latch the comparator's output and add some extra logic in the form of a quad NOR gate. Figure 2 shows the arrangement, in which NOR gates IC3B and IC3D control the H-bridge, and the comparator controls the flip-flop's reset pins as in Figure 1.

This addition to the circuit in Figure 1 yields a nonlatching controller, in which the motor runs only when the associated switch is closed.
Figure 2. This addition to the circuit in Figure 1 yields a nonlatching controller, in which the motor runs only when the associated
switch is closed.

The motor runs in the forward direction only while you depress the Forward button; releasing the pushbutton stops the motor. While the switch is closed, IC3A holds IC1B’s D input low, thereby ensuring that the Reverse switch can have no effect on the motor while the Forward switch is closed. Once you release the Forward switch, you can use the Reverse switch to reverse the motor's rotation. Again, the motor runs only while you depress the pushbutton. You can see from the symmetry of the circuit that closing the Reverse switch locks out any operation of the Forward switch. When the mechanism hits an end stop in either direction, the comparator resets the relevant flip-flop and shuts off the motor.

Materials on the topic

  1. Datasheet Texas Instruments CD4001B
  2. Datasheet Texas Instruments CD4013B
  3. Datasheet Analog Devices LTC1440
  4. Datasheet Analog Devices MAX931

EDN