3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Arduino R/C Lawnmower (painted)

Step 2The Motor Driver

The Motor Driver
«
  • triple8_brd.png
  • triple8_sch.png
  • lb400_1.jpg
  • triple8_7.jpg
  • lb400_3.jpg
  • lb400_9.jpg
  • lb400_8.jpg
  • 1.jpg
  • 2.jpg
  • lb400_13.jpg
  • lb400_6.jpg
  • lb400_21.jpg
  • last photo ←
»
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.

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

« Previous StepDownload PDFView All StepsNext Step »
29 comments
Apr 17, 2012. 7:19 PMSamfordValley says:
I'm going to build something similar to this, but I'm going to make it so not only can I suspend the mower, but mount it on top for longer cut on rocky terrain.

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.
Apr 24, 2012. 1:30 PMbrancilo says:
I was lucky motors of the wheelchair gave me one for free otherwise they are expensive but the best solution, as an alternative solution can be taken from the truck to 24v, scooter, such as John, but the best of the wheelchair
I was denied the money I worked 2 years but the project eventually end only needs to be persistent.
Apr 22, 2012. 3:19 PMniak32 says:
I'm also in Australia close to Ballina NSW, I hounded a local scooter shop about an electric wheel char they had on consignment for $380, eventually got it for $150.
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
Feb 16, 2012. 8:36 PMjeremydial1981 says:
Also, this is a noob question but here goes anyway. lol Looking at the pictures it looks like there are only 4 wires coming from the arduino clone to the motor controller. Now if my understanding is correct each 3 mosfets in parallel are 1of the 4 legs/switches in each h-bridge, that makes 8 switches to control 2 motors. How exactly are you controlling 8 switches with only 4 wires. Am I missing something? I am still a little new.
Feb 17, 2012. 1:44 PMjeremydial1981 says:
Ok great, makes perfect sense now. 1 more noob question because I understand the "how" but I feel like I need to know the "why" of each step to further my learning. What exactly is the function of the capacitors on the motor driver. I don't see any diodes in the schematic for the triple 8 that you show on a few of the h-bridges in your book to protect from back emf, so am I correct in that the capacitors are "absorbing the back emf?
Feb 18, 2012. 3:37 AMjeremydial1981 says:
Ok, thanks JD. Makes perfect sense now.
Feb 17, 2012. 9:20 AMbrancilo says:

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
Feb 17, 2012. 12:08 PMbrancilo says:
I have TSC7000K (2N7000) I do not know whether the logical level. Everything is the same as you in datashet
Nov 30, 2011. 9:07 AMwazeem1 says:
hi john,

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
Feb 16, 2012. 6:30 PMjeremydial1981 says:
Do I have to use the 2n7000 logic level mosfets or can I just use more of the 52a 60v n-channel mosfets for controlling the p channels?
Sep 20, 2011. 5:09 AMJayvis Vineet Gonsalves says:
Could you please give me H Bridge circuit schematic for driving 2 5A 12v DC Motors
Sep 25, 2011. 2:24 AMJayvis Vineet Gonsalves says:
Hi John, the robot will be about 25-30 Kgs. It runs on four 12v Electric Motors. I will also be using one more similar motor for the weapon system. I want to supply about 5-6A of current to them. Apart from this, I do not much about the motors. Here is the pic of them. ( Just to get an idea of the size of the motors, the tile in the pic is of 1sq foot.)
Oct 11, 2011. 5:02 AMJayvis Vineet Gonsalves says:
Yes John, those motors are ungeared. And could I get a link to the other H-Bridge circuit?
Oct 14, 2011. 4:07 AMJayvis Vineet Gonsalves says:
Thank you John for your help. I also wanted to ask what batteries are you using in the RC Lawnmover and how long does it run on each charge?
Oct 15, 2011. 9:02 AMJayvis Vineet Gonsalves says:
Thanx John.
Apr 25, 2011. 5:18 PMcmagruder says:
I read the comments and have some questions that I cant seem to answer using your schematics and pictures. Here is an image that has the questions on them.

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!
Jul 28, 2011. 11:07 AMcmagruder says:
Hey John,

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!
Apr 10, 2011. 4:59 PMmattadamsnet says:
Quick question,

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
Apr 13, 2011. 7:58 PMmattadamsnet says:
I'm only asking because the newest file in the directory was 12/1/09 5:53:00 PM, and the comment was posted Dec 12, 2010. 9:33 PM.

I'm ready to start etching and just want to make sure everything is right.
Apr 21, 2011. 4:22 PMmattadamsnet says:
V2 worked very nicely with no problems.

Thank you,
Matt
Jul 27, 2010. 6:10 PMa_k_a__wolfboy says:
I have a question It may sound stupid I have a 2 channel rc remote and reciever of 27MHz can I user that to give the arduino commands??
Jul 7, 2010. 2:11 PMUnit042 says:
Amazing project... I have a wheechair in my garage that I have been struggling to figure out motor controllers for, but nothing cheap.

A wise old friend strongly recommends I just beak down and shell out the cash for something similar to that sabertooth motor controller. Viewing your ible, homebrew hopes are revived, but before I go out and buy... what, 24 power mosfets? (tempting prospect, as I have never seen any mosfets that size for less than 5 bucks) I need to know a bit more about the schematic.

Does the lack of swamping resistors allow any one of the mosfets from taking the entire load (leaving the others to sit idly by), and failing early?

Are these really the cheapest power mosfets you could find (cheapest as in, more current carrying capacity per dollar spent getting it.)?

Do you think only two mosfets per switch (eight mosfets per motor H-bridge) would give close to the same performance (same size motors etc.), or does the current version risk burnout enough as-is?

By the way, I absolutely LOVE the idea of making a robot mow the lawn for me, you happened to beat me to doing it... keep up the excellent robot-building!  :)
Jul 8, 2010. 1:36 PMUnit042 says:
Thank you for giving me such a comprehensive reply. The info about efficiently driving the mosfets, now that is something I will have to read over a few times.... To make sure I understand, in ordder to efficiently drive a mosfet, I need a large enough voltage difference between the gate and the source. For the N type on the lower side of the H-bridge, I would simply apply positive 24 volts to turn it on; for the P-type, I would have to... have a negative 24 volt difference? (as in, apply GND, or 0 volts to the gate while the source has +24 volts?) Eliminating the switching transients makes sense. The TC4427 datasheet says it is for low side, so that part is taken care of (except for it's max supply voltage of +22v. Does that get in the way of using it in a 24v system?), but how does that voltage divider work (in terms of creating the proper driving voltage)? Does it simply lower (ie "divide down") the higher-than-24v-supply down to a usable voltage? That hip4081 looks expensive... The 47 ohm resistors on the gate limits the current? I thought it had to be a very low value resistor on the source of the mosfet. And... wait-wait-wait... These are 50 amp mosfets here. Sorry for being a bit (a lot) dense, but why not use just one instead of the three on the triple8? Is it because of inefficient switching?
Jul 7, 2010. 2:28 PMUnit042 says:
I just thought of another couple of (relatively important) questions: The P-mosfets cost extra. Would it be advisable to swap them out for cheaper N-mosfets (and making needed schematic changes of course), or were they chosen simply because of the convenience of automatically having the bias resistor, or the high side/low side stuff or whatever work out? About how much current do your wheelchair motors really require (when under load)? I ask because this project seems a bit overkill for wheelchair motors.... Which leads to question 3 of my previous post.
Aug 27, 2010. 9:45 PMtank1357 says:
PMOSs coast extra because they are harder to manufacture. But trust me, it is well worth the cost to use them. I've built plenty of bridges in my day, and every time i try to design one using only NMOS I always end up banging my head against the wall trying to get the voltages right, especially in big power projects where the resistors get warm, and when resistors get warm, their values change, negating all that careful math you just did. SO: use the PMOS in conjunction with the NMOSs. You'll thank yourself later.
Jul 7, 2010. 2:56 PMUnit042 says:
You know what? Looking at the Digikey datasheet for the N-mosfet, it seems to be able to handle 52.4 amps (assuming a good deal of cooling off with the aid of a fan), AND if more than 10 are ordered, you get a quantity discount on them. So, I wonder if these things would handle 24 volts at 25 amps (continuous, but this is worst case scenario), with only four mosfets per motor in the traditional H-bridge arrangement (ie same as your schematic, but only one mosfet per 'switch'). Hmmm. Additionally, the 2n7000 mosfets might/could be substituted by a signal transistor like the 2n4401 (or somesuch), which I already have in my junk bin.... Sorry for triple posting, this project has me thinking. :D
Aug 27, 2010. 10:23 PMtank1357 says:
I don't know if this was mentioned, but if you're unsure if the MOS can handle the power, just place a few of them in parallel. They'll still behave as one unit, but be able to handle more power. This way you can use the relatively cheap Power MOSs from DigiKey. I think they're rated at 15 Amps. As a general rule of thumb, don't exced 80% of what the power specs say the MOS can handle. IE: if the specs say stay under 10 Amps, don't ask it to handle more than 8. The real trouble begins when you're trying to deal with big loads. I had a go-kart system with motors that could easily draw more than 40 amps, and as soon as those babies got under load, my PCB tracks burnt up. I had been using 0.15" tracks, which i thought were massive, but now I never drop below 0.3" wide tracks when expecting them to handle some juice.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
86
Followers
4
Author:johndavid400
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 it can't be taken apart or hacked, i'd rather not have it. And I like to do thing...
more »