You are on page 1of 2

Motor Control Board:

System Block Diagram

Fig.1 - Block Diagram.


Microcontroller

The microcontroller used (PIC16F876), will handle all commands for the robot. It will
control the speed and direction of the motors through the motor driver. The microcontroller will
be able to tell the position of the robot via encoder output.

Motor Driver

The motor driver consists mainly of two PMOS and two NMOS power transistors
connected in a H-Bridge fashion (fig. 2). This configuration allows for the output voltage to be
of either polarity, thus allowing the motors to turn in both directions. The input voltage controls
the speed of the motors by pulse width modulation, which is handled by the microcontroller.

Fig.2 - Two-Quadrant DC Motor Drive Circuit

CURRENT CONSIDERATIONS

Because the power devices have finite current carrying capability, one must consider the
effects of motor operation on the power devices. Motor current usually depends on load torque
and the commanded acceleration. The most demanding conditions on the power electronics are
usually a stalled or locked motor, or maximum acceleration with an inertia load.
If the pulse width is increased abruptly to quickly accelerate the motor, very high currents
may flow. This will cause an undesirable jerk on the motor and the mechanical system. Worse, it
could exceed the current rating of the power devices. Limiting the rate of acceleration is a fairly
simple task for a microprocessor. However, a simple rate limit does not protect the MOSFETs
under a locked motor or shorted condition. A simple cycle-by-cycle current limit will limit the
current and indirectly limit acceleration. This allows full utilization of the power devices. In
two-quadrant systems a single-sense resistor may be used. Pulse width modulating the lower
transistors allows the current sense resistor to be conveniently located at the bottom.
SENSEFETE transistors can be used for lossless current sensing in two-quadrant systems by
connecting the mirrors together and using a single current mirror resistor. A diagram with cycle-
by-cycle current limit is shown in figure 3.

Fig. 3 - Two-Quadrant DC Motor Drive Circuit with Current Limit.

Encoders

When it comes to digital rotation sensors, the idea is to develop digital signals that indicate
both direction and rate of rotation. The most common arrangement is a pair of digital signals in
quadrature. That is, two digital signals having a 90° phase relationship (Fig. 4). When the shaft
is rotating in one direction, signal A leads signal B; when rotating in the opposite direction,
signal B leads signal A.

Fig. 4 - Desired shaft encoder output signals A and B.

It is easy to determine the direction of rotation using an edge-locked D flipflop (Fig. 5).
Applying signal A to the flip-flop’s clock input and signal B to its data input, signal B is low at
signal A’s rising edge when rotation occurs in one direction; it is high when rotation is in the
opposite direction. The flip-flop’s output signal, Q, therefore indicates the direction of rotation.
Such a direction signal, combined with the rate of one of the signals, A or B, yields the direction
and speed of rotation.

Fig.5 - A rising-edge-clocked D flip-flop decodes rotation direction.

PCB developed

You might also like