SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By jbookout
#84622
I'd really appreciate it if anyone could take a look at the motor control circuit (h-bridge based but from discrete components) I have designed:
http://www.robotdialogs.com/2009/11/mot ... rcuit.html

It'd be great to have any feedback on this design. I hope it works (I've ordered parts for 3) and I think I've researched it enough, but there may be mistakes...

It's for my robot entry in the RoboJoust...
By Polux rsv
#84626
It would not work. Top Fet transistors would not switch on, as the gate voltage could not be some volts above source pin.

The 5V power supply could be avoided, connecting the Q2 collectors directly to the main power supply and inserting resistor in emmitter branch.

Angelo
By Vraz
#84655
As previously noted, the top-half wont switch on. If using N-channel FETs on the top half, you need a gate voltage equal to motor supply voltage for "off" (14v in your case) and the motor supply voltage PLUS 10 volts (for regular high-current MOSFETs like the one you choose) for "on". Most designs use a charge pump to create to the high-side gate drive.

As a very simple solution, there is something called a photovoltaic driver which is like a cross between an opto-isolatior and MOSFET driver. It provides an LED and PV cell in one package. So you drive it like an opto-isolation (and it provides equivalent isolation) but provides a gate drive voltage on the output side (and the drive is above whatever source you connect it to). The Panasonic PV1121 series (http://panasonic-denko.co.jp/ac/e_downl ... ng_apv.pdf) might help. At 8.5v drive, it would probable turn on that MOSFET reasonably well.

While I am not familiar with RoboJoust, I competed with 60lb combat bots 'back in the day'. I have also built and experimented with home-brew controllers. I never competed with my own motor controller as I saw too many folks try and fail. In a real world environment, motor controllers take a beating and factors like back-emf are really brutal if not taken into account. If you provide more details about your current requirements, might be able to provide additional feedback. Good luck!
By jbookout
#84683
First, thanks! I totally overlooked that...That's the price I pay being a comp. eng. instead of an electrical eng...at least the code is a breeze :)

The current reqt.s for the biggest motor I might drive is 4A I expect the stall current to be ~10-15 (I can't measure higher than 10A, and the big motor is really powerful (difficult to stall)) Worst case I can drive this motor in one direction using a separate already proven circuit.

More importantly I have two smaller motors 3.3A stall current @12V for locomotion (i.e. definitely need H-bridge)

**Is this possible?**
The FETs are "gate voltage drivable" so wouldn't it be possible to put a ~6-7V battery in series with the 14 V and tie this 20-21 V to the Q2(s) collectors (and the isolators collector).
**Or maybe this?**
Or perhaps, would it be possible to work around this using a similar PNP power FET such as http://ixdev.ixys.com/DataSheet/DS99969 ... 85T%29.pdf in place of the top NPNs? How might this change the drivers? (I've torn apart a toy car with a NPN/PNP h-bridge but it's difficult to see the whole circuit to reverse engineer it.)
**

Angelo- Q2 is tied to 14V already (it's unregulated... i.e. battery)...
inserting resistor in emitter branch
Do you mean between Q2 emitter and Q1 gate? I'm not sure I know what you mean... It may just be a case of seeing the connection dots where there aren't any on the schematic (I know they're stupid small).

p.s. RoboJoust is sparkfun's sumo-ish robot competition (http://www.sparkfun.com/commerce/produc ... ts_id=9523)

The reason for this circuit is an attempt to avoid paying $70 for 3 5-10A motor drivers when really the components needed only cost ~$20 + brain-power :)
By Vraz
#84695
For 3.3A stall, there are lots of single-chip H-bridge options. Far easier than building your own and likely far cheaper. Its not so much the time, but as you blow components or change designs, that is what burns up dollars. If you could have a ready-made solution for $70, then it does not take a lot of parts to overshoot that. Two all-in-one IC H-bridges to consider might be the Freescale 33186 or the ST VNH3SP30. These all-in-one units take a lot of the guesswork out and are generally pretty well behaved within their limits. I have not personally used these two, though have previously seen some low-end controllers which used them. They would only work for your drive motors. Anything with 30A stall needs discrete MOSFETs.
The FETs are "gate voltage drivable" so wouldn't it be possible to put a ~6-7V battery in series with the 14 V and tie this 20-21 V to the Q2(s) collectors (and the isolators collector).
Yep, you could use a 9v battery (6v is not enough) to create your high-side gate drive. Then you just need to switch the gate between 14v (off) and 23v (on). Most designs don't do this because an extra battery is another failure point, and for any commercial solution, a charge pump results in an all-in-one solution.

Using a p-channel MOSFET is another option. In that case, the source is your 14V and you drive the gate with negative source potential. So connecting gate to source does not conduct and gate to source-10V (you could use ground) does. Generally the gate drive is limited to around +/-20 volts.
By jbookout
#84702
Well, I think I'll attempt the second battery option for this build. Hopefully I can perfect this design and make a PCB for it...it'd be nice to offer as an alternative to all the other drivers out there. I have a hard time justifying paying more than the motors cost for the motor controller... especially because I don't want to steal parts from it later...

I'd consider the single chip option but I haven't found any thru-hole chips with high enough current (SMD is too much of a pain for this build).

Any more advice on this circuit is definitely welcome.
By jremington
#84712
Pololu offers quite a variety of well-designed H-bridge modules
http://www.pololu.com/catalog/category/11

It will be hard to beat their asking price of $20 for a 5A @ 28 V bridge!
By Vraz
#84715
I have a hard time justifying paying more than the motors cost for the motor controller
You seem to have made up your mind (though I second the Pololu option as a backup plan). My final advice:

* Be very careful in testing your software without the MOSFETs connected. If you accidentally enable the low/high MOSFETs on the same side, that is a dead-short and magic smoke typically follows.

* Use something like a low-current DC wall-wort power supply for testing. Something that can only provide 1A or less. That way, even if you do create a dead short, the MOSFETs might survive.

* Always provide some dead-time (both off) when switching from the lower to upper MOSFET on the same side. Due to slight timing differences, you will get current shoot-through otherwise (like a really fast short circuit). Besides being hard on the MOSFETs, it wastes battery.

* Be serious about your testing. Beat on the controller (once its "done") and try to make it fail. Better before the competition than during. Some worst-case scenarios are dead-stall handling and the motors being forced backwards when the controller is trying to drive it forward.
By MichaelN
#84716
Using a separate battery for providing gate drive seems like a "kludge" to me.

There are plenty of gate driver chips that can generate the "overhead" voltage that's needed for the top N-channel mosfets. For motor currents of a few amps you might want to just use p-channel FETs for the top, and save yourself a bit of trouble. You'll still need some level-shifting circuitry for driving the top FETs, but this would just consist of a small npn transistor and a couple of resistors.

Often I get lazy and use logic-level FETS that can be driven directly from a microcontroller. As with the argument over P-channel FETs, you wouldn't do this for large motor currents (where you're better off driving the gates with a decent voltage - eg 10V), but it does save components when you're only useing a few amps.

As others have noted, make sure you've got plenty of protection, or you'll fry something. Any time you're dealing with inductive loads, large voltages can result if you're not carefull.
By NleahciM
#84748
MichaelN wrote:Using a separate battery for providing gate drive seems like a "kludge" to me.

There are plenty of gate driver chips that can generate the "overhead" voltage that's needed for the top N-channel mosfets. For motor currents of a few amps you might want to just use p-channel FETs for the top, and save yourself a bit of trouble. You'll still need some level-shifting circuitry for driving the top FETs, but this would just consist of a small npn transistor and a couple of resistors.

Often I get lazy and use logic-level FETS that can be driven directly from a microcontroller. As with the argument over P-channel FETs, you wouldn't do this for large motor currents (where you're better off driving the gates with a decent voltage - eg 10V), but it does save components when you're only useing a few amps.

As others have noted, make sure you've got plenty of protection, or you'll fry something. Any time you're dealing with inductive loads, large voltages can result if you're not carefull.
Agreed on pretty much all counts. Additionally, a charge pump circuit to generate the gate drive supply is not a complex circuit.
By jbookout
#84811
I don't disagree w/ anybodies replies (except I doubt I'll use the low current single chip h-bridges).

I would definitely like to "do it the right way". I would like to try the charge pump circuit idea, a circuit I hadn't even heard of until I start working on this. It seems the logical addition for a "general" solution.

I'm having trouble locating a switching capacitor (DIP*) IC that can handle the 14 V (there are a bunch rated for 15V input, but the (my) batteries fully charged approach 15.5V and I can't seem to find much that will cope with this and have a bit of wiggle room. Beyond that I would probably need some advice on the circuit itself. If 14V input isn't feasible I will have a 5V regulated supply available (for this project at least), I can see taking this up to ~25V+ but i would need to be a single-ish chip solution, not some cascaded, component heavy solution like this http://www.geofex.com/circuits/+9_to_33.htm

*I didn't really clarify it earlier, but I'm trying to stick (for now) with DIP/thru-hole ICs that I can easily find sockets for. This is mostly because I'm sure I'll have a few smoke emitting components at some point and I want to be able to swap/replace easily.
By jbookout
#84819
After some further research I've located an open motor controller that is designed for huge currents (300A...whoa). It uses an all in one fet driver (some have mentioned similar) that seems to eliminate most of the issues I'm running into. I'm going to look into it further and come up with a new circuit diagram (roughly based off their design) to post here in the next couple days.

That design also openly discussed a number of protection circuit components that are pretty readily available and it explained them all thoroughly. Yay open documentation.

(fortunately at this point what I've bought already really isn't wasted, stuff unused is generic and nice to have around)
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]