How would a professional engineer decide between two suitable chips (hbridge)?
rwgast_logicdesign
Posts: 1,464
Ok so ive been plugging away at this serial motor controller for a bit now and its coming down to the final solder it together and be done with it, hardware wise at least.
Im stuck between two different chips the STM l293E, or STM l6205. My motors are running at 18v and well about 60 to 100mA under load, with a resistance of 11ohms in the coils at 18v the math works out to 1.63 amps on a stall. The 293 based chip is a 20 pin that can handle 1 amp continuous and 2 peak, so im well with in the chips specs. The l6205 is a 3 to 5 amp h bridge which is well more than I need its also a 20 pin dip. The thing is the l293 only has two voltage seanse pins, while the l6205 has thermal and current monitoring and does automatic shut downs and reset, its just a much better chip with alot of good features! The problem is the l293 only draws 4ma quiescent(sp?) current while the l6205 is going to draw 10mA. The other down side is the l6205 needs a min of 8v to operate so the l293 will go alot farther on dying batteries.
Im just wondering what the better design choice is and why, like if I was making a commercial project that ran on batteries which would be the right choice the better, safer chip that takes more power or the simpler chip with alot less current draw,
Im stuck between two different chips the STM l293E, or STM l6205. My motors are running at 18v and well about 60 to 100mA under load, with a resistance of 11ohms in the coils at 18v the math works out to 1.63 amps on a stall. The 293 based chip is a 20 pin that can handle 1 amp continuous and 2 peak, so im well with in the chips specs. The l6205 is a 3 to 5 amp h bridge which is well more than I need its also a 20 pin dip. The thing is the l293 only has two voltage seanse pins, while the l6205 has thermal and current monitoring and does automatic shut downs and reset, its just a much better chip with alot of good features! The problem is the l293 only draws 4ma quiescent(sp?) current while the l6205 is going to draw 10mA. The other down side is the l6205 needs a min of 8v to operate so the l293 will go alot farther on dying batteries.
Im just wondering what the better design choice is and why, like if I was making a commercial project that ran on batteries which would be the right choice the better, safer chip that takes more power or the simpler chip with alot less current draw,
Comments
My instincts all tell me to go with the l6025 as its a much better chip in many ways and it frees me of having to worry about motor stalls, it also gives me the option to upgrade my motors.
the thing is im trying to get the best battery life I can while the current may not be a big issue here the l6205 is going to bring my bot to a dead stop when those batterys hit 8v, so its not so much about wasting power as much as it is about using my recources to the max potential.
In the grand scheme of things, sounds as though you are not likely to have this thing standing idle for significant periods of time, and the rest of the package will probably draw much more than either of these chips. I also don't really see the one going much farther than the other on "dying batteries" as the motors require 18 volts to operate anyway giving you a good 8-9 volts of headroom from what will be going into your regulator. The later chip may cost more than the former, but by your feature comparison, it has more built in (safety?) features than the former. If you are going to need any of those features, it may prove cheaper either in a one-off or production to see what costs more; discrete implementation of say current limit (which also implies monitoring circuits) and the PCB real estate it will eat up or pay a little extra for the latter chip.
All that said, I am not a PE, merely a GE (garage engineer, not the company behind the Meatball logo). But I have seen many itterations of motor controllers, kV mA controllers in medical systems put out by the Meatball, the Deutch big'un and the Dutch other big'un. You can't go wrong over-engineering for safety. A little overkill beats a lot of fried parts of injuries due to malfunction.
Frank
If using the l293e i had planned on using some analog inputs with a shunt to monitor current and cut it when it starts riding over 1.2 amps. If I use the l6205 thats not an issue and if it were the chip will automatically restart itself when it draws to much current or shut down, it has a really good voltage/current system which saves me alot of code. if your running 15 cells at 18 volts, how long are the batterys going to last once theve depleted to 8 volts anyways? I really dont understand the relastion of voltage drain and battery use, if you have 2.45amp hours in a 1.2v cell how low will the voltage in that battery drop before youve eaten all the amp hours up. For instance i have some rc cars wich use a 9.2v battery and stop running once the battery pack gets to 7.5v or so.
So i wont use the l293 if its that bad, like i said the l6025 is a much better chip for more reasons than its higher rating. i just wish someone could tell me how you go about calculating how fast a battery loses its voltage. simple math says both motors could run continously for 12.25 hours at 100ma a piece using a 2450mah pack, but how many of those amp hours do i get while the batterys voltage is still over 8 volts. im not sure if there is some law for this or something but i have no idea how to go about figuring it out.
The first step is to define your requirements - if that doesn't eliminate one of the choices you will use some weighted sum of the other properties (subconsciously or explicitly) to rationaize using your favorite device (!). The datasheets might not be enough to go by and some experimentation might be needed (behavour on brown-outs here for instance)
There are so many criteria that could be in your requirements, from long-term availability, robustness, part cost, size, associated manufacturing costs, temperature range, power dissipation, in-field servicing, etc etc...
The point of requirements is to end up with something that does what was originally intended, rather than being fun to design and "really cool" - all too easy to go down that route: http://atcapacity.files.wordpress.com/2009/09/software_development_comic.jpg
You ask how a pro would decide between 2 chips. That decision is to late.
I will assume operation has already been well understood.
Determine absolute maximum worst case conditions.
1. Highest and lowest possible supply voltage including worst case tolerances over full temperature range.
2. Maximum motor current, this is usually stall current at highest supply voltage. You mentioned 1.65A. However, the current can be quite a bit higher than that if the motor is forced to reverse at full speed. Maybe double the stall current.
3. In prudent design one never runs the drivers at full rated current. Derate to 75% for most components. 50% for critical circuits. Derating includes max current, max voltage, and max power dissipation. Power dissipation must be over the full expected temperature range. Usually the problem is at high ambient temperature but sometimes at low temperatures.
4. Never exceed the peak current rating, even for a uS unless extensive testing has been done.
In general, some of these problems can be alleviated with good circuit design that limits drive current.
Fuses and PolyFuses are quite useful. However, they are relatively slow acting.
I don't think I can recommend either chip for a motor that has 1.65A stall currents. I would prefer to see an H-Bridge built with power MOSFETs with current ratings of say 25A or more and derate heavily when no heat sink is used. Just saying.
Duane J
Ill tell you where im worried i may not be using an appropriately sized part is the fly-back diodes. The l6205 has freewheeling diodes built in but I put my own flyback diodes in place becuase I wasnt sure if I was going to use an hbridge with back EMF protection or not. The diodes I used are 40v RK44 Shottkey 3amp continuous. As per what I have read I picked a diode with close to double the amperage and voltage rating of what is required, and I used a shottkey just to be safe as far as quick pulses some recommend it some say it unnecessary. My issue with the diodes isnt the current as much as the voltage. From what i understand back emf is determined with a formula including the inductance of the motor (this is the issue i have no idea what the inductance of these motors are) when the formula is worked out using an 18v supply with lets say 10 millahenerys the voltage can be in quite a large spike in my situation over 40vs, but this is all guess work since im not sure what the inductance of my wingdings are.
They also consider if their job is on the line, if they are caught cutting corners.
If the volumes are small, and time is the dominant cost, you are always better to approach from above.
ie choose a larger and smarter part than you think you need at first glance, then find out if even that has enough real margin.
That is a very open ended load situation, so you need a lot of operating margin.
The L293 is far to cheap and cheerful to even bother with, surely ?
A smarter question is what is there above a L6205 ? Tried Allegro ?
What do you mean the l293 is to cheap and "chearful" of a part to bother with though? The price difference here looks to be $3.19 vs $10.76 per chip, obviously the l293 is much cheaper but assuming I go run it around on a breadboard with a heatsink stalling everywhere and nothing gets out of hand hot why is this such a bad part? You and peter both seem to look down on it but these l293/l298/sn74451 chips all seem to be a popular choice for alot of people. I will be taking yours and peters advice and going with the l6205 (unless i use something better) and then bumping the current handling up by using 2 bridges per motor, as to satisfy Duanes requirements somewhat, also to ensure upgradeablitiy since everything else has room to move up limiting the hbridge doesn't make alot of sense in the end. Im just curious why you guys seem to be so down on a part which is in spec for my application, has a lower price, and it along with its variants seems to be popular in the hobby community, when would it make sense to use an l293?
When I mentioned the 25A thing I was suggesting using high current MOSFETs. Think of it this way, high current implies low on resistance. Take a look at the IRLR2905 42A, $1.55. This has an on resistance of 13.5mΩ. So at say 3A the power dissipated would be 3A^2 * 13.5mΩ = 0.12W. Clearly no heatsink required.
And another, RFP30N06LE 30A, $1.09 and 47mΩ. 3A^2 * 47mΩ = 0.42W.
These can come in a surface mount package.
Using circuits with this class of MOSFET the total PC board area can be less than with the DIP-20 parts especially without the need of a heatsink. Can cost less too.
Duane J
Believe me Peter, I know the feeling.
@rwgast_logicdesign
I cannot reasonably comprehend why you would select the L6205 over the L6208, except maybe the $4 extra bucks per chip. However, if you are creating strictly a stepper motor driver, then I would select the L6208 over the L6205 any day of the week. Why you ask? Because the L6208 includes the step translator
Bruce
The L293 is in spec for driving a well defined load application, and smaller motors, but you have neither.
You instead have this :
Im only using an 18v system for 2 reasons, to give the bot a torque boost when its in soft sand, and when it needs the speed to run from an overzealous dog who likes to chew on RC cars when she can catch them.
I've seen RC car motor drive systems use VERY grunty FETS, (30A+) partly for the almost completely unknown surge handling, and partly to make sure ALL the battery power goes to the Motors.
@jmg, I think maybe im confused about what a small motor entails. These faulhabers may be the only motors I have which run at .060A under no load and very up to 100mA with a load, The acual motor itself discounting all the gearboxes is only about 1 inch long with a little over a half inch diameter. I was under the impression these were small motor that fit well with these small H-Bridge chips
here is the actual motor
http://www.goldmine-elec-products.com/prodinfo.asp?number=G16279
I have never even seen these put out 1.6amps at stall that's just what the math says, when I hold them with pliers I get closer to 1.3amps or so. I figured if I used a shunt to monitor current and cut it at 1.2 amps or so Id be fine with an l293 style chip, if I were running at 9v like originally planned id even be within spec of a l293D 600mA, 1.2peak chip.
Now let me also clarify I will be using the l6205 most likely in parallel, I will not be using the l293E per everyone's advice. What I wrote above is not meant as an argument, I am just not understanding where I would have an issue with an l293E as long as I set up current monitoring in the fashion I stated above and had flyback diodes in place to take of any large spikes when the motor is flipped in reverse at full speed. I would think even if I was only drawing 1.6 amps thats still 400mA under peak and I would have been ok, especially with a heat sync in a ventelated aluminium enclsure with a fan. So I guess what im asking is what is the flaw in my logic here, becuase even though i wont be using a 293 id still like to know exactly where I would have went wrong if i never made this thread and had done it anyways? I acually have a 293 on a breadboard ive been using for no load testing to get my code right, since its already ready to go I figured maybe id go play around with it and see exactly how bad it is at driving these motors. Like I said this is all in the name of learning and I will be using the better chips
My sincerest apology.
You have always been polite and I was not attempting to say otherwise, and if I came across as impolite, then I humbly apologize, because that was not my intention.
As for the driver, I don't know what I was thinking.... I thought you were making a stepper driver. Sorry.
On second thought.....
Why not? The L6208 is basically the same as the L6205, a DMOS dual full bridge driver, but it includes the step translator. If I am not mistaken, you could create one driver that can drive standard dc motors, but also steppers.
EDIT: And I believe you have discussed the L6208 in another thread of mine.
EDIT: But I could be wrong, as I often am.
It was not really directed at you, but the whole human population. Many times I feel that I am just wasting my breath when I give advice. However, it is also worth noting that I rarely take advice when it is given to me
And when I give bad advice, it makes matters worse, such as a stepper driver for a motor driver
The problem I think is that you have really really limited yourself to just two devices which you have chosen, not with wisdom gleaned from others but from your own limited experience and understanding. No one is questioning your enthusiasm and we applaud it, but it is like taking your car with a broken drive shaft into the mechanic and asking him if the fault is in the engine or the ECU, which one, pick one. The answer that you will get you will not be happy with because you are ignoring everything outside of your narrow parameters which are based on wrong assumptions.
Describe what you want, not how you want to do it, and ask the BIG question. HOW would you do this.
BTW, I don't dislike the L293, I've used them with larger motors in vending machines years ago, but the load and the voltage are well known and defined. Even then I had problems with certain brands proving less resilient to start currents.
EDIT: Popular does not mean good. PICs are popular, ATMEGAs are popular etc. Propellers are not popular. People choose popular because they think it must be good and the more they make that mistake then the more that contine to make that mistake until it is so popular it must be good, right!?
Now from what you said above it would lead me to belive the l6205 isnt a good fit in your opinion either? I know that my motors will never pull in more than 1.65 amps and I know if I get spikes from inductance breakdown my flyback diodes should take care of them. What im not getting is you guys keep saying the l293 is fine with a well defined load and voltage. Well I know that my voltage is going to be 18v for the most part, I need to look at the duracell NimH discharge curve but im suspecting by the time each cell is at .8 which is 12v the current will be drained and we know what the load is usually < 100maH and can spike to 1.6 amps under a stall. So everything I see is technically within the data sheets of either of these chips. Im not saying that makes them a good choice im just saying this is how I precived the problem.
Now if you were limited to through hole dip hbridges with the loads and voltage I gave which would you choose, and do you see anything wrong with a 6205 or even better both bridges of one chip in parallel?
I think the 6205 might be okay as I generally have success with many ST proprietary parts. The L293 is a fun loving care-free what-could-go-wrong chip until it walks down a dark alley and then it's all over, it doesn't have any protection. Please don't say "it should work" because you did ask for advice and this comes from experience, not just feel-good warm and fuzzy datasheets.
Don't try to shave a few bucks off the cost of your project if there are doubts, just build it tough and if it works then you'll be happy.
Do not rule out SMD chips especially when they are cheap and better etc. You need to weigh up things properly and then you can make a decision to stick with TH if that factor outweighs all the other factors etc. Anyway, SMD is very easy to solder either by hand or simple paste & oven stuff.
BTW, the quiescent current of a L293 includes both logic and power and my datasheets say that adds up.
As far as Surface Mount, soldering isnt why I stay away from it as a matter of fact I just got some 805 parts and a 32pin LQFP maxim usb host chip to assemble a board I got from Ray, this will be my first attempt at making a surface mount board from scratch my only real fear is pulling up pads i seem to do that alot and dont know why. Anyways the reason I vear away from surace mount is I dont know any reasonable way to prototype with it. I dont mind having PCBs made for a project, it saves alot of time over point to point and one can get 10 PCBs for 20 dollars now! My issue is I usually dont nail a circuit the first try so I like to breadboard it first and test it out. The only way I know to do this is with surface mount to dip adapter but there usually more than chip @ 16 bucks and only good once and for that style of chip. Id thought about etching my own breakouts but the lack of a solder mask on home PCBs makes the most common qfp parts impossible to solder. Im open to suggestions if you know of a way to prototype SM without spending 15 to 20 per dip adapter!