Simple BLDC controller

texaspyro said:
Burtie's timing adjuster was prototyped using a small single board controller which costs a bit of money. I suspect that its functionality would be real easy to get into a small micro chip. I would probably do it with a ATTINY23 which costs around $2...

Burtie said:
Not a hope in hell it would fit in one of those :D

Even if it only did the following?"
Jeremy said:
"the idea would be to run in fixed timing sensored mode up to a reasonable rpm, to give good start up and low speed torque, then switch to sensorless mode for medium to high speed running. The Halls will give the solid position feedback needed for start up at low speeds, and by switching to sensorless you get the ability to do timing adjustment on the fly, just by varying the threshold at which the zero crossing detectors operate. This is similar to the way that pre-digital electronic ignition systems managed to get advance; they used a sinusoidal sensor and varied the threshold on a comparator with rpm."...
 
Jeremy Harris said:
Around 1400Hz for 12,000 rpm on a 7 pole pair motor.

It looks like the processor has around 70us to execute however many lines of code are needed to do the stuff Burtie's doing, so I'm guessing it needs a fairly fast processor to bring the instruction time down enough to get it all done in time, especially if it's

1400 Hz is 715 us between pulses, not 70. The Tiny23 or '328 can run at 20 MHz... they typically clock out at 1 instruction per Hz (so around 50 ns per instruction). You can blow 4,000-5,000 instructions per phase between pulses. I don't see any problem at all doing it all in glorious bit banging software.

You could also use some of the chips hardware features (timers, interrupts on pin changes) to good advantage. A Tiny 23 may not yield something as fancy or full featured, but something quite usable should be possible. The '328 should be able to do just about anything you want since it as 32K of program memory.
 
MitchJi said:
texaspyro said:
Burtie's timing adjuster was prototyped using a small single board controller which costs a bit of money. I suspect that its functionality would be real easy to get into a small micro chip. I would probably do it with a ATTINY23 which costs around $2...

Burtie said:
Not a hope in hell it would fit in one of those :D

Even if it only did the following?"
Jeremy said:
"the idea would be to run in fixed timing sensored mode up to a reasonable rpm, to give good start up and low speed torque, then switch to sensorless mode for medium to high speed running. The Halls will give the solid position feedback needed for start up at low speeds, and by switching to sensorless you get the ability to do timing adjustment on the fly, just by varying the threshold at which the zero crossing detectors operate. This is similar to the way that pre-digital electronic ignition systems managed to get advance; they used a sinusoidal sensor and varied the threshold on a comparator with rpm."...


I guess that method would work, but Burtie has got his working, with a nice user interface, and it looks like it would be more versatile than the very simple method I suggested. If the timing needs to be changed WRT load as well as rpm, then doing it Burties's way is probably better.

Jeremy
 
texaspyro said:
1400 Hz is 715 us between pulses, not 70. The Tiny23 or '328 can run at 20 MHz... they typically clock out at 1 instruction per Hz (so around 50 ns per instruction). You can blow 4,000-5,000 instructions per phase between pulses. I don't see any problem at all doing it all in glorious bit banging software.

You could also use some of the chips hardware features (timers, interrupts on pin changes) to good advantage. A Tiny 23 may not yield something as fancy or full featured, but something quite usable should be possible. The '328 should be able to do just about anything you want since it as 32K of program memory.

Whoops, my bad I missed a decimal place.............. (note to self - check before hitting 'submit')

I guess you're probably right, the software stuff isn't my forte, so Burtie would be the one to know for sure. I don't know anything much about those chips, but have a feeling that Burtie wanted to stick with PICs because he already had a compiler for them and was familiar with the language used.

The components should arrive today, with a bit of luck, so I may get the final version built this afternoon.

Jeremy
 
Jeremy Harris said:
I guess that method would work, but Burtie has got his working, with a nice user interface, and it looks like it would be more versatile than the very simple method I suggested. If the timing needs to be changed WRT load as well as rpm, then doing it Burties's way is probably better.

Yes, for gung-ho controllers then you can do all sorts of neat things with the more powerful processor/single board computer. For the simple cheap ass controllers a basic timing adjuster should be all that is needed. It can be as simple as a fixed timing shift or more complicated like adjusting the timing tweak based on throttle.

At less than a buck a shot, one could even dedicate a separate micro per phase if you had performance issues. This could also be a place where the basic ARM chips would work well since they have a 32 bit core and single cycle multiplier. The computing power of some of these "low end" processors is rediculous.
 
Hi texaspyro,

I totally agree with you, there are probably plenty of ways the platform for the timing controller could be optimised by using a smaller/cheaper ucontroller and a full custom PCB.
The task is high on my priority list, but it will take time to develop.
It is amazing what some of these small modern ucontrollers can do!

I would, of course welcome any input you have in the TA thread here: http://endless-sphere.com/forums/viewtopic.php?f=2&t=19054&p=346223#p346223

Burtie
 
I managed to get the final version of the controller finished last night and have just tested it. The good news is that it worked well 'straight out of the box' with no starting problems and extremely clean-looking gate drives. The DC DC converters seem to be a much better, if slightly more expensive, way to get good high side drive than the bootstrap method (please don't say 'I told you so' again, LFP.......... :roll: ).

Using two boards has reduced the size of the controller a fair bit. It's now about 3" wide, 6" long and just over 2" tall (but could be under 2" tall with a less massive heatsink). The connections now make more sense, too, with four Molex headers at one end (for the 12V supply, throttle, Hall sensors and forward/reverse switch) and the power and phase cables coming out the other end. These could be copper buss bars with bolted connections, I'll have a look at doing this to see how easy it is some time later.

The daughter board could have different variations easily enough. There's room to add things like a wide range DC DC converter for the 12V supply, for example, so that it could be powered by the main supply rail. It could also incorporate a microcontroller to add some supervisory functions, like a torque controlled throttle, cruise control or whatever anyone wanted to add. The power board is pretty universal and could be used with any controller that can provide 6 drive signals, so if someone want to just play around with the low power stuff they could design their own controller board and just attach it to this power board.

Here are some photos of the final 72V, 120A version (fitted with just a single shunt for testing, so it has a 20A current limit at the moment):
Mk3 front view.JPG
Mk3 top view.JPG
Mk3 end view.JPG

The next stage is to build a test rig so that I can do some serious load testing. I have some strain gauges and a data logger, so I'm going to have a go at building a simple motor brake dyno. My guess is that this will probably take a little while to get sorted, what with the holidays and the cold weather making my workshop more than slightly uninviting............

In the mean time, I'll try and get the circuit diagram updated to reflect the current design and post it for people to have a look at.

Jeremy
 
Jeremy Harris said:
I managed to get the final version of the controller finished last night and have just tested it. The good news is that it worked well 'straight out of the box' with no starting problems and extremely clean-looking gate drives.
This IS a wonderful Christmas Eve gift to ES. :!: 8)

What is your favorite beer/cider or ? at your local pub? I should buy you one by PayPal. :mrgreen:

Congratulations on this beauty...

:twisted: :D
 
I guess my transformation to EV nerd is nearly complete. 3 short years ago I wouln't have looked twice at this sort of thing. Now I am as giddy as a school girl looking at schmatics & these photo's.
I will 2nd every thing in deVries post. & thanks again Jeremy for taking the lead on this.
much respect. & Merry Christmass.
 
Thanks guys, it's much appreciated.

To be honest, I'd have never thought of building a BLDC controller a couple of years ago, as I've got zero experience with high power stuff like this. It's been an interesting learning curve getting this controller to work properly, so I now feel reasonably confident of going for the really big version (same controller board, different power board to fit directly to 100V, 680A, Ixys Hiperfet modules............ :D ).

Jeremy
 
Well done! ... and a most Merry Christmas to all!
 
Nice Jeremy! Can't wait to get going on an alt layout and get some boards for the masses!

Happy Holidays!
 
Thanks again, folks.

I've just dug an old oscilloscope out of the loft, a proper one, with wiggly traces on a green screen, rather than the USB Instruments one on the PC that I tend to use most of the time. It's years out of calibration, but seems to be near enough OK in terms of timebase frequency to get some rough measurements. It's only a 20MHz bandwidth one (it's an old SE Labs SM111, for any antique 'scope geeks out there) so it's not fast enough to show anything really spiky on the FETs or power rails, but it's good enough to get a reasonable look at the gate drive rise and fall times and the FET turn on/off times.

The gate drive (looking at the PWM pulses on the low side, as that was easier to get the 'scope to trigger on reliably) has a rise time of about 200nS and a fall time of about 250nS, right at the gate. The FET switching times look to be very slightly better, with turn on taking about 200nS but turn off being around 150nS. This is a fair bit better than the >1uS switching times seen on the XieChang controllers and probably as fast as we really want. The smallest PWM pulse that's getting through is 2.5uS, but this is right at the point where there isn't enough power to keep the motor rotating, so it will probably drop below this, down to less than 1uS, if the motor wasn't restricting it (once the motor stops turning the PWM stops). The PWM frequency is 22.14 kHz, according to my old (out of cal!) Gould Advance timer/counter.

There are no signs of ringing, spikes etc that I can see, but it's early days and I can't load the motor down much until I get the brake built. Still it's looking promising so far and I'm pleasantly surprised at how clean things are looking. I'd love to post some pictures of these traces, but my digital camera won't capture the 'scope picture, it breaks the picture up into bands. It must be something to do with the way the sensor in the camera scans clashing with the movement of the trace. It's at times like this that I wish I had a fast storage 'scope, but the reality is that it'd sit unused for years if I did have one. This old 20MHz 'scope hasn't been turned on for at least 5 years, it's been up in the loft because it was just taking up space on the bench.

Jeremy
 
Jeremy Harris said:
My guess is that this will probably take a little while to get sorted, what with the holidays and the cold weather making my workshop more than slightly uninviting............

Oh, so sexy! Finally a controller that Bubba can build. No acres and acres of teeny weeny SMD doodads.

Crank that puppy up to 72V and 120 amps. The workshop will warm up to a nice comfy temperature. :twisted:
 
Jeremy Harris said:
I'd love to post some pictures of these traces, but my digital camera won't capture the 'scope picture, it breaks the picture up into bands.
Does your camera have a "slow synchro" mode? Or a "night mode"? Or ISO mode? Any of those will essentially give it a slower "shutter speed" so that it captures the entire screen redraw, but you will have to put it on a tripod or other mount or it'll be blurry if it's handheld. ;)

If I set my ISO to (I think) 800 to 1000 on my little old Sony DSC-W50, it'll take a complete pic of any of the scopes or other CRTs I've tried so far. (with my old Tek 531A scope it'll work even in normal mode, which I think is around ISO 80)
 
amberwolf said:
Jeremy Harris said:
I'd love to post some pictures of these traces, but my digital camera won't capture the 'scope picture, it breaks the picture up into bands.
Does your camera have a "slow synchro" mode? Or a "night mode"? Or ISO mode? Any of those will essentially give it a slower "shutter speed" so that it captures the entire screen redraw, but you will have to put it on a tripod or other mount or it'll be blurry if it's handheld. ;)

If I set my ISO to (I think) 800 to 1000 on my little old Sony DSC-W50, it'll take a complete pic of any of the scopes or other CRTs I've tried so far. (with my old Tek 531A scope it'll work even in normal mode, which I think is around ISO 80)

Thanks for the tip, AW. I'll dig the camera manual out and have a read. It probably does have those modes somewhere, I think, as it was a reasonably good camera in its day (it's an old Panasonic DMC-FZ20).

I've pretty much worked out how to put together a small test dyno, so that I can do some proper load testing. I need to get some more LiPo's, too, as testing will need a fair bit of current, more than I can drive from any of the power supplies I've got.

I'm torn between using a friction brake (essentially just a disc brake with a fine adjustment on the brake force applied) or an eddy current brake. It seems that folks building small dynos have used both with success. The eddy current brake seems a better approach, as I think it'll be easier to get smooth control of braking torque using it. I have a suspicion that any friction brake is going to suffer from changes in torque as the disc/pads get hot and so need constant adjustment.

Jeremy
 
Based on this:
http://www.dpreview.com/reviews/panasonicfz20/
it does have what you need. Probably all you need to do is rotate the mode knob on the top right to one of the letters, but I don't know which one. On mine a moon symbol is used for night portrait mode, which holds the shutter open a really long time, but yours does not have that same symbol.

Alternately there is a setting for exposure time in the menu somewhere (I didn't read all the directions on the review, but it does show it in the menu pics).


Aside: It may not be helpful, but here are those pics I meant to post of that Chinese analog BLDC based on these MC3303x chips:
DSC03892.JPG
DSC03895.JPG
DSC03893.JPG
DSC03894.JPG
The shunts are missing from the pic of teh top of the board, as I removed them to fix another one.

The last two pics are closeups of the two vertical boards on there, one of which looks like maybe gate bootstrapping for all three phases, and the other I'm not sure but could be a sensorless module? The controller does have hall wires but maybe it doesn't require them.
.
 
Thanks for the useful info.

That controller looks interesting. My guess is that you're right, the upright boards do look like drivers. The hi side needs inverting, so it may be that the board with the IC on it is just inverting the three hi side drives.

It looks as if the magic smoke well and truly escaped from this controller..............

Jeremy
 
amberwolf said:
Aside: It may not be helpful, but here are those pics I meant to post of that Chinese analog BLDC based on these MC3303x chips:
**snip
.


They have FETs all over the place on that board. I'd be willing to bet that the gate drive rings like like crazy...might even be why this thing is burned up...
 
All the "afterthought" caps across the power rails on the underside of the board are another indication that they had problems with power rail spikes after the design was finalised.

My guess is that the combination of poor layout and cheap, high ESR caps on the power rails may have limited what this thing could do quite seriously.

Jeremy
 
As you are talking about layout.. and I have very limited experience of using fets for switching such high currents with board layout .. so I thought I would just throw this out there.. I cant help thinking that the power end of Jeremy's layout cant be made half length by mounting the fets over the edge of the board i.e drain to one side of the board and source to the other side ( not through hole with the fets ). The heat sink can then be larger or it would be even possible to double up on the fets for a not a lot more pcb/heatsink area. The brains of the controller can then be stacked on top.. Im sorry for throwing this out there but I would appreciate any feedback of any potential problems with this layout as this is the way I would like to go with this ( if possible ).


This is just a picture for the general idea not a real layout..
 
gwhy! said:
As you are talking about layout.. and I have very limited experience of using fets for switching such high currents with board layout .. so I thought I would just throw this out there.. I cant help thinking that the power end of Jeremy's layout cant be made half length by mounting the fets over the edge of the board i.e drain to one side of the board and source to the other side ( not through hole with the fets ). The heat sink can then be larger or it would be even possible to double up on the fets for a not a lot more pcb/heatsink area. The brains of the controller can then be stacked on top.. Im sorry for throwing this out there but I would appreciate any feedback of any potential problems with this layout as this is the way I would like to go with this ( if possible ).

This is just a picture for the general idea not a real layout..

Pretty similar to how I got 12 TO-247 devices into a small space for my controller. The only real difference is I had the board go over the mosfets so I could get more bus area. Since I had a 4 layer board I could fit the gate drive above the fets but in a 2 layer board I would just extend the DC bus over the top of the FETS so it is as wide as possible. It keeps the outside dimension down while maximising the amount of copper for the dc bus.
 
Back
Top