Introduction: DIY High Current Motor Driver (h-bridge)

About: hobbyist engineer

The project is to upgrade the motors and electronic in this Power Wheels kids quad bike.
Underwhelmed with the performance of this 12V mini-quad. we planned to upgrade to a 24v system with 2 new traxxis 775 brushed motors
after researching commercially available motor driver boards and finding that most were either kinda wimpy(see included comparison photo) or rather expensive i decided to design a simple Arduino based solution
Design Brief

24v minimum

bi-directional motor control

PWM control

scalable high current capable( 100AMP)

minimal components

5v stepdown for logic

battery voltage sense

adruino nano controler

access to inputs for specific uses (throttle [including top and bottom trim] , direction, enable, 1extra)

access to unused pins for outputs (led out)

the obvious solution is to use the mosfet based H-bridge circuit

im going to show you how i designed and built my high current H-bridge driver

Step 1: Find a H-bridge Driver IC

the H-bridge driver IC is the chip between the Arduino and the MOSFET outputs. this IC takes HIGH/LOW signals from the Arduino and outputs the same boosted signal to drive the MOSFET gates, specifically its most important function is to increase the voltage to the high side fets above VCC (battery + input) allowing for the use of all N-MOSFETs
some drivers also have special circuitry to prevent shoot through (when 2 fets create a direct short circuit to ground destroying the fets.)
i eventually settled on the NXP MC33883 Full H-bridge driver IC
chosen because
- it includes 2 half bridges (so i only require 1 IC)
- built-in high side charge-pump
- requires only 7 additional components (including protection circuit)
- operates with 5.5-60V input (with under and over volt lockout)
-1amp peak drive current

negatives
unfortunately does not have shoot through protection (so must be done in software and tested with current limited power supply)
requires 5 input signals
rather expensive at $8.44 each on mouser
https://nz.mouser.com/ProductDetail/NXP-Freescale/...
datasheet https://nz.mouser.com/datasheet/2/302/MC33883-1126...

with this chip in mind, we can now design our circuit around it

Step 2: Circuit Design

we will use online tool EASYEDA (easyeda.com) to design the circuit
(not affiliated but the tool works alright and easy ordering of PCB through JLCPCB.com)

From the datasheet for the MC33883 driver, we can find the application schematic (with external protection circuit)
we will copy this circuit as we don't need to reinvent the wheel here just use the recommended layout and recommended capacitor values, we will add the 18v zener diodes and capacitors to cap the gate-source voltage below the typical MOSFET 20v max Vgs

The one difference we will add to the circuit is the optional paralleled MOSFETs to increase current capability
to do this we just need to ensure we have a resistor on the gate of each FET. with parallel FETs this resistor helps to balance the load and switching characteristics of the parallel pair (research more for high loading to avoid issues)

Decisions to be made..
max voltage?
I'm running 24v, so I can tie VCC and VCC2 of my mc33883 chip together (the limit on vcc2 is 28v but I could have separate supply and have a max VCC voltage of 60v)

How to power the Arduino?
I went with a small 5v 500mA switching regulator which comes prebuilt on a pcb with 3 pins
which operates between 6.5-36v perfect!.
https://nz.mouser.com/ProductDetail/490-VXO7805-50...
all I need to do is add a polarity protection diode, input and output capacitors. done.

I want to be able to get the battery voltage and shut down when its low so a voltage divider to limit the voltage to my Arduino pins. 8 resistor pads 2paralled and 4 series loos like this +==|==- this should mean i can easily configure it differently without having specific values

Figure out what outputs we need from the Arduino to the driver
we need 2 PWM for the high side FETs and 2 digital (or pwm) for the low side FETs and we also need 1 enable line for the driver you could get fancy with some kind of NAND gate logic (and maybe on delay) for hardware shoot through protection if you need it.

Inputs
I chose to use all the Analog inputs for throttle, enable, direction, and trimming mainly to ensure they were available and broken out all have pads for pulldown resistors and a 5v pin available and inputs work as active when high.(if the enable line was active low and throttle was stuck if the 5v wire was broken the motors would run continuously)

outputs
I included a 5pin +ground output header for LED battery indicator/ access to the pins (remaining digital pins)
also included is a header for last remaining PWM pin
(a note on PWM i chose to put high side fets, low side fets, and PWM output each on separate timer channels of the Arduino this should allow me to play with the timers differently etc etc.)

Step 3: Component Selection

for this board, I decided to go with mainly surface mount components
soldering smd is not too difficult if you choose your devices wisely.
0805 size components for resistors and capacitors are pretty simple
to solder without the aid of a microscope and only tweezers are needed for handling.

some people say 0603 is not too bad but its starting to push the limit.

glass zeners I found a little tricky to maneuver

Component list from power to driver to digital (what I used)

8x TO220 N-ch mosfets 60V 80A IPP057N06N3 G
4x 1N5401-G general purpose power diode 100v 3A (200A peak) (these are wrong i should have used Schottky diodes see how they go)
8x 0805 50ohm resistor
2x 0805 10ohm resistor
2x 0805 10nF 50V ceramic capacitor (protection circuit)

2x 18v zener diode 0.5W ZMM5248B (protection circuit)
1x nxp MC33883 H-bridge gate driver
1x 0805 33nF 50V ceramic capacitor (for driver)

2x 0805 470nF 50V ceramic capacitor (for driver)

1x generic through-hole polarity protection diode (already had it)
1x 3pin dc/dc converter max 36vin 5v out VXO7805-500

3x smd 10uF 50V 5x5.3mm electrolytic capacitor
3x 0805 1uF 50V ceramic capacitor (5v logic circuits)

9x 0805 10k resistor (pulldowns and voltage divider configured to make 15k)
4x 0803 3k resistor (configured series parallel to remain 3k.. a waste I know)
2x 10k through-hole trimmer potentiometers
1x Arduino nano
various headers, heatsinks, other items like switches, potentiometer etc

I ordered my parts from mouser.com and ordered most parts in lots of 10 and added several other parts to a total of nz$60 to get free shipping to New Zealand (a saving of ~nz$30)

Total component cost of build about US$23 +(whatever you buy extra of to get better deal BUY BULK)+pcb

Step 4: PCB DESIGN

Now we have selected the components and hopefully have them on the way we can confirm the component packages in the schematic and begin to layout our board
PCB layout is an art form an I'm not about to try to teach it. Try youtube for that.
what I can do is point out my mistakes on this board

I put my mosfets horizontal
I designed my H-bridge to work with my planned heatsink solution and as a result, I have power traces which are significantly narrower than I would like them to be. I compensated by doubling up the traces to the bottom side of the board and removing the solder mask to that I could add solder to increase current handling

Power connections.
I decided to use large 10x10mm pads to direct solder cables for +v -v motorA and motorB connections rather than screw terminals etc (I realize I will need mechanical strain relief) however because of my large heatsinks it will be difficult to solder the cables to these pads. life would be easier if I had placed these pads of the opposite side of the board to the heatsinks

I should have increased the size of the vias for the through-hole freewheel diodes. as a result, these are now surface mounted (pay attention to your package sizes


convert your design to a Gerber file and send it to your favorite PCB fabricator
i can recommend JLCPCB they did a good job for me and reasonably priced

Step 5: Assembly and TEST THE BOARD!!

Now you have your parts and PCBs its time to assemble and solder
takes maybe an hour or 2


first, check you have all the parts and that your PCB is in good condition
gather together your tools.
basics you will need
soldering iron
solder
tweezers
solder wick and or solder sucker
flush cut pliers

like I said 0805 parts aren't too hard
start with smallest components first
resistors, caps, diodes
then the IC
install the Arduino either directly or with headers for removability
install the headers

TEST THE BOARD FOR SHORT CIRCUITS

now load blink sketch to the Arduino and unplug the USB and power the board from a battery or power supply to ensure the regulator section is working correctly
install the mosfets last

TEST THE BOARD FOR SHORT CIRCUITS

upload driver software and power the board from a current limited supply say 100mA should be plenty
we want to ensure the H-bridge in all states to ensure there is no event of shoot-through.
if there is the supply will immediately current limit and the board will likely turn off due to low voltage

your board is now ready to drive a motor or 2