Project 008 - Home Built Dual 50A H-Bridge Circuit
Updated 24/01/12
DISCLAIMER: This design is experimental, so if you decide to build one yourself then you are on your own, I can't be held responsible for any problems/issues/damage/injury that may occur if you decide to follow this build and make one yourself.
INTRO
Whilst researching my home built Segway project I knew I'd need a high power DC motor control circuit, something aproaching 50A @ 24vdc if I wanted the Segway to really move (offroad). However, whilst I found a few off-the-shelf designs I just didn't like things like the output terminals being relatively small for the specified loads, and also the small sizes of the heatsinks thus the cooling........I just wasn't convinced.
So, I decided to design and build my own......much more fun.
- A non uControlled design.
- Dual Channel (able to control each output independently).
- ~50A continous per channel @ 24vdc.
- Beefy design in terms of terminals, cooling etc.
- Output stage containing both N-type & P-type Mosfet for push/pull operation.
- PWM controlled with added logic for motor direction control input.
- Added logic for protection against turning both left or right side push & pull mosfets on at the same time (a sure recipe for smoke!).
It should be noted that what it doesn't have in buckets is good thermal protection or a good current limiting design, however, the basis is there for it to be expanded to do so.
PARTS LIST
4 * FQP50N06 60v 50A N-type Mosfet (TO220)
4 * FQP47P06 60v 47A P-type Mosfet (TO220)
8 * TO220 Heatsink (10degC/Watt) - Optional
8 * SB540 40v/5A Schottky diode
4 * TC4431 1.5A Hi Speed Inverted Output Mosfet Driver IC
4 * TC4432 1.5A Hi Speed Non-Inverted Output Mosfet Driver IC
8 * 100nF Ceramic Capacitor
1 * 74HCT08 Quad AND Gate IC
2 * ZVN3306A FET
6 * 4k7 0.24w resistor
8 * 2k2 0.24w resistor
8 * 15k 0.24w resistor
1 * 2200uF 63v Electrolytic Capacitor
1 * 6-way 5mm Pitch Terminal Block (pcb)
1 * 8-way 10A@240V Rated Hi-Current Terminal Block (pcb)
1 * LM2575HV-5 +5vdc Switchmode Regulator IC
1 * 330uH Inductor
1 * 1N5819 Schottky Diode
2 * 100uF 6.3v Electrolytic Capacitor
1 * Suitable heatsink (size/rating will depend on your load application)
TECHNICAL
Design Specifications:
DC supply / Motor drive output = 10 - 30vdc.
PWM / Direction control logic = 5vdc TTL.
PWM frequency = Tested at 488Hz (standard Arduino PWM) & 1.95kHz (should also work a lot higher).
Main output max. load (Amps) = T.B.A. (theoretically = 50A).
+5vdc supply (onboard logic & external)= 0.5 Amp max (1.0A if you upgrade the inductor).
IMPORTANT NOTE: This design offers no real over-current or over-temperature protection. You will also need a good sizeable/suitable heatsink.
Eagle Pcb Files:
PCB layout V1.0 here.
PCB Schematic here.
Using different Mosfets:
Some people have asked me if they could use different Mosfets but ones with a lower maximum Vgs (gate-source voltage).
The 50N06 & 47P06 Mosfets in my circuit have a max. Vgs of +/-25vdc and the 15K/2k2 resistors will give approx 21vdc Vgs. So, if you happen to choose Mosfets with a max. Vgs of 20vdc for example then you can drop the value of the 15k resistors to 8k2 which will give you approx. 19vdc approx for a 24vdc supply.
The mosfets i've chosen also have a low Rds-on of 0.022ohms (@10v VGS), and because I'm using PWM to drive them means they are either fully off or fully on (in saturation) which means it reduces the amount of wasted power and so also reduces the amount of heat generated by the mosfet.
FET protection:
Some protection on the FETs, 2K2ohm resistors protect the 4431/4432 drivers from over-current and also help protect the FET's gate to source maximum voltage which although is specified at +/-25vdc (my max will be +24vdc) doesn't need to be anything like that so I will play with higher values.
The 10k resistors on the gate of the FETs protect the gate from floating in the event of a 4431/4432 driver failure (open circuit).
TEST SOFTWARE
Here's test code I wrote to simply prove the circuit works:
{codecitation}
// PWM Test
// Setup Digital & Analogue I/O Pins
int val1;
int DO_Dir1 = 7;
int AI_Pin1 = 3;
int DO_Pwm1 = 9; // PWM motor output
int val2;
int DO_Dir2 = 6;
int AI_Pin2 = 2;
int DO_Pwm2 = 10; // PWM motor output
// VOID SETUP
void setup() {
delay(50); // Startup delay
/*
// Modify Arduino Timer 1 to increase PWM resolution to 10bit (default = 8bit)
// PWM frequency = 1.95kHz, Pins 9 & 10.
TCCR1B &= ~(1 << CS12);
TCCR1B |= (1 << CS11);
TCCR1B &= ~(1 << CS10);
TCCR1B &= ~(1 << WGM13); // Timer B clear bit 4
TCCR1B |= (1 << WGM12); // set bit 3
TCCR1A |= (1 << WGM11); // Timer A set bit 1
TCCR1A |= (1 << WGM10); // set bit 0
*/
// Outputs
pinMode(DO_Dir1, OUTPUT); // sets as output
pinMode(DO_Pwm1, OUTPUT); // sets as output
pinMode(DO_Dir2, OUTPUT); // sets as output
pinMode(DO_Pwm2, OUTPUT); // sets as output
}
// MAIN LOOP
void loop() {
val1 = analogRead(AI_Pin1); // read the input pin
val2 = analogRead(AI_Pin2); // read the input pin
if (val1 < 512) {
digitalWrite(DO_Dir1, LOW); // Direction Forward
val1 = map(val1, 0, 511, 255, 0); // Integer re-map 0-255
}
if (val1 >= 512) {
digitalWrite(DO_Dir1, HIGH); // Direction Backwards
val1 = map(val1, 512, 1023, 0, 255); // Integer re-map 0-255
}
if (val2 < 512) {
digitalWrite(DO_Dir2, LOW); // Direction Forward
val2 = map(val2, 0, 511, 255, 0); // Integer re-map 0-255
}
if (val2 >= 512) {
digitalWrite(DO_Dir2, HIGH); // Direction Backwards
val2 = map(val2, 512, 1023, 0, 255); // Integer re-map 0-255
}
analogWrite(DO_Pwm1, val1);
analogWrite(DO_Pwm2, val2);
}
{/codecitation}
PHOTOS (LATEST AT THE TOP)
21/01/12 - The first PCB assembled.
I'm also glad to report that it's initially working fine with a couple of small 1A DC motor test loads.
Notes:
The board is not fitted with SB540 Schottky diodes in the photo, and in fact SB540 diodes are a bit big for the holes provided so if you make my board you will need to drill them out to 1.3mm and stand the diodes vertically (as i've since done).
Also, I have not fitted any heatsinks under the regulator or mosfets in the photo, you might want to consider this depending on your loading.
As you can see below I have laid up some of the tracks quite heavily given the loads this board will carry. Depending on the loading more lay-up will be required. Don't simply use solder, use single core copper wire, the bigger OD the better.
24/12/11 - PCB artwork complete:
I've designed the PCB Layout (in Eagle PCB V6) and here's a few screenshots below.
NOTES:
The large terminal blocks on the upper left/right are the motor outputs, and bottom right is the 24vdc supply input. The small terminals on the left are the PWM, DIR control inputs and +5vc AUX output.
The traces to the large terminals & FETs will all be beefed up with some suitable single strand wire soldered along their lengths to increase the current capacity given the loads they will see. The final board will not have a solder mask on those traces to allow easy soldering of the wires.
There is also no solder mask topside under FET's themselves.
And with Eagle PCB V6 comes better support for Google Sketchup/EagleUP and some 3D Visualization. So, here's a couple 3D renders of a partially populated pcb.
PROTOTYPE PHOTOS
23/08/11 - Small design change:
06/08/11 - A bit further along with the PCB assembly:
The thick black single strand wiring is the high current stuff, whilst the yellow wire wrapping wire is the input signal logic etc.
Note: Some of the black wiring will be replaced with thicker stuff subject to high current/load testing.