Rickys High Power Flexable motor controller

Ricky_nz

10 kW
Joined
Aug 15, 2010
Messages
844
Location
New Zealand
After a few suggestions and the fact that the controller part fits better in the technical forum I will be placing future controller related information in this thread and leaving the old thread for the mechanical / bike part

The old thread can be found here http://endless-sphere.com/forums/viewtopic.php?f=28&t=20766.
That thread will remain for the bike related parts only. Unfortunately that thread to too intertwined to make one of the other so for early controller development you will have to refer to it. I will past some of the important parts into this thread.


---------------------
Summary:
This controller consist of two boards.
1) a control board that will support hall sensor, rotary encoder, or sensorless operation depending on the software settings.
Full sinewave vector control is planned although the very first software will be hall effect trapasoidal to keep things simple while I
debug the power board.
This board features a 120MHz processof and 12Bit simulatanious sampling ADC
suports twin CT's in motor phases.
2) An example power board sporting 12 x TO-247 devices :D .


This design is not the low cost option but it should result in a very robust system.
I plan to sell built up controller or boards once I have everything debugged.
I could even consider bare PCB's for those keen enough.

For those with the skills to build an output stage I will sell control boards with software.
I will provide some documentation when I get time.
I just a bit busy getting some software ready for when the bare power boards arrive in early december at the moment.

file.php


Ricky.
 
PC Configuration Program.
I have finally got back round to working on this as having this working will definitly make getting the motor controller running easier.

It has been going slow partly because I was spending a lot of time making sure the PCB for the power electronics was good but now thats out the way I have got back onto the software.

I had left this code not fully working as I had been implementing a tree of parameters for display/editing.
This is the first time I have used the QT Model/View interfaces for treeviews and the previous work I did provided the data but it wasn't showing the child objects properly

I have finally tracked down the bug :D . I was calling the wrong function columnCount rather than childCount :roll: .
Its really a pain having to learn new APIs but once you get the hang of them they are very useful.
Using a new API always adds more of a challenge to the is a a bug in my code or in how i use the API.

I should hopefully have PC editing of parameters working during the next week now that I have got my head back into the code.

This is not strictly necessary as I can do it from the command line but it is definitely more cryptic.

set parameter 34235 8192
or
click on motor max speed and enter 100%
:?:

I can do either but for others I think the GUI option is worthwhile.



Example of tree on left showing parameters read from an xml file
pccfg.jpeg

Ricky
 
gui looks gorgeous. It made me think of something that you might want to add in ontroller software (somewhere down the line) The 'infineon' controllers have a 125% setting that advences the phase timing a little such that you increase the bemf a little bit at full speed and a slightly higher top speed (at the expense of efficiency) it might be fun to play with down the line :D
 
grindz145 said:
gui looks gorgeous. It made me think of something that you might want to add in ontroller software (somewhere down the line) The 'infineon' controllers have a 125% setting that advences the phase timing a little such that you increase the bemf a little bit at full speed and a slightly higher top speed (at the expense of efficiency) it might be fun to play with down the line :D

Yes should be possible to add something like that. It is phase timing for hall effect based systems but in the full vector control mode it is a matter of manipulating the control vectors.

I haven't played with the 'infineon' controllers although I now have an ecrazyman 6Fet so I should have a play at some point.
I expect when I am done there will be more parameters to tweak than you can shake a stick at :lol: The industrial products we develop at work have 1000's of parameters but I won't go quite that far :lol:
 
Ricky_nz said:
Full sinewave vector control is planned although the very first software will be hall effect trapasoidal to keep things simple while I

Boy, I'd like to see the vector control version.
Running an induction motor would be possible then with an encoder and the right software.

Nice work!
 
fechter said:
Ricky_nz said:
Full sinewave vector control is planned although the very first software will be hall effect trapasoidal to keep things simple while I

Boy, I'd like to see the vector control version.
Running an induction motor would be possible then with an encoder and the right software.
I will do vector control for PMSM first as Its simpler (I want this to drive the big RC motors in either sensored or sensorless).
I believe the control code for vector control of a true induction machine is a bit more complicated than for a PMSM in that it is necessary to manage the flux in the rotor (I haven't looked into that so not sure how much extra code is necessary).
I would only look at induction machines once PMSM sinewave vector control is working.

I plan to have hall effect trapesium based software running by the end of the year so I can get some testing time on my power stage on the bike.
I will then start on vector control.
I need to find some time to play with Matlab and PLECS to model sensorless control before I write that code.

Its going to be "FUN" getting it all to work with upto about 1KHz sinewave output :lol:
 
Awesome Ricky.
This is the best.
Put me down for a few controller boards no matter what they cost.
 
lifepo4ever said:
great work but what is the rating of the TO-247 mosfet thanks
The MOSFETS I'm using are:
NOTE: these are the numbers at the top of the datasheet so take as you see fit

IRFP 4368
75V
ID 195A (package limited)
ID silicon limited 350A
RDS ON typ 1.46mR, max 1.85mR
datasheet http://www.irf.com/product-info/datasheets/data/irfp4368pbf.pdf

IRFP 4468
100V
ID 195A (package limited)
ID silicon limited 290A
RDS ON typ 2mR, max 2.6mR
datasheet http://www.irf.com/product-info/datasheets/data/irfp4468pbf.pdf


Some of the TO-220 package MOSFETS come close in current rating but can't match the TO-247 package thermally
I'm sure Luke knows of other suitable MOSFETS :lol:.
 
liveforphysics said:
Awesome Ricky.
This is the best.
Put me down for a few controller boards no matter what they cost.
Ok Luke,

I will look at getting some more control boards and parts in January. I've spent too much on parts and PCBs already this month and payday is not till the 14th (monthly pay sucks) :lol:
I do have enough parts to build up a 3 more of boards to check the design and one spear PCB after that.
I better order some more Micros and ADCs soon as I'm not sure of the lead times (the two critical parts).

I will build up a second control board soon and make myself some notes of changes from the design and update BOM so I can consistently build up future boards. (Still only one board running, checking/tweaking the power electronics board chewed up a lot of time).


Warning:
Early adopters may have to contend with interesting bugs/features :lol: but I will try to keep the major bugs down.
 
Looks great Ricky, reminds me of this coders competition I read about in Wired about the IOI ( International Olympiad in Informatics) where these kids do battle at the algorithm olympics. It's very interesting to me that there are more than one way to skin a cat so to speak. What kind of dimensions are you looking at for the final product?

We are all behind you, if you need an advance to keep working let us know, I would be willing to help however possible.

Also, when you say it is a flexible controller, how hard would it be to make sensorless in case a hall sensor fails?
 
Really neat project, Ricky. Like others, I'd happily contribute towards the development costs in exchange for a bare board or two.

I'm using those IRFP4368 FETs in my simple controller (using the off-the-shelf MC33033 chip) as I reckon they are probably the best fit to the needs of big RC outrunner motors.

Jeremy
 
Just found this thread, (and read the parent thread). Awesome controller! (Downloaded datasheets and scanned them.) Wish I could afford one (or two) when you start selling boards/kits. Can't wait to see your test data.
Bob
 
I would LOVE to get one of these as well and get a power stage started. This could be the Arduino of motor controllers... Different power "shields" for different needs:)
Once you know how much you can sell them for I'll see if I can dig deep :mrgreen:
 
Hi All,
Thanks for the support.

I will order some more control boards soon. Just checking that I am 100% happy with the current ones as there is a couple of minor layout errors but nothing worth getting a new design done so far. I will build up assembly instructions / BOM for this board and get that sorted. I need to do this soon so I can have more than one control board when the power boards arrive (I'll try for building up another board this week). Because the board is flex-able it is not necessary to fit all the parts. For use with my power board the opamps are probably redundant as all input voltages and currents are within the required range. This would be a cost saving.
So much to do but I like to have deadlines/target dates. If I didn't have those I wouldn't get anything done :lol:. This forum is definitely keeping me motivated!

Once I have done all this It would only be the lead time of the PCB's being made before I could offer bare boards of the control board.
Until I get the whole system running at least some simple motor control code I won't be offering built up boards due to time.
The good news is that I plan for this to happen early January.

I definitely need to look at costing.
The interest helps as there is definite advantages in ordering more PCBs cost wise :D.

For those interested in bare boards or kits there is one thing I will mention. You would need good soldering skills as the micro and ADC have 0.5mm center-center on the pins! Its not too bad if you have done SMD work.
Hint (You solder 3 pins at a time with flux :lol:)
These small parts are NOT compatible with the soldering irons in the battery soldering threads :lol:.

Getting bare boards from me is going to be the quickest due to my available time but once I start building them it shouldn't be too bad although I may need to build up some form of test jig.

All parts are available from the usual; places. digikey, mouser, rs, farnall etc


Dimensions:
The control board is 58mm x 83mm.
The 12 x TO-247 Power board is 148mm x 91mm
my heat-sink is 150mmx100mmx40mm but you could use one with more but shorter fins. It depends on your requirements for duty cycle etc. The baseplate of the heat-sink should be reasonable thick to keep all devices at the same temperature including the NTC used to sense its temperature.
I know this isn't the smallest system out there. I can see it would be possible to build a 6-FET power board using TO-247 packages that would be no larger than the control board for relatively low power applications but I had to start somewhere and 12FET sounded like fun :lol:.
I can see someone like Luke needing separate gate drive boards for large FETS :lol:

I believe that the combination populated with parts will be approx 60mm thick ( The input capacitors are the tallest part although the control board sits 15mm above the power board). Then a heat-sink is bolted on the back.
I have a heat-sink that is 40mm thick including the fins (probably overkill for a e-bike but might be appropriate for a e-motorbike)
so the first controller I build will be 150mm x 100mm x 100mm approx.
There is a possibility that the overall height can be reduced based on component choices or mounting the main input caps sideways.

The power board design is suited to bolting to a flat surface and does not need mounting bar for the MOSFETS. They bolt directly to the heat-sink with in insulating pad.

EDIT:
I will try and get together a summary of the connections to the control board with a bit more detail than the connector pin-outs on my other thread so those who want to start building power stages can make a start while I finalise things at this end.
 
Hi Jeremy,
Jeremy Harris said:
Really neat project, Ricky. Like others, I'd happily contribute towards the development costs in exchange for a bare board or two.

I'm using those IRFP4368 FETs in my simple controller (using the off-the-shelf MC33033 chip) as I reckon they are probably the best fit to the needs of big RC outrunner motors.
Jeremy

Yes I think the IRFP4368 is the better one for the big RC motors too since I don't think its worth going much higher in voltage than 75V for the RC outrunners as their max RPM would increase losses too much. I think the IRFP4468 100V board I build will mainly be used to cook my GM hub :lol:, whereas I will use the 75V versions for the 80-100 180Kv motors.
I guess owners of the 130Kv version of the motor might benefit more from being able to go up to 100V

The 75V MOSFETS are nice with their low on resistance compared to the 100V ones.

How much current are you pulling through you controller?

It will be interesting when I start testing to see how much I can really pull out of my 12 FET board. Properly heatsinked I expect that it will easily handle 200A/phase. In fact I think I may have to bypass the CTs with a piece of wire (rescale them to higher current rating as per app note) to allow higher currents. If thats a problem I can also use external CTs.
It should be possible to let the controller really thrash the power devices for a short time beyond the continuous operating point for the sudden burst of acceleration etc. Its not too hard to estimate junction temperature based on use etc.

The 7KW RC motors don't need anywhere need 200A/phase for full power output. In fact it would probably cook them. They are want about 150A on the DC side around 90A/phase if I remember right so my controller should have plenty of headroom.
The pulse ratings of these MOSFETS are also very impressive so I guess It will all come down the the capacitors :lol:

Ricky
 
Hi all

I have uploaded a really rough draft of an implementers guide for a power stage that is compatible with my control board. Feel free to comment or ask questions so that I can add need data etc.
http://endless-sphere.com/forums/download/file.php?id=49760

This should at least be enough information for those of you who want to build power stages to make a start while I finalise everything and get more boards.

There is guaranteed to be omissions and errors :lol:

I will try and keep the latest version in the second post of this thread along with any other project documentation as its created so they are easy to find
 
Awesome let me know and I would love to get a couple as well.
 
pelle242 said:
Wouldn't it be a good idea to have a I2C on the connector? Could be used for temp sensors and many other things.
The reason I didn't bother with I2C to the power board is that it is not an robust bus.
It is designed to travel over short distances across a circuit board between integrated circuits like in TVs (low noise environment) and since there will be potentially very high electrical noise levels on or around the power board I don't believe a bus like I2C that requires pull up resistors to operate would be very robust.
In a noisy environment some I2C devices get their state machines messed up and stop responding correctly.

There is already a pair of analogue inputs that I have used for NTC temperature sensors that I deliberately kept low impedance to avoid noise issues on my power board. This solution is probably cheaper than any I2C temperature sensor and much more robust.

There is a separate connection on the control board that has SPI if it is required but again I want to minimise the chances of electrical noise getting into the micro. There is also a TTL serial port on the board for debug that could be re-purposed for other interesting uses.

I also provide a CAN interface that could be used for external sensors but they are more expensive.
CAN is designed to work in noisy environments and has a robust communication protocol and it is used in other power electronic devices. I will be using CAN to communicate with a dash board and possibly a BMS.

The connector pin out is fixed for this rev of the PCB since I have prototypes of the control board and prototype power boards on the way the connector pinout will not change.
I may add extra lines on the end of the connector in a backwards compatible way in the future but would only do so if there is a really good reason.


There is actually one other reason for no I2C.
No pins with that function were left available once all the important functions were allocated.
It is possible to bit-bang I2C if it is really desired.
It is a 120MHz micro after all and there are GPIO lines going to the power board.
Although I do Intend to use most of the processing power in the sensorless vector mode so I2C would become a low priority slow task.
It could also be bit-banged using the SPI pins.

Ricky
 
Hi Arlo1
Arlo1 said:
Awesome let me know and I would love to get a couple as well.
Will do.
When I have something ready I will announce it in this thread.
The first boards etc will go those who have shown interest in this thread like yourself.
If I remember right you have some large FETS like Luke so I can see some crazy high power motor drives being created soon :lol:.

I fear there will be power stages that will make my 12 x TO-247 power board look under powered :lol:

Ricky
 
Ricky_nz said:
Hi Arlo1
Arlo1 said:
Awesome let me know and I would love to get a couple as well.
Will do.
When I have something ready I will announce it in this thread.
The first boards etc will go those who have shown interest in this thread like yourself.
If I remember right you have some large FETS like Luke so I can see some crazy high power motor drives being created soon :lol:.

I fear there will be power stages that will make my 12 x TO-247 power board look under powered :lol:

Ricky
Not to worry my friend! The smoke is planned to come off the rear tire/tires
:wink:
 
Arlo1 said:
Not to worry my friend! The smoke is planned to come off the rear tire/tires
:wink:
Yes tire smoke is way nicer than semiconductor smoke :lol:

If the power stage hardware is good this control board will be thoroughly tested to ensure that it shouldn't be able to cause the power stage to die unless the user pushes the current parameters too far or sets the dead time too short etc :twisted:.

Yes there will be dangerous parameters.
Im still trying to figure out how to offer those parameters to people implementing their own power stages yet restrict the critical ones on units with built up power boards. Maybe just a flag that voids warranty if they are changed as I don't want to restrict creativity but then again I don't want to end up paying for someone's experiment :lol:.

Protection is one of the first things I will be testing in the software and hardware combination.
Excess current on the phases will cause cycle by cycle (PWM cycle) current limiting triggered by hardware but if it continues the controller will trip. The controller should normally stay away from the hardware current limit anyway if it is operating correctly the software limit will keep things under control.

Ricky
 
Back
Top