Step 2: The Motor Driver

I built several motor drivers before finding a design that worked for my needs. For what it's worth, there are several nice products already out there that are fully assembled and require a lot less work if you are not interested in building your own electronics. The Open Source Motor Controller is an open source design that has been under constant community improvement for several years now and can handle up to 160amps at 36vdc! But they are over $100 and only control 1 motor. The Sabertooth 2x25amp motor controller is nice and controls 2 motors, but it is $125.

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.


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

Should we mount an umbrella on this?
Does anyone still have access to the schematic and eagle file?
<p> you considerer using software similar to that of Arduo-pilot to use GPS and allow the mower to autonomously mow the lawns?<br><br>alos how did you pront the boards for the H-Bridge did you print wiht your own printer or send the CAD drawings away to a third party to print for you?</p>
<p>Instead of h- bridge you can code for it. which will save your money .</p><p>H- bridge by coding Set pwm.</p><p>transmitter $ receiving bluetooth module 4.5$ only</p><p>Control by android app </p><p>Save , secure and efficient method </p>
<p>can you explain a bit more about the coding set PWM to control the motors? my mail is gabriel.badilla.alfaro@gmail.com</p>
<p>Kudos to you!! Brilliant!! You inspired to work on my own project. A newbie with no knowledge. Even if i do not get anywhere, i would like to start.Please help.</p><p>Do you have the .brd file or .sch file. i want to try making the R/C Landmower. I have never etched a pcb before. so looking for the drawing and try making one.. if not give it outside to get it made. </p>
Anyone who made this; where did you get the sprocket for the wheelchair motor shaft? My shaft is 17mm with a 6mm keyway.<br><br>Also, what gear ration did y'all go with?
Awesome project, thanks for the clear documentation too.
Awesome project, thanks for the clear documentation too.
<p>Here is a unit I built from scratch with a track drive and complete stainless construction. It is fully functional but I have yet to add the lawnmower accessory to the front of it. If you have questions...feel free to ask. It has tons of torque. Two wheelchair batteries and two wheelchair motors and a sabretooth controller. I am thinking I may want to sell it if anyone is interested.</p>
hi ed! i have some cuestions for you. do you have an email, facebook account or phone number where i can reach you.at?
<p>Up front, I don't have the money, but if I did, how much would it cost me? I really could use something like this being wheel chair bound and maybe I can save my pennies. Great job though. Semper Fi</p>
<p>Approx. $600 should get you there depending on how handy you are.</p>
That is awesome! Where did you get the tracks?
<p>Seems like your website is not working, can you link the .brd file?<br></p>
What would you charge to build the frame with all components except the mower? <br> <br>viperguy@suddenlink.net <br>
Hi Viper,<br><br>I would have to source the parts first and it would depend on that. Also, shipping would be expensive if I pack a box full of angle-iron and heavy duty motors to ship... what state do you live in?<br><br>Ballpark figure... I would probably have to charge around $600 or so to build the frame (sans mower and batteries), though for the next two months or so, time will be tight for me... so it would probably wouldn't be complete until around the first of next year.<br><br>On the other hand, I am happy to offer (free) help with building problems and parts sourcing, should you want to build it yourself.<br><br>Cheers,<br>JD
Hi I'm working on my capstone project for electronic engineering and I'm trying to build a very similar bot to yours. I'm getting your book for my bday in a month and that will probably answer any questions I have but I'm working on the hbridge now and was wondering if you could send me a schematic that could handle the load. My email is Carmichaeldaniel12@yahoo.com<br>Btw your bot is awesome!<br>Thanks man!
Very good, thanks for the info.
<p>This is truly awesome and will be a great help if I can get one together. Semper Fi</p>
What was the total cost into making this?
<p>Hey can you sent me the code, because it won't download on my iMac</p>
<p>Hey! Still Need The Code? Message Me If You Do.. </p><p>Shouldn't be too hard to replicate if you wanted to but I have the zip from above.</p>
<p>please, I want to make a car to carry 15 kg So :What are motors I need ?</p>
<p>please, I want to make a car to carry 15 kg So :What are motors I need ?</p>
That's cool :) nice build! Was thinking as another possible safety feature, perhaps you could buy a &quot;invisible fence&quot; that people use for dogs. You put the wire a few inches under the ground to create a boundary and hack what is normally on the dog. This works in 2 stages, a sound to warn the dog (use this output to change mower direction) if the dog/mower is ignored the second stage gives a shock. (Use this output for closing your &quot;lost signal&quot; relay.
<p>Can you provide a more detailed schematic of how everything is connected to the arduino?</p>
<p>I built your H-bridge for a project im working on. Not sure if i made a mistake or if its working as designed. I connect motors to the triple8 and when i apply power to the board the motors both start. was not sure if it should default to stopped or running. I am also curious how to connect this to a standard arduino. Most of the refrences I can find show 3 wires per motor and this obviously only has two. Any help would be greatly apprieciated.. thanks!</p>
<p>This is genius! A beautifully executed idea with so much potential for other applications. Very good instructable.</p>
<p>Hi! First of all congrats to this great instructable! Very well documented, and very genius ideas.<br>However, I would be concerned with the parallel connected mosfets. Not one electronic part is equal (exactly the same characteristics). So if you take two LED's for example they will not be perfectly identical. This is the case for mosfets as well. So if one of them opens faster then it will have to handle amperage which it can't handle...<br>This is just a thought....:)</p><p>THank you and best regards,</p><p>Lorant</p>
Anyone have a copy of the .brd files the link is dead. I was looking forward to making this, but I dont want to buy the parts if there's no instructions to go with them
i am seeing your schematic, and, sorry to say, it's wrong. All the P-channel mosfets are reversed, you have a pair of p-channel mosfets on each H-bridge disconnected from the power. But apparently you fixed those two things on your PCB, it's a trap for beginners, you should fix it.<br /> <br /> You have no back EM protection, not even a diode, and the mosfets are too small in voltage, i used 100v mosfets with a 24vdc motor, 12A and&nbsp; they just exploded, all the protection died, and the microcontroller died. We measured the inductive peaks in approximately 200v, and you have 2 times the current here. You have no hardware protection to prevent both sides of the H-bridge from turning on at the same time.<br /> We even used toric transformers and 100uf capacitors next to the motor and, even then, it exploded, with fire and everything. <br /> <br /> The only solution that worked, after a year of trying (we didn't find something like a BTS7960 in my city, we looked for it) was to use a double inverter relay in series with 2 500v 8A mosfets in parallel, plus all the usual diode based protections, thermistor based protections, capacitor based protections, and, of course, optoisolated from the control logic.<br /> <br /> that was for an electric wheelchair.<br /> <br /> so, if your circuit worked, the motors are almost magic, you are extremely lucky, or you are omitting something.<br /> <br /> i wish you the best<br />
<p>Hey</p><p>you seem to be a expert on this field. I need some help. I made a remote lawn mover with wheel chair motors and 2x25A. It caught on fire after over heating. Now I am looking for a powerful MOSFET H bridge. Could you please send me a schematic with high power H bridge if you have got one. I am doctor in profession therefore minimal knowledge in electronics, need good good explanatory schematic. my email is Isuru7777wg@yahoo.com. Thank you for your help.</p>
sorry about any schematic and board differences... I am a beginner in Eagle, so I made the .brd file before the .sch file. <br /> <br /> The mosfets&nbsp; I used are 50 amp and 60v.... I am also fairly new to mosfet theory, so I can't argue with you on much, but I do know that they have built in ESD protection diodes that are rated far above the 24 volts that I am using. I thought about adding additional diodes, but as it turns out, that is not necessary. My bot weighs over 100lbs and I can do very fast direction reversing and it does nothing to the mosfets or the microcontroller (It has had the same Atmega168 since I&nbsp;built it a few months ago). I was worried about the gate-source voltage spikes above 24 volts affecting the P-channel mosfets, but the mosfets I used have a Vgs max of 25v and they have performed very well so far at 24vdc.&nbsp;&nbsp;<br /> <br /> I have used this controller with several different motors and it worked with each. Also it will carry me on top of my mower across the yard... so that is over 300lbs and it doesn't heat up at all. I may be very lucky, but it can handle anything I throw at it and it is very responsive, which is far more than I was expecting to get when I started.<br /> <br /> I&nbsp;think 2 people have already made this board and said it worked... but I am designing a new board based on the OSMC schematic, so I will post it as a replacement when&nbsp;I am done.<br />
maybe those mosfets are extremely good and more resistant to transient voltages than normal ones (IRFxxx), normally mosfets are very sensitive to overvoltages, and they are good with high currents.
<p>This is the best Instructable on Instructables. Pure genious. I think I first found this on RC Groups and then Googled around until I ended up here. I searched on eBay and Craigslist for wheelchair motors. They were all way to expensive. ($300 for a set). But I just found an old guy that rebuilds wheelchairs in his garage. I got a set of motors and wheels, some castor wheels, battery boxes, and several other things for $50! I'll be FPV-RC lawn mowing by spring!</p>
<p>Hi! Great job. I have a question. I'm in a similar project. what are the engine specifications?</p>
<p>Wow, Great job! Do you have a steering mechanism for the front wheels (IE a servo etc) or is all the turning done by the rear motors and the front wheels just pivot?</p><p>Thanks :-)</p>
<p>I want to make one with a bit more features :D</p><p>one with a good webcam or 2 and computer control ;P (me being a programmer)</p><p>it would be the pinnacle of lazy lawn mowing especially if i could turn it on from my computer. :D</p>
<p>Does anyone have the schematic or .brd file? None of the links seem to work.</p>
<p>One more thing. What kind of arduino did you use? Will an Uno work? Thanks!</p>
<p>Hi! I'm lazy and don't feel like doing the math on how much it is going to cost to make. Do you have a good minimum to maximum price range on building this thing? Thanks!</p>
<p>How do you pull and hold the throttle cable?</p>
<p>I took the spring off of the switch on the motor that the throttle cable pulls... then used a zip-tie to hold the switch open so it would allow me to crank the mower and it stay running. Then connected 2 wires to the contacts on the cutoff switch, connected to a relay to turn it off.</p>
<p>amaizing... maybe you can tech me how to make it..beocuse i'm newbe</p>
You have inspired me to create one! On the search for wheel chair! Thanks for laying the ground work and doing all the hard work.
<p>Sorry to bug you all again, another question. I am having an issue finding a 6ch Transmitter Reciever for a car. Does it need to be 6 channel, can it be more or less. Or is that for expansion of future stuff?</p>
<p>Hello, i have recently had this project rekindled in things to build. I have wanted to do something like this for a long time. And with the recent snows this year i have had a thought to put a snow scoop on the front of it to shovel. I have one maybe two questions for you. All the RC transmitter reciever pairs i am finding on ebay are in the GHZ range. I am new to arduino and not sure if this will work. And i guess the second question is, I see alot about the scooter motors, wheel chair motors are pretty expensive versus the scoter motors. Do you think the scooter motors handle mowing the lawn, hauling dirt and or a person around, and shoveling snow? Thank you in advanced for any comments</p>

About This Instructable




Bio: I have always been one to take things apart to figure out how they work, so most of what I own has been dismantled. If ... More »
More by johndavid400:Arduino controlled Bluetooth-bot Core3duino Arduino R/C Lawnmower (painted) 
Add instructable to: