Simple BLDC controller

Jeremy Harris

100 MW
Joined
Oct 23, 2007
Messages
4,208
Location
Salisbury, UK
I've been working for a while (very slowly, due to other distractions) on a simple, no frills, BLDC controller, using an off-the-shelf linear BLDC controller chip. Today I managed to put some more time into it, and have knocked up the first prototype circuit board lay out.

Here's the circuit, pretty much a direct copy of the datasheet one, albeit with a different FET driver arrangement:


I've made up a PCB using the 'iron on laser toner' method. I've used this in the past for one-offs, but always for small boards. This was the first time I'd tried a board of this size (6" x 3.6"). I used cheap Staples inkjet glossy photo paper in an old laser printer (had to fiddle the settings for it to print on the coated paper) with this result:
Controller PCB - ready to iron on.JPG

This was then ironed on to the copper side of the board, using an ordinary domestic iron set to it's highest temperature. The result is that the toner melts on to the copper and forms a nice resist coating. The next stage is to soak the paper off, which leaves the ready-to-etch circuit hoard looking like this (sorry for the crappy photo, no natural light today (freezing fog outside) so had to use flash):
Controller PCB.JPG

Here's a view of the component layout side of the board:
Controller PCB - Component View.JPG

The board is etching in ferric chloride solution right now, so I should get it trimmed up and ready to drill later in the afternoon.

The basic specs are:

Maximum voltage - 75V for the prototype due to the FET limitations. The FETs could be changed for IRFP4468s for 100V. The board already has 100V capacitors.
Maximum current - 120A, 'programmable' in 20amp steps from 20A to 120A by adding/removing one or more of the 6 paralleled shunt resistors (1 shunt = 20A, 6 shunts = 120A)
PWM frequency = ~22kHz, but can easily be changed by changing a couple of component values
Maximum commutation frequency - not known, but as it's not limited by any code it should be much faster than any of the motors we use would ever need.


Features:

Cycle-by-cycle current limiting, meaning that the FETs will be protected from over-current by the controller quickly reducing the PWM duty cycle on the fly.
On-the-fly reversing - no need to close throttle, switch direction and then re-open the throttle. This could be handy for anyone wanting to build a retro-direct two speed gearbox
TO247 FETs (IRFP4368s), with a low Rdson (1.85mohm max), high current capability (195A package, 350A silicon) and good thermal properties (0.53 degC/W junction to heatsink)
Single sided PCB that can be a DIY job (no narrow tracks, big pads and just a handful of wire jumpers on the top surface)

The eagle-eyed will have spotted an extra chip on the board, an MC33039. This provides optional closed-loop speed control. The controllers we normally use run open loop, which creates part of the odd throttle response we have (the situation where the throttle is opened to pull away, only for us to then find it's a bit much, so we have to close it, ending up with a bit of manual throttle jiggling to keep going at a constant speed). With this closed loop option (it can be disabled by shorting the 1M resistor across pins 10 and 11 of the MC33033) the controller will always try and run the motor at the speed commanded by the throttle setting, automatically increasing or decreasing torque to overcome changes in load. I'm hoping that this might make the throttle feel a bit better. It's not torque control, but might be as user-friendly in effect. It should allow good low speed controllability, I hope, time will tell.

What it doesn't have:

It doesn't have any battery pack low voltage cut-off, anti-theft alarms or cruise control. It doesn't have any ebrake connections either, although these could be added fairly easily using the chip 'output enable' line (currently grounded via a 4k7 resistor).
It doesn't run any code, therefore can't be re-programmed to do other things - it's pretty much as basic a BLDC controller as it's possible to build.
It doesn't have an on-board 12V supply, it uses 12V from the DC DC converter that I already have for the rest of the bikes systems.

With luck I should be able to do some basic testing in the next week or two, if the parts I'm waiting for make it in time (the weather here in the UK is pretty vile and causing all sorts of disruption).

For the cognescenti, I'm using a total of 12 off, 220uF, 100V, Rubicon ZL capacitors across the main bus, mixed with a handful of 0.1uF 100V ceramics fitted adjacent to each pair of FETs. The copper power and phase traces on the board will be beefed up by adding 18g copper sheet fitted upright, like fences, on the bottom of the board, as I've done on the small Xiechangs. The power and phase connections are going to be made from soldered in copper posts, threaded to take eye terminals - I'm fed up with struggling to solder fat cables to PCBs.

I'll update this thread as soon as I get more done on the controller. The hope is to use the basic building block to drive the big Ixys FETs I have at some stage, but I'm starting off with something more modest.

Jeremy

(edited to correct small error in circuit diagram)
 
Awesome Jeremy.
Building something like this would be great practice.
And this would be a good thing to have around for a test controler as well.
 
That's the hope, Arlo. I have zero experience of high-power BLDC controller design and this seemed to be the easy way to get something up and running to play with. It may not have a lot of bells and whistles, but my guess is that most of the high-power folk just want something that's simple and does the job.

The board's finished etching now, so it's on to the really, really tedious job of hand drilling it..............................

(this is where folk get to run a book on how many 0.8mm diameter carbide drills I break, at around $3 each)

Jeremy
 
subscribed.
Jeremy, +1 for keeping it super simple.
I use a lot machines & allways apreciate when a designer attempts to hold to the minimum required components to acomplish the task.
All the periphials are fine & well, but a motor controller 1st.
 
Jeremy,
This looks dead-simple and very compelling! 8)

I just have one question:

  • If I wanted to output sinusoidal waveform (example: for my ironless assemblies) I’d need to use another device rather than the MC3033, yes?

Well done. KF
 
Kingfish said:
Jeremy,
This looks dead-simple and very compelling! 8)

I just have one question:

  • If I wanted to output sinusoidal waveform (example: for my ironless assemblies) I’d need to use another device rather than the MC3033, yes?

Well done. KF

Thanks for the kind words, KF.

This chip only does 6 step (so-called trapezoidal) commutation, which is hard-wired in and driven by the standard Hall sensor outputs. It can't be changed to run sinusoidal PWM variation with electrical angle, as it doesn't have either a position encoder input or anything other than the hard-wired 6 step commutation table.

Sinusoidal commutation ideally needs a way of measuring absolute rotor angle more accurately than just three Hall sensors will allow. One way to do this is to fit an encoder on to the shaft to provide the additional angular resolution needed. It is possible to interpolate between Hall sensor pulses to derive an estimate of the required angular position, which works OK at steady speeds, but this method has significant errors if the motor has a low rotational inertia and is capable of changing speed rapidly.

Jeremy
 
Put a ceramic on the FET driver chip (and maybe a tantalum). Wouldn't hurt to put a couple more ceramics on the phase lines.
 
texaspyro said:
Put a ceramic on the FET driver chip (and maybe a tantalum). Wouldn't hurt to put a couple more ceramics on the phase lines.

I reckon it should be OK as it is. The switch-on times aren't mega-fast (deliberately) so the existing 0.1uF ceramics together with the low ESR electrolytics on the bus adjacent to each FET pair should be OK. 100V tantalums are near enough unobtanium as far as my budget goes.

The driver chips have local decoupling on the 12V Vcc lines, you can see the 100uF electrolytics on the board layout, I just missed them off the schematic. There's one 0.1uF ceramic on this line already, but I guess I could add some locally right at the driver, if they're needed, or maybe swap out the electrolytics for some affordable low voltage tantalums.

Jeremy
 
Jeremy Harris said:
<snip>

This chip only does 6 step (so-called trapezoidal) commutation, which is hard-wired in and driven by the standard Hall sensor outputs. It can't be changed to run sinusoidal PWM variation with electrical angle, as it doesn't have either a position encoder input or anything other than the hard-wired 6 step commutation table.

Sinusoidal commutation ideally needs a way of measuring absolute rotor angle more accurately than just three Hall sensors will allow. One way to do this is to fit an encoder on to the shaft to provide the additional angular resolution needed. It is possible to interpolate between Hall sensor pulses to derive an estimate of the required angular position, which works OK at steady speeds, but this method has significant errors if the motor has a low rotational inertia and is capable of changing speed rapidly.

Jeremy

Thank you for the explanation; greatly appreciated. I have some more questions but they are OT so I shall ponder and start a new thread so as not to steal any more thunder from your most excellent effort:

The design of your board is truly a clean layout. Quite inspiring, friend. :)

<nods> KF
 
Great design, Jeremy.

The laser printer method is great!!!! This is missing reason to buy new printer. Never heard of it before. I did all kind of etching masks but this seams super simple, Thanks for sharing.
 
Kingfish said:
Thank you for the explanation; greatly appreciated. I have some more questions but they are OT so I shall ponder and start a new thread so as not to steal any more thunder from your most excellent effort:

The design of your board is truly a clean layout. Quite inspiring, friend. :)

<nods> KF

Feel free to fire any questions you have, but I am still going up a learning curve when it comes to controller design, hence this simple effort as a way of gaining some practical experience of the things that really matter for a robust controller, so I may not be best placed to give a good answer.

Jeremy
 
HAL9000v2.0 said:
Great design, Jeremy.

The laser printer method is great!!!! This is missing reason to buy new printer. Never heard of it before. I did all kind of etching masks but this seams super simple, Thanks for sharing.

Thanks, Hal.

The laser toner transfer method works very well once you've got the right technique and found a paper that works well. A coated paper is needed, so that the toner can transfer from the coating to the copper when you iron it. I've experimented with several different types of paper, and even used some expensive, purpose made, film (which often seems to get scratched going through my printer).

The paper that works best for me is very cheap glossy inkjet paper (it has to be glossy). My printer needs to be set to print to use coated paper, failing to do this always results in a paper jam............. The copper side of the board needs to be cleaned and degreased before ironing the paper to it and it needs a fair bit of pressure, with some gentle rubbing with the edge of the iron, to get the toner to melt and transfer to the copper. Then it needs to be allowed to cool, before soaking the paper in a bowl of warm (not hot) water. Once it's wet through, the paper will start to peel away from the copper, leaving the toner as a resist coating. You need to rub the paper off with your fingers (no abrasives or brushes as it will scratch the toner layer), as it tends to stick on large areas. Once you have the paper off, the board can be etched in the normal way - I use warm (around 60 deg C) ferric chloride solution.

If you want to make a double-sided board, than this can be done by making a U shaped cardboard spacer, the same thickness as the PCB material and two sheets of printed paper taped to either side, carefully aligned so the tracks on the top and bottom register. The double sided copper board can be slipped inside this 'envelope' and taped in place, then each side can be ironed on. This works for fairly wide track/pad spacing but is tricky to do with fine stuff, as it's hard to get really goo alignment between the two side. Most of the time I stick to single sided boards and put up with having a few links on the upper surface.

Jeremy
 
Alan B said:
Nice job, Jeremy!

What software do you use for layout?

Thanks, Alan.

You probably need to be sitting down and promise not to chuckle, but the layout is done by hand, using an old version of Autocad (Autocad 2000) that I'm just used to working with for other mechanical stuff. It didn't seem worth going through the learning curve with another package when I have around 25 years invested in Autocad's quirky user interface, although I'm sure some of the other packages, like Eagle, would do the job more quickly and with less errors. I keep promising to sit down and learn to use Eagle, but it does things so differently to Autocad that I end up just reverting to what I know through impatience to get something done. There's also something therapeutic about doing manual track layout, like solving a good crossword puzzle.............

Jeremy
 
Alan B said:
When I was making double sided PCBs at home I drilled a couple of small holes to use as fiducials to align the sides. These are drilled after one side's resist is applied and before the other side is done. The second side can then be aligned on those holes.

That's a darned good idea. I've relied on printing register marks on the paper and then holding the two sheets up to a bright light to get them aligned, but your method sounds a lot easier and more accurate. I'll give it a go next time I'm feeling masochistic enough to do a double sided board.

Spurred on by the success with the controller board, I've just made another batch of even bigger boards for my new LiPo charger, each holds 5 SynQor quarter brick DC DC converters and three boards will be stacked to give me a 15S charger capable of 20A maximum, with each cell having it's own constant voltage, current limited, supply. I just need to find a suitable multiway connector at an affordable price.

Jeremy
 
(Regarding CAD tools)

I know the feeling. It takes time to learn a new package and it is often easier to bang something out the old way.

You might consider looking at KICAD, it appears to be a good package that is easier to learn than Eagle and not encumbered with so many limitations and expensive license upgrades. I've just started to learn it but have not had much time on it yet.

edit - KiCad has a bit of a learning curve, the free software from ExpressPCB is much easier to learn and use, and folks print from it to make homemade pc boards, or you can have ExpressPCB make boards. FreePCB is also pretty easy to learn and makes gerber files for submission to other pc board houses.
 
I have been using something called ExpressPCB for my pcb work ( its free ) I found it very easy to get to grips with considering how little actual pcb work I have done in the past 15-20 years . It fits the bill perfectly for home made pcb stuff. I also use the iron/laser method, the paper type is very important as Jeremy have said but also let the board cool down completely before soaking the paper off, The nice thing about doing it this way is if the toner do not stick to the pcb then at least you can clean it all off and do it again , it was surprising how much photo-resist pcb we used to bin due to bad batches of boards or scatches in the photo-resist layer.
 
Jeremy Harris said:
The driver chips have local decoupling on the 12V Vcc lines, you can see the 100uF electrolytics on the board layout, I just missed them off the schematic. There's one 0.1uF ceramic on this line already, but I guess I could add some locally right at the driver, if they're needed, or maybe swap out the electrolytics for some affordable low voltage tantalums.

That's good. A lot of the integrated high side driver chips seem to be rather twitchy about their power. Decouple as close to the chip as you can.
 
I managed to get the board drilled without breaking a single drill, not bad considering that 0.8mm carbide drills are incredibly fragile when you're drilling by hand. Here's a pic of the underside of the drilled board. It has a few pinholes in the big copper areas, but overall isn't too bad for a homebrew board:
PCB underside.JPG

I'm still waiting for some components, plus I need to machine up the copper studs I'm going to use for terminals, but I managed to get the components I have fitted to the board:
Controller PCB top view 1.JPG

Jeremy
 
Looking great!
 
Nice! An inkjet printer and a clothes iron.. gotta love it.

I'm very curious how that alt throttle mode is going to feel. Throttle feel is oft ignored but very important imo.
 
vanilla ice said:
Nice! An inkjet printer and a clothes iron.. gotta love it.

I'm very curious how that alt throttle mode is going to feel. Throttle feel is oft ignored but very important imo.

Laserjet printer ... not inkjet
 
Ah ok laserjet, either way I'm jealous of the skills! Appreciate the pics and sharing of the steps to do this project.
 
Back
Top