DIY eBike BLDC Motor Controller

Great comments.

I'm trying to decide where to locate my drivers. I have two boards stacked. The upper board is FETs and all the high voltage items. The lower is CPU and all the 5V stuff. There is a 24 pin connector mating the two boards. Components on both boards facing away from the other board.

I would like to keep the six FET board almost completely copper. Top side +V and bottom side GND. Fets at the edges along two sides. Phase wires located right at the paired driver FETs, with a chunk of copper flood connected to cool the TO247 pins feeding the phase wire.

As we have seen in the "Best Controller" discussion (which I just reread), one key to TO247 performance is cooling the pins. The pin cools the bond wires, and the bond wires are the weak link. To cool the pins we need close fitting holes to a cool copper surface. Heating in the copper surface is very bad since it heats the pins, we need current to not heat the copper, and the copper area heatsink to help cool the pins. The main way to do that is to avoid traces per se and have the FETS land in copper fill as much as possible.

So this implies that I don't want much else on the FET board. There are a few things that belong there - the interboard connector, the 70V to 12V switching regulator, the capacitors of course, and the shunt. These must be on the FET board to handle the high voltage, which should never enter the processor board - except that it has to if the driver chips are there...

The drivers can go on either board. If we move them to the FET board we loose room for copper. We also increase risk since we might want to change drivers and the FET board has more expensive components and more copper and maybe even more layers, so it is the costly board to change. We want to control risk by making the FET board right on the first spin if at all possible. But it is nice to keep all the HV on the FET board. Hmmm.

So should the drivers be on the FET board, or on the controller board right next to the connector. The distance will change by maybe an inch or so to the FET gate.
 
I'd put the drivers on the controller board. We are not switching these things at 1 MHz like in a ultra-swoopty power supply. I think one will have more problems trimming the edge rates than switching the gates faster.

I'm not a big fan of high-side driver chips. They tend to be a bit twitchy and have a lot of semi-hidden issues getting them to work well, particularly at higher switching rates and currents. I tend to prefer drivers like the TC426/427/428 series and their various pin-compatible cousins. Very easy to use for low side.

For high side, I would look into doing a three-output isolated DC-DC (primary driven by a TC428 through a couple of caps?). Then use the outputs of that DC-DC to power TC42x chips on the high-side. Inputs to the high side drivers are through a series cap, with a diode to isolated ground for DC-restoration. You could probably get by with a single output DC-DC, but having separate channels for each high-side FET provides some advantages.
 
I would really like to use some small, trusted driver chips. Preferrably 8 pin through hole.

Is there anything we can trust like that? Jeremy recommended some 14 pin units that look good, and they have through hole models, but they take a lot more space than 8 pin parts.

I found 8 pin parts, but have no experience with drivers. Any to recommend?? Something that will work without a lot of fuss??

texaspyro, what kind of twitchy issues do we have to worry about in high side driver chips?
 
wrobinson0413 said:
Jeremy Harris said:
The driver I'm using is the IR2110. It has the advantage of an isolated high side (up to 500V) and comes in a package (14 pin DIP) that makes it easier to get short runs to the FET gates (bearing in mind the need to fit gate resistors). Layout is also simplified because it has the input pins on one side and the output pins on the other.
Jeremy

Hi Jeremy

Watch out for the IR drivers if you are using any new generation high resolution pwm microcontrollers. The IR drivers have a little known latch up issue on the highside drivers when the digital control signals get less than 50ns wide. Apparently the turn on edge can get through their glitch filter, but the turn off edge gets rejected, and the high side occasionally get stuck on until a turn off edge gets through the glitch filter. This problem exists with all their older generation drivers like the IR2110, etc, but is fixed in their new generation parts like the IRS2332. I got burnt on that when a design I did using some IR2127S's and one of the new TI Piccolo TMS320F28027 motor control dsp started blowing fuses and reseting the dsp.

Thanks for the info.
 
wrobinson0413 said:
Hi Jeremy

Watch out for the IR drivers if you are using any new generation high resolution pwm microcontrollers. The IR drivers have a little known latch up issue on the highside drivers when the digital control signals get less then 50ns wide. Apparently the turn on edge can gets through their glitch filter, but the turn off edge gets rejected, and the high side occasionally get stuck on until a turn off edge gets through the glitch filter. This problem exist with all their older generation drivers like the IR2110, etc, but is fixed in their new generation parts like the IRS2332. I got burnt on that when a design I did using some IR2127S's and one of the new TI Piccolo TMS320F28027 motor control dsp started blowing fuses and reseting the dsp.

Thanks very much for that, it's not a 'feature' I knew about. Sounds very like the sort of problems we used to have when fast TTL first came out in the 70's, with odd effects because of varying propagation delays. The controller I'm using shouldn't be able to generate pulses as narrow as 50nS on the high side, but I'll try and double check this to make sure. The PWM is applied to the low side, so the high side should only ever switch at the commutation frequency, maybe a kHz or so at the very most.


Alan,

If you're after 8 pin DIP parts, then take a look at the On Semiconductor range, like the NCP5181PG for example: http://www.onsemi.com/pub/Collateral/NCP5181-D.PDF

Pretty easy to use, a small through hole package and enough drive current to switch FETs up to around 300nC or so of total gate charge quickly. My guess is that these would drive much higher gate charge FETs in this application, where there's a need to slug down the turn-on time to damp EMI.

Jeremy
 
Jeremy Harris said:
...

If you're after 8 pin DIP parts, then take a look at the On Semiconductor range, like the NCP5181PG for example: http://www.onsemi.com/pub/Collateral/NCP5181-D.PDF

Pretty easy to use, a small through hole package and enough drive current to switch FETs up to around 300nC or so of total gate charge quickly. My guess is that these would drive much higher gate charge FETs in this application, where there's a need to slug down the turn-on time to damp EMI.

Jeremy

Thanks for the suggestion Jeremy. I'm planning a single IRFP4368 FET per leg presently which they show as 380-570 nC total gate charge. Allowing a resistor in series with the gate will allow for some tuning. Anything else needed?

I have decided to put the drivers on the FET board to keep HV off the control board. I do loose a bit of copper that way but it is away from the FETs if I put the drivers next to the connector in the center. Copper that far away from the FETs should not hurt much. Another benefit is that the FET board can be designed to have drivers matched with its FETs.
 
The LTC4444 is a nice little half-bridge driver IC. It's an 8-pin SMT package, which really is quite superior to DIP parts. I know some DIPs are easier to work with but SMT isn't that big a deal and it makes your layout much more compact. If breadboarding is a big deal you can buy or make little "surfboards" to adapt the SMT package to a DIP footprint.

Personally, I'm a big fan of the integrated half-bridge drivers. I think they make layout easier than using a 6-channel driver, since the circuit is basically 3 independent half-bridges anyway. Using individual drivers can make sense in some circumstances, but it's a lot of extra hassle. The integrated drivers have a built-in bootstrap supply, they handle the high-side isolation, and they usually include protection circuitry. The LTC4444 has both undervoltage and shoot-thru protection. You won't get those with individual drivers unless you build it yourself. And, to connect individual drivers, you really need opto-isolators. Capacitive isolation really won't work - the varying high-side ground really messes it up unless you go to a LOT of trouble to fix it. The main advantage of the individual drivers is you can get higher drive currents, but at the cost of a lot of trouble. If I needed the extra performance, I'd use the integrated driver for the isolation and nice features, then use the individual drivers as a high-current buffer stage on the output. But you won't need that kind of thing here, one of the 2A or 3A integrated drivers will be just perfect.
 
rhitee05 said:
The LTC4444 is a nice little half-bridge driver IC. It's an 8-pin SMT package, which really is quite superior to DIP parts. I know some DIPs are easier to work with but SMT isn't that big a deal and it makes your layout much more compact. If breadboarding is a big deal you can buy or make little "surfboards" to adapt the SMT package to a DIP footprint.

Personally, I'm a big fan of the integrated half-bridge drivers. I think they make layout easier than using a 6-channel driver, since the circuit is basically 3 independent half-bridges anyway. Using individual drivers can make sense in some circumstances, but it's a lot of extra hassle. The integrated drivers have a built-in bootstrap supply, they handle the high-side isolation, and they usually include protection circuitry. The LTC4444 has both undervoltage and shoot-thru protection. You won't get those with individual drivers unless you build it yourself. And, to connect individual drivers, you really need opto-isolators. Capacitive isolation really won't work - the varying high-side ground really messes it up unless you go to a LOT of trouble to fix it. The main advantage of the individual drivers is you can get higher drive currents, but at the cost of a lot of trouble. If I needed the extra performance, I'd use the integrated driver for the isolation and nice features, then use the individual drivers as a high-current buffer stage on the output. But you won't need that kind of thing here, one of the 2A or 3A integrated drivers will be just perfect.

Looks like a nice part. I have the gear to do surface mount (microscope and hot air rework station) so I could do that. I will consider that. Should I give up on through-hole on this project? The micro is already SMT. Clearly there will be some through hole parts. But should I use SMT for most of it? It makes it difficult for others to build. If I use the larger SMT parts it is still possible to DIY with a fine tip solder pencil.
 
Unless somebody is going to manufacturer these, I'd use as little SMT as possible.

There are dozens of 8 pin gate drivers, all with the same pinout (some haven inhibit input on a pin that is NC on others). You get two drivers in a package, from 1 to 9 amps are available. The most generic are the MicroChip TC426/427/428 devices. TI makes some with 9A outputs (like the UCC27321).

You have to watch the specs (both published and "oh, you should have known that via telepathy) on the high side driver chips. Many have crappy current output, low switching freqs, minimum switching freqs, latchup issues, thin skins, suicidal tendencies, deep dark depression, excessive misery, etc.
 
Hi Alan,
I just started my own topic 'An economical Hi Amp DIY BLDC controller'.
I'm aiming for all through hole, and low cost.
If you're going to have boards made, especially 4 layer, I think the drivers should be SMT, on the fet board, right up near the gate. Some of us with access to rework stations could turn out near bare fet boards with only the drivers installed pretty quickly.

For caps, I intuitively think low esr are the way to go, but was shy to say so, as the last time I did, someone I thought should know, said something like 'at these freqs we don't need low esr, just big uF'. Not sure we'll know till we have controllers operational and see what things look like with a scope. Almost need to do so under load, which isn't easy. Do you have a dyno?
Actually, with an outrigger you could drive another motor, and feed it's output back to your batteries. Going to need a 'lab' setup with some kind of real world test load.

Bob
 
I don't think you should limit your design choices to through hole parts.
I think anyone with good soldering skills can assemble a surface mount board with simple tools.
I have built many prototype and small production run surface mount boards over the last three years, working under contract for a small firm. For the last dozen boards or so my soldering station has not been functional (I do not like ceramic tip heaters, too brittle), so I have been using an old Ungar Imperial iron with a 0.145" chisel tip! The boards I have been building have a wide variety of sm parts: 2512, 1206, 0805, 0603, SOT-23-5, SMB, SOD123, 8 pin SOIC, 20 pin TSOP, 64 pin QFP etc.
The most difficult parts to hand solder are the large suface mount inductors, with very small pads and a large thermal mass these are better suited to reflow techniques.

Required tools:
Fine diameter solder (.02"),
solder wick,
5" magnifier,
liquid flux,
any soldering iron (a good quality temperature controlled iron with a selection of tips is preferred)
tweezers (non-magnetic).

Generally speaking, I first apply liquid flux, then I tack a part down by one pad, fix any alignment issue, solder any other terminals, then fix up the tacked joint if necessary. For very fine pitch parts I sometimes wipe solder across the entire set of pins, then remove any excess with solder wick. (that's how my customer trained me!) These boards have proven reliable in the field.
Most people should be able to obtain an old motherboard or graphics card, and remove and replace parts to practice their technique.
 
rebelpilot said:
I think anyone with good soldering skills can assemble a surface mount board with simple tools.

For sure... but I have seen pics of a lot of members soldering jobs... "good soldering skills" does not often come to mind. The simpler and more robust you can make it, the better. Soldering SMT components is very easy with a little experience, but unfortunately, very few people have that experience.

There are a LOT of people around here that would really want to build one of these, but are severely lacking in even basic electronics knowledge and experience (and may or may not know it). I know that issue prompted Fritz to stop selling his welder boards... way too much hand holding of people who were in over their heads.
 
It is interesting that we have threads that attempt to agree on one controller design that cannot, instead we have multiple projects that are similar but differ in important details.

Clearly we are not going to choose the "best" or the "one way" to do this, there are many.

What I would like to see is a healthy discussion on the tradeoffs and folks can make their own choices, and in the end all our projects are better for having the discussion.

I agree that the larger SMT components, at least many of them, are quite hand-solderable. There are many sources of information about doing this with a variety of simple tools around the net, especially on some Ham Radio construction sites. It would be good to publish some links in this thread to these information sources. My present plan includes a surface mount processor at least, and the drivers may or may not be SMT. My present thinking on using SMT for a "kit" or public design is to do so only when there is a clear advantage to doing so.

I will defer the final choice of driver until I get into layout on the FET board. in the meantime I'm still collecting suggestions.

On the capacitors, perhaps the layout/design can handle either type of part (standard/low esr) with a little planning. Mixing capacitor sizes/types and using smaller units in parallel might help reduce the overall effective series resistance as well. My goal is to have this design work even if the parts aren't the most cost effective on the first try. Failures tend to cost more than better components, even if they are a bit too good. "Value Engineering" for cost is not so useful on a small volume production design.

It would be good to go through some of the math so folks can see the differences.

I'll be watching oldswamm's new thread for an "economical DIY controller" as well.
https://endless-sphere.com/forums/viewtopic.php?f=2&t=22728

Thanks for all the comments!
 
Using first principles to estimate Capacitance:

So, to size the caps we need to know a few things, I would expect:

Battery current
Acceptable ripple voltage
Frequency of PWM

i = C * dV / dT

There is also charging from the battery and consideration of the impedance from that and cabling, etc

I recall reading that 4V ripple was bad.

Using 16 khz which is 63 uSec

Assuming 1V ripple for a moment, and ignoring the battery:

50A = C * 1V / 63uS

C = 3150 uF

In reality I would expect that the ripple would be considerably less than 1V under 50A and 16khz conditions. This assumes nothing from the battery and PWM = 0 width so the whole time is in decay. ESR is not taken into effect either, it makes ripple worse.

What should the ripple goal be? 1.0V? 0.5V? 0.1V?

Thanks for your comments,
 
ESR is the only thing to focus on Alan.

Rememeber, the biggest function of the caps is to clamp the spikes so the FETs are destroyed. Secondary help is to reduce inductive/resistive voltage sag across the rails, which is a comparatively minor concern.

Also, I would personally considder 4v ripple to an extreme failure of the power stage design.

I made a thread about choosing caps here. Try to ignore Fetcher's cap-function-confusion posts :roll: :p
http://www.endless-sphere.com/forums/viewtopic.php?f=30&t=22194&start=15
 
texaspyro said:
There are a LOT of people around here that would really want to build one of these, but are severely lacking in even basic electronics knowledge and experience (and may or may not know it). I know that issue prompted Fritz to stop selling his welder boards... way too much hand holding of people who were in over their heads.

Excellent point. I once designed a simple kit, using through hole parts only, with big pads and tracks and wide component spacing, to try and reduce the number of soldering problems people would have, but even then I think I ended up re-building maybe 15% or so of all of them for people after they'd had problems.

I think it's easy to assume that everyone interested in a project like this will have a decent soldering station and enough experience to work on relatively fine track/pad spacing boards. The reality is that the majority will have a non-temperature controlled soldering iron, with an 1/8" wide bit and very little circuit board soldering experience.

To illustrate this, look how well Lyen is doing at building modded controllers for people. We all know that the base controller components from XieChang are very cheap, but a lot of people happily pay Lyen a premium to do the soldering and programming work for them, rather than do it themselves and save a fair bit of cash (BTW, I think that Lyen charges very little for his labour, as I know how much time it takes to build a controller from a virtually bare-boards state to a finished product. It takes a fair bit of time to build, programme and test a controller).

Keeping construction as simple as possible has to be a good thing, not just for initial build simplicity but also to aid rework, as there will be a fair bit of that, I'm sure.

Jeremy
 
Lfk, thanks for the link to the cap thread!

Some very good points Jeremy. And yea, Lyen is one of ES's great assets.

Bob
 
Jeremy Harris said:
The reality is that the majority will have a non-temperature controlled soldering iron, with an 1/8" wide bit and very little circuit board soldering experience.

Actually, I usually use a .1" wide tip and 0.050" solder (the real stuff with lots 'o lead and rosin, none of that sissy ROHS/water soluble-no clean flux crap) for soldering just about anything, including rather fine SMT stuff. I just hate working with .015" solder and 1/64" needle tips (no heat flow into the joint).

But then, I've been certified for soldering on reactors and manned space flight rated stuff and have a $6000+ rework station and have been huffing lead fffuummeeezzz for over 40 years. My favorite soldering iron is actually a non-temperature controlled 15 watt Antex. It's usually not the fiddle, but the guy plucking the strings that makes the magic music.
 
I'm one of them :)
but nothing a few books can't remedy
I'll be way in over my head, but, to be honest, you will have recruited yet another person to solder / rework it and keep ebikes rolling in the majority instead of minority structure...i'm all ears and i learn fast...and i'm sure a lot of people have held someone's hand at some point with that big :?:

One thing I'd ask for is pictures, It is very hard to understand what you're on about without a 'dummies' outlook on things, and if you really want the electric community to benefit on the whole you should make things as simple as you know how to this avoids hassle / questions / hand-holding for everyone and attracts new members onto the forums with the willingness to learn :)

texaspyro said:
rebelpilot said:
I think anyone with good soldering skills can assemble a surface mount board with simple tools.
There are a LOT of people around here that would really want to build one of these, but are severely lacking in even basic electronics knowledge and experience (and may or may not know it). I know that issue prompted Fritz to stop selling his welder boards... way too much hand holding of people who were in over their heads.
 
texaspyro said:
Actually, I usually use a .1" wide tip and 0.050" solder (the real stuff with lots 'o lead and rosin, none of that sissy ROHS/water soluble-no clean flux crap) for soldering just about anything, including rather fine SMT stuff. I just hate working with .015" solder and 1/64" needle tips (no heat flow into the joint).

Glad to hear from another 'lead lover'. I have to buy 60/40 from the US now, as you can't find the stuff here in the EU, thanks to the Health and Safety STASI. I recently bought a roll of 18g from DIgiKey, of all places, because it was the only place I could find that will still sell the stuff. It cost a fortune to get it airmailed to the UK.................

My iron is an aged (around 30 year old) 60W Weller, that still uses the old Curie point temperature control system. I had a large stock of Weller magnetic bits which is now getting a bit low - I've no idea if you can still get them nowadays, my guess is that if you can they cost an arm and a leg.

Jeremy
 
Lead free solder is a problem for anyone selling built boards. What do folks do about that? It is okay to sell a kit since it is lead free, and it is okay to build it with lead solder, but it is not okay for a guy to build some boards with lead solder and ship them to lead-free areas. The rules vary, but it can be a problem.
 
Jeremy Harris said:
I have to buy 60/40 from the US now, as you can't find the stuff here in the EU, thanks to the Health and Safety STASI. I recently bought a roll of 18g from DIgiKey, of all places, because it was the only place I could find that will still sell the stuff.

If you think that lead solder gives the Safety Stasi boners, I wonder what 70:30 cadmium-tin low thermal EMF solder would do for them? You can't buy the stuff anymore. The Secretary has disavowed all knowledge of its existence. So I make my own.

18g? I eat that much for breakfast everyday :twisted:

A local surplus store has 5 lb rolls of 0.062" 70:30 for $12.50 ea I bought a case of 48 0.040" 8 oz spools a while back for around $25. That disappeared real fast into all sorts of intergalactic hidey-holes. The guy had a couple of palettes of the stuff that he got as part of a bankruptcy takeover. He was going to have to pay a zillion bucks for the hazmat mafia to dispose of it. Once the word got out, it all disappeared about over night. The stuff also abounds on Ebay for cheap...

I believe that one can legally import single units of lead soldered thingies for their personal use... at least you could a short while back.
 
This is the "Master Controller" I selected to mount on the handlebar. Off the shelf, it has pretty much everything needed to interface with the user and the motor controller and all the other inputs. A 2 line LCD with LED backlight, pushbuttons, beeper, various inputs and outputs and huge 128K code space! Using an off the shelf board here will facilitate concentrating on the Motor Controller and not waste development effort on the master. There will be some minor interface hardware required - resistors, caps, etc, to complete the unit. A small circuit or perf board can handle that.

One interesting option available when using a Master controller is to route most of the handlebar I/O to it instead of the controller, and have a link to the controller that transfers the data. This could clean up the wiring a lot.

I think the controller should be able to stand alone without the Master, but for development it will be important to get lots of info about what is going on inside the controller, and to record it. This Master can do that.

Here is the "Development Terminal" as they call it.

http://www.sparkfun.com/commerce/product_info.php?products_id=37
 
Didn't look at the details yet, but that 'development Terminal' looks like just about what I had in mind, and an excellent price. Would want the communication interface to be able to accommodate multiple controllers, as well as other boards as yet undefined, such as lighting controllers, etc.

Have you read Shane Colton's thesis? I have only paged through it, but it's very clear and understandable. Very little at all involved math. Guess that isn't as important to you as to me though. :)

I think I'm going to pencil in the HCPL-J312 for high and low drivers.
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=516-1123-5-ND
Similar to the HCPL-3120 he used, except only good for 900v.
 
Back
Top