Step 2: The Motor Driver
So I thought I would just make an extremely simple dual h-bridge that could handle at least 25 amps at 24vdc continuous and handle surges of up to 100amps for a few seconds. Once I found out that you can parallel Mosfets and multiply their current carrying capacity accordingly, I thought I would come up with a simple design and slightly complicate it by adding more mosfets until I had enough to handle the current that I needed. Digikey has a good selection of Mosfets to choose from and good filters to narrow it down by what you need, so I spent a lot of time looking for Mosfets that were rated for around 50amp and could handle over 30 volts. Also, they have to be cheap because my plan is to use a bunch of them. I decided on the FQP47P06 p-channel and the FQP50N06L n-channel Mosfets from Fairchild Semiconductor, which I bought from Digikey.
If you are wondering what an H-bridge is, find out here: en.wikipedia.org/wiki/H-bridge and this will all make more sense to you.
The design is simple: 2 P-channel mosfets control the high-side switches and 2 N-channel mosfets for the low-side switches. But instead of using 1 mosfet for each switch, lets use 3. Now we have 12 mosfets per H-bridge (3 mosfets x 4 switches) and theoretically the ability to carry 150 amps (that is not accurate though). The board is as small as I could make it with nothing touching. Each set of 3 mosfets have heatsinks and are bolted together to help dissipate heat. Also, there is an 80mm cooling fan mounted directly above mosfets to further keep them cool. The mosfets are very good at handling sudden changes in direction and speed changes.
Since there are 24 mosfets in total (8 groups of 3) I dubbed it the Triple-8. It is running at the Arduino default PWM frequency of 1kHz (I plan on playing with that to get the frequency higher). The board has 4 inputs, 2 for each bridge. If you bring an input HIGH, that side of the bridge goes HIGH.
Ideally, you would control the board by holding 1 input LOW and applying a PWM signal to the other input. This allows for easy speed control. I have written into the code that if you bring digital pin 7 HIGH, the code switches to Relay mode and either turns the mosfets all the way ON or all the way OFF. This is far more difficult to control, but is useful sometimes.
If you are interested in building your own H-bridge you can download the eagle file to etch a pcb and the schematic to show where everything goes. You can get everything to make this dual h-bridge at Radio-shack (including the copper clad), except the Mosfets and a special resistor network I used to save space. I bought most of the parts from Digikey though because it was cheaper and arrives to my house in 2 days.
Here are the parts needed for this motor driver:
(12) FQP47P06 - P-channel mosfet 47a 60v - Digikey - $1.73 ea
(12) FQP50N06L - Logic level N-channel mosfet 52a 60v - Digikey - $1.04 ea
(4) 2n7000 - Logic level N-channel mosfet 200ma 60v - Digikey - $0.26 ea
(8) 4606X-1-470LF-ND - 47ohm bussed resistor network - Digikey - $0.25 ea
(6) ED1609-ND - 2 position screw terminal - Digikey or Radio Shack- $0.46 ea
(24) CF1/84.7KJRCT-ND - 4.7k 1/8w resistor - Digikey or Radio Shack - $1.78 (for 50pk)
(1) PC9-ND - 3"x4.5" 1-sided copper-clad .064" 2oz copper - Digikey or Radio Shack- $4.66
(4) P5575-ND - 1000uf Capacitor or similar - Digikey - $1.19 ea
(1) 330ohm - 1kohm resistor 1/4w - for power LED, doesn't have to be exact
(1) power LED any color you like, I use the 3mm size to save space
Maybe something smaller?
If you are going to use this for something smaller than a 100lb lawnmower, you can look up one of the many H-bridge circuits and build your own smaller motor controller with as few as 4 mosfets (or BJT transistors) or even use a packaged IC H-bridge like the l293d (dual 1 amp) or the l298n (dual 2 amp).
Or if anyone is interested, I will post a schematic and Eagle .brd file for a smaller version of this H-bridge that only requires 8 mosfets total (everything else is the same), and it can handle about 10amps at 24vdc.
Etching:
I am not going to go into all the details of PCB etching, because there are already many excellent instructables on that topic. So once you download my .BRD file of my motor controller, all you need to do is print the .brd file onto some magazine paper using a laser printer, and iron that onto a piece of clean copper-clad. Then etch it with your favorite etchant solution (I use 2 parts Hydrogen Peroxide to 1 part Muriatic Acid and it works perfectly). And remove the toner with Acetone when done etching.
For ease of assembly I designed this board to be Single-sided and to use only through-hole components, no surface-mount stuff to mess with! Yay for you.
You can get the .brd files for the various h-bridges at www.rediculouslygoodlooking.com
Remove these ads by
Signing Up















































Visit Our Store »
Go Pro Today »




I don't like the sprocket and chain system though, but I haven't done enough research or know for sure I can do it any other way. I'm worried the chain is too complex and something weeds and twigs will get caught in.
The main problem I'm having is I can't find these wheelchair motors for a reasonable price. I live in Australia and there don't seem to be any local cheap ebay auctions for these, and shipping on these suckers from the USA is $100-$200. I can't even find a cheap old wheelchair.
Is there a more... retail... kind of product I can use? Something like a servo/actuator I can order? I have no idea what I'd need to look for in terms of torque though. What sort of specs would I need to ensure in such a product to make it work with this project?
I need it to go up steep hills (30 degrees?) in long grass on rough ground. I'm already getting hardier wheels, larger drive wheels, and I found a company in Australia called Fallshaw that makes puncture-proof semi-pneumatic castors (though I can't find a price!), I will check out one of their stockists soon.
Because I need to mow my rocky terrain sooner rather than later, I might build the frame and use it like a push mower until I can get the motors and retrofit the electronics.
Any suggestions on alternatives to wheelchair motors would be appreciated.
If you have any more questions feel free to ask me, i would upload a video but i finished it then pulled out all the electronics in the back pannel to install an alternator.
I was denied the money I worked 2 years but the project eventually end only needs to be persistent.
If there are old people living near by (lol) there should be a scooter shop which will have parts. Batteries I got for $5 each (deep cycle) as they replace both batteries at once and one is normally "still ok".
Hope this helps
you are correct, 8 switches, each with 3 mosfets each. You can use 4 wires for each motor, but you can also connect the opposite (diagonal) legs of the H-bridge together, which are the 2 you would turn on separately to make the motor move. I decided to tie those opposite pins together in the circuit so you would only need 1 wire to go forward and 1 wire to go reverse for each motor.
If you have my book, check out page 94, fig 3-11. The second and third diagrams show how if you close switch 1 (S1) and switch 4 (S4) at the same time, current can flow through the motor and it will go one direction. If you close S2 and S3, it will go the other way. When the opposite inputs are tied together like this, the only thing you need to be concerned with to keep the board safe, is not turning on both inputs for one motor at the same time... which would open all switches and cause a short circuit for that h-bridge (see figure 3-12 on pg 94).
I hope that helps
~jd
The capacitors are used to store electricity for those times when the battery is just not enough. While these are not "required", they will greatly improve the stability and overall operation of the motor controller. I usually add a few capacitors to every pcb to smooth out the voltage ripples caused by deficient immediate supply from the batteries. You are welcome to try it both ways to see what you think (thats what i did)... it should not hurt the board to do without the capacitors, though they are only about $1 each and without them you will likely experience jittery movements from the motors. Just make sure to get capacitors with a voltage rating of about 50% higher than the battery voltage. The capacitance (microfarad in this case) will determine how much energy the capacitor can store, so generally larger is better for a motor controller, but I typically use around 1000 - 3000 microfarad (uF) value, and you do this by adding (2) 500uF caps or (1) 1000uF, simply add the capacitances together of all the caps that you use... make sure they all have the same voltage rating though.
Hey
goes from arduino for each mosfet, tending one way out of the arduino ide two mosfet on the high side and low, can any another logic level, because the output is 5v arduino which is insufficient to completely open standard mosfet.
Here's a picture:
http://www.dodaj.rs/f/Q/4J/2EuyX78E/fda89k9g1qwb96j.png
http://www.dodaj.rs/f/1b/Gf/3VPVduTf/h-most.jpg
yes, you can use any other logic-level N-channel mosfet to drive the P-channel mosfets. They do not consume any current, so the amperage rating should not be a concern.... this is why I originally used the 2n7000. They are an excellent and cheap N-channel mosfet with a logic-level gate and it can switch 200mA.
I have routinely used the much larger FQP50N06L logic-level power mosfet to switch very small loads, it does not hurt anything, but you may pay $1.50 for a power mosfet and around $0.60 for the smaller ones.... but availability usually rules that decision.
regards,
jd
it looks like that mosfet should work fine. It is the same chip.
i want to design a motor drive circuit for driving 2, 5A 22v DC motors. Motors will be used in an electric wheel chair, i also want to control the speed of motors with PWM. Can you provide me with any help
~jd
I may have responded to the wrong person, but yes you can use any logic-level mosfet in place of the small 2n7000. If you are using my PCB design for the triple8 motor-controller, it has holes placed for use with either transistor package (the smaller to-92, and the larger to-220) which have different pin positions. So you can use either the 2n7000 type or the FQP50N06L type.
I would be happy to help, but might need slightly more info about your motors and the weight of your bot. I have several designs for H-bridges that are smaller than the triple8, easier to build, and cheaper parts... but I would want to make sure I give you a design that works for your purpose.
~jd
It looks like those motors are ungeared (is that right?)... and if so, they will draw far more current than 5amps under full load. Especially if they are going into a combat robot (I gather from the fact that it will have a weapon system...). I would go with a 25 amp (minimum) motor-controller to be safe. I used a set of (4) 100w Currie scooter motors (ungeared and about the same size as yours) to drive a small battle-bot, using (4) 12amp Sabertooth motor-controllers, and they tripped the overcurrent protection with very little effort... ended up using a 25amp driver and they were fine.
You can use the Triple8 design as used on the Lawnbot, or I have another design if you care to see it.
~jd
Here is one of the motor-controllers I designed for my book:
https://sites.google.com/site/arduinorobotics/home/chapter8
It will handle upwards of 30amps and has an optional current sensor built in that you can read with the Arduino.
~jd
You can however, use Sealed Lead-Acid (SLA) batteries, like the ones used on an electric scooter.... something in the range of 12 Amp Hour to 33 AH would be sufficient.
http://i1179.photobucket.com/albums/x389/Chris_Magruder/HBridgeQuestion.png
I redesigned your eagle diagram to handle only 50A of current because my motors only draw around 30A so I shouldn't have a problem with heat. I replaced the resistor array with just resistors, deleted the mosfets and moved everything inward. Thank you for your time!
maybe this pic will help:
ftp://ftp.rediculouslygoodlooking.com/arduino/LawnBot400/h-bridge.jpg
let me know if you have more questions
~jd
Thanks for the help, I just have one part I'm confused about. If I just want to control the motor with a PWM to the positive side or PWM to the lower side I would just use the two terminals at the top bottom of the schematic correct?
In the pic you posted you talk about ALI and BHI, what do these acronyms mean?
On another note, I bought your book, but it got pushed back so I haven't gotten it yet!
I'm gathering the parts to start building and I noticed the comment from Unit042 on Dec 12, 2010. 9:33 PM, have the files been updated?
I will be downloading from ftp://ftp.rediculouslygoodlooking.com/arduino/LawnBot400/Eagle%20files/triple-8/
and just want to make sure the files are correct.
Thanks, Matt