In the world of robotics, the
mobile robots have got its own place in the hearts and minds of robotic
developers and designers. Idea of the project is to develop a general purpose
robotic mobile platform that can carry reasonable load (20Kg) in the outdoor
environment.
One of the important components
of the mobile robot platform is the suitable DC motor and drivers to control
these motors. I tried few motors normal DC motors and so called High torque motors. BTW, I have made a small indoor navigation robot using these motors and drivers that I will try to post later. I decided to re-purpose the two-wheeler starter motor. For the trial, I bought an old scooter starter motor, in the Bangalore, INDIA old scrap market for about INR 500. It consumes about 8A under no load condition. For the drivers, I tried few L298 based
drivers but it did not meet my current (8A) requirement. Being a student, my funds are
limited and I don’t learn anything when I buy an off-the-shelf driver. So I decided to make my own
motor driver. This post explains the details of the design.
Driver Design
Motor drivers are used to deliver
the required amount of power to the motors while at the same time enable the
intelligent controllers like microcontrollers to control them. My plan is to
design a motor controller that can deliver about 20A continuous current with
locally available components. I purchased these P-channel FET (IRF4905) and
n-channel (75NF75) FETs.
These can deliver a reasonably high current (74A and 75A respectively) and low
on resistance (20mΩ and 13mΩ respectively). Direction control is achieved through 5V
Logic direction control signals and speed control is achieved through PWM
(Pulse width modulation) duty cycle control. Driver is a traditional H-bridge
controller with P-FETs as high side controller and N-FETs as low side
controllers. In addition, P-FETs and N-FETs are used for direction control
while only N-FETs are used for speed control. The FETs chosen can operate up to
50V so the driver can operate at least at 12V and 24V. Discrete transistors
(BJT) are used to implement the required logic (Detailed explanation below) and
to drive P-channel FETs Gate terminals to 12V. In addition, the driver has back EMF
measurement for direction switching and driver current sensing feature when
there is a need.
Control Logic
The driver has logic to control
both direction and speed of rotation. Direction is controlled by the enable
signals to the gate inputs of all the FETs of the H-bride. Speed is controlled
by the PWM of the Gate input of the low side FET (N-channel). Further direction
can be controlled either by a single input direction control signal or four
independent input direction controls. Four independent input direction control
has the advantages of support for braking the motor electronically. Single
input or four independent input control can be selected through berg-stick
jumpers (N1_JUMP, N2_JUMP AND P2_JUMP). The complete driver circuit (including
transistor control) works-off of 12V supply to avoid any requirement for 5V
regulator. P-Channel and N-Channel FET’s gate terminals are logically
complement to each other. In other words, P channel FET is turned ON when the gate
terminal is low while the N channel FET is turned ON when the gate terminal is
high. Left and right side P channel FET gate
control circuitry is complementary to each other so is N channel FET control
circuitry. Schematic of the control circuitry is given below. The left P-FET
(PL), the left N-FET (NL), the right P- FET (PR) and the right N-FET (NR) have
transistor driven control inputs P1, N1, P2 AND N2 respectively.
Single Input Direction Control (JUMP_MODE-1)
PWM
|
DIR/P1
|
N1
|
N2
|
P2
|
M+
|
M-
|
DIRECTION
|
ON
|
HIGH
|
X
|
X
|
X
|
12V
|
GND
|
FORWARD
|
ON
|
LOW
|
X
|
X
|
X
|
GND
|
12V
|
REVERSE
|
OFF
|
HIGH
|
X
|
X
|
X
|
12V
|
-
|
STOP
|
OFF
|
LOW
|
X
|
X
|
X
|
-
|
12V
|
STOP
|
When the PWM is ON and based on
the direction control (DIR/P1), the motor either runs in forward or reverse
direction. When the PWM is OFF, the motor doesn’t run because it gets only the
positive potential (12V) in either of the terminals depending on DIR but does not
have the return path to the ground.
Independent Input Direction Control (JUMP_MODE-2)
PWM
|
DIR/P1
|
N1
|
N2
|
P2
|
M+
|
M-
|
DIRECTION
|
ON
|
HIGH
|
HIGH
|
HIGH
|
HIGH
|
12V
|
GND
|
FORWARD
|
ON
|
LOW
|
LOW
|
LOW
|
LOW
|
GND
|
12V
|
REVERSE
|
ON
|
HIGH
|
HIGH
|
LOW
|
LOW
|
12V
|
12V
|
ELECTRONIC BRAKE
|
ON
|
LOW
|
LOW
|
HIGH
|
HIGH
|
GND
|
GND
|
ELECTRONIC BRAKE
|
OFF
|
HIGH
|
X
|
X
|
HIGH
|
12V
|
-
|
STOP
|
OFF
|
LOW
|
X
|
X
|
LOW
|
-
|
12V
|
STOP
|
OFF
|
HIGH
|
X
|
X
|
LOW
|
12V
|
12V
|
ELECTRONIC BRAKE
|
OFF
|
LOW
|
X
|
X
|
HIGH
|
-
|
-
|
COAST
|
When the PWM is ON and all the independent inputs are HIGH, the motor runs in forward direction. When the PWM is ON and all the independent inputs are LOW, the motor runs in reverse direction. If the left side FET control inputs (P1 and N1) are HIGH and the right side FET control inputs (P2 and N2) are LOW, then both the motor terminals gets 12V. If the left side FET control inputs (P1 and N1) are LOW and the right side FET control inputs (P2 and N2) are HIGH, then both the motor terminals are connected to the ground. When the PWM is OFF, N-Channel FETs are always turned OFF, only P-Channel FETs undergoes switching based on the corresponding control inputs. In COAST mode, both the terminals of the motor becomes floating.
Back EMF measurement
Back electromotive force (EMF) is a voltage that appears in
the opposite direction to current flow as a result of the motor’s coils moving
relative to a magnetic field (when the motor acts as generator). The back EMF
is an indication of the speed of the motor, so knowing the value of back EMF gives
us an idea about the speed of the motor. The voltage divider networks on both
the terminals of the motor gives their potentials and their difference gives us
the actual back EMF. If there is a requirement, back EMF value can be used for
direction switching. The back EMF is
available as two different voltages at the berg-stick connectors (BE1 and BE2).
Back EMF measurement |
Driver current measurement
Some times there is a need a for
motor driver current measurement. The driver has a current sensing circuit that
senses the current through the motor to the ground. The current is sensed through
the current sensing resistor network. A set of eight 10mohm (1/4 watt)
resistors are used to reduce the power dissipation through individual resistors
and also provide enough conduction path for the current flow. The voltage drop
is filtered and amplified using a non-inverting amplifier (re-used the circuit
from here) and is available at the berg-stick connector (CURRENT SENSE). Considering
the voltage drop at the resistors for maximum rated current of 20A,
amplification factor (gain) is 180 so the maximum voltage will be 4.5V.
Current Sensing Circuit |
Note: Back EMF measurement and
Driver current measurement circuit is re-used from here
Layout consideration
One of the important thing to
consider in the PCB layout is managing the PCB trace width to handle the
required current. To address this, the PCB trace width from supply to FET
drain/source, through the motor terminal and then to the ground is made as wide
as possible (10 mm approximately). In
addition, these traces are routed on both sides of the board and manufactured
using 70um (2oz) thicker tracks. Assuming 35A/mm2, this should be able to carry
much more than 20A current with bottle neck being the FET source and drain
terminal connection to the board.
Current Status
I tested this circuit on a bread board and a general purpose PCB (for FET wiring) and the circuit seems to be working and deliver consistently about 8A. The P-channel FET surface temperature was about 28 Deg C without any heat-sink.I have got my PCB board after it took a long time to manufacture. In course of time, I will update you with the working PCB Driver Model. Here is my PCB!
I have Assembled my PCB and updated with circuit connections of the driver with the DC Motor.
Here we go for the first trail tested with scooter self start motor. The speed of the motor is controlled from the PWM signal from the Micro-controller.
Comments and feedback are welcome.
I tested this circuit on a bread board and a general purpose PCB (for FET wiring) and the circuit seems to be working and deliver consistently about 8A. The P-channel FET surface temperature was about 28 Deg C without any heat-sink.I have got my PCB board after it took a long time to manufacture. In course of time, I will update you with the working PCB Driver Model. Here is my PCB!
High Current DC Motor Driver PCB_Front-side |
High current DC Motor Driver PCB_Back-side |
I have Assembled my PCB and updated with circuit connections of the driver with the DC Motor.
PCB Board Connections |
Here we go for the first trail tested with scooter self start motor. The speed of the motor is controlled from the PWM signal from the Micro-controller.
Comments and feedback are welcome.
Keywords: h-bridge, dc motor driver, motor driver, high current driver, motor control, robot, robotics, back emf, current sense, driver, fet, mosfet,dc motor control, dc motor controller, dc motor drive, h bridge motor driver, dc motor drives, motor driver, motor driver ic, motor driver circuit, dc drive, h bridge circuit, motor control.
Hİ
ReplyDeleteİ HAVE A QUESION
hI
Deletei HAVE A ASWER
Hi
DeleteI HAVE A CONFUSION. :D