Lebowski's motor controller IC, schematic & setup, new v2.A1

Lebowski said:
have you thought about adding one or more temp sensors ? The chip has an input for the DS18S20 digital temp sensors (a few years back when you were working on the Yamaha you bought a cheap chinese digital temp sensor, this uses the same DS18S20 sensor). It supports 8 temp sensors in parallel, you can have one sensor per IGBT...


Have them added lol but just saw they only go up to 125 degC

I need an option for up to 300 deg C for a motor.

Is this possible.... Maybe with a thermocouple
 
its fairly normal to put an RTD in your motor assembly, one per phase. i think there was some discussion about this in Ivan's forumn. keep this in mind though, that RTD or other method of temp sensing is going to ask for power in one form or another and that power is going to come from your PCB> so this is power that is leaving the nice safe area of PCB and entering no-man's land (anything external) and then coming back with who knows whatever electrical noise is picked up. there is higher than normal chance that your system will suffer due to this so plan for it accordingly. in my experience with temp sense with motor drives of your power level and higher, it is not enough to twist the wires..
 
Fun with fieldweakening :mrgreen:

accellerating a MAC to 55kerpm forward, from around 30kerpm reverse:

[youtube]C-fbivN7BHk[/youtube]

I first apply throttle, then change direction to forward, then save settings by flicking setup switch.

some info:

hall sensored mode
57 V
50 A phase (peak), 30A fieldweakening (peak)
50 A battery current

erpm limits set (this is what limits the speed, and makes forward and reverse speed different):
Code:
a) erpm limiter (forward) rampdown start, range: 52.97, 2.99 k-erpm
b) erpm limiter (reverse) rampdown start, range: 31.99, 3.98 k-erpm

the info at the flick of the last switch:
Code:
 Chip status at button press:

status bits:               
drive LEDS:                ...3
time spent:                3.257 sec
throttle:                  99 %
wanted_i_torque:           40.8 A
wanted_i_fieldweak:        29.0 A
filter_i_torque:           6.7 A
filter_i_fieldweak:        28.3 A
filter_i_error:            0.3 A
Vout_real:                 94 %
Vout_imag:                 27 %
Vout_scaling:              0
speed_sensorless:          55.44 k-erpm
filter_speed:              0.00 k-erpm
accelleration:             1 %

The MAC is spinning with 98V of backemf here !!! (55 kerpm but nominal speed at 57V is 32 kerpm)
 
Awesome. I wasn't sure if you had gotten into field weakening on this yet...

Is this compatible with quadrature encoders? Or just hall sensors?
 
heathyoung said:
Awesome. I wasn't sure if you had gotten into field weakening on this yet...

Is this compatible with quadrature encoders? Or just hall sensors?

At the moment just hall sensors (or sensorless start).. but if I would add it,
which one would you recommend to build for ? Is there some sort of standard for
these encoders ?
 
With a quadrature encoder, the resolution attainable is dependent on the number of bits of the encoder, however a sine-cosine encoder has a potentionally much higher precision. Not sure if this would be an advantage for an e-bike motor, but I know that Kelly Controllers have models with input for sine-cosine encoders.
 
I googled quadrature encoder and found that it is 2 digital signals 90 degree shifted... if this is the case you can connect it to two of the 3 hall inputs (ground the 3rd one) and it should work (after calibration of course).

I thought it was the same as a sine-cosine, which I imagine is 2 analog signals (which are either analog or already digitised by the encoder and available over something like SPI) ?
 
Something that I think is not very clear in the manual (have to write a new one anyway :( boring)

Field weakening is done automatically and you do not have to take it into account when specifying your max phase current. Lets say you have 100 A sensors and you want max phase current and also some field weakening (lets say 30A).

Then, in the menu structure you can enter 100A for the max phase current and 30A for the field weakening current. You DO NOT have to subtract the 30 from the 100 and only enter 70A max phase current.

First of all, torque current and field weakening current are at right angles to each other, meaning you will have to add them like pythagoras. With 100A total phase current and 30A field weakening current you can still have 95.4A torque current. 30A and 95.4A add up to 100A via pythagoras. Dissipation in the motor wiring with 95.4A torque and 30A fieldweak is based on the total current of 100A, not 125.4A !

Also, the controller does this pythagoras stuff automatically. If you're at low erpm with no field weakening full throttle will get you 100A torque current. As erpm increases field weakening is added unto the 30A from the setup menus. As this is happening the controller does the pythagoras and will, as field weakening current goes from 0 to 30A, automatically reduce torque current (at full throttle) from 100A to 95.4A .
 
thanks for pointing that out lebowski.
this raises a new question: normally i would run the motor near no load speed by choosing a gear that makes the motor run as fast as possible, as the current then starts to go down - as long as the motor is handle the speed. this acts like a kind of speed limiter.
would this still work with field weakening? or will it use MORE current as it's able to give reasonable torque even at higher (close to no load) rpm?
 
izeman said:
thanks for pointing that out lebowski.
this raises a new question: normally i would run the motor near no load speed by choosing a gear that makes the motor run as fast as possible, as the current then starts to go down - as long as the motor is handle the speed. this acts like a kind of speed limiter.
would this still work with field weakening? or will it use MORE current as it's able to give reasonable torque even at higher (close to no load) rpm?

first off, when you use field weakening you should use the erpm limiter to set the max erpm that you want as field weakening can allow crazy high motor speeds.

Lets say no-load speed without field weakening is 32 k-erpm

There are two cases to consider here:

- you set the erpm limiter to LESS than 32k-erpm. In this case field weakening will allow the controller to push more torque current so your motor will feel stronger at the high end of the erpm range. As it is hitting the erpm limiter torque current will be reduced, which in turn makes the controller reduce field weakening current. You will end up in a situation with a low torque current (due to the erpm limiter) and no field weakening current (as the controller can deliver the low torque current without needing field weakening current).

- you set the erpm limiter to MORE than 32 k-erpm. Again hitting the erpm limiter will reduce torque current, which in turn reduces field weakening current. BUT the controller will NOT reduce field weakening current to 0 A as it is necessary to maintain the higher (than 32k-erpm) speed.
 
Lebowski said:
Something that I think is not very clear in the manual (have to write a new one anyway :( boring)

Field weakening is done automatically and you do not have to take it into account when specifying your max phase current. Lets say you have 100 A sensors and you want max phase current and also some field weakening (lets say 30A).

Then, in the menu structure you can enter 100A for the max phase current and 30A for the field weakening current. You DO NOT have to subtract the 30 from the 100 and only enter 70A max phase current.

First of all, torque current and field weakening current are at right angles to each other, meaning you will have to add them like pythagoras. With 100A total phase current and 30A field weakening current you can still have 95.4A torque current. 30A and 95.4A add up to 100A via pythagoras. Dissipation in the motor wiring with 95.4A torque and 30A fieldweak is based on the total current of 100A, not 125.4A !

Also, the controller does this pythagoras stuff automatically. If you're at low erpm with no field weakening full throttle will get you 100A torque current. As erpm increases field weakening is added unto the 30A from the setup menus. As this is happening the controller does the pythagoras and will, as field weakening current goes from 0 to 30A, automatically reduce torque current (at full throttle) from 100A to 95.4A .


Lebowski are you saying feild weakening current is measured and added on the phase current side? I thought the Feild weakening amperage number was added to the battery current side......
 
izeman said:
nope. not on the battery side. the field weakening is added to the phase current and the phase current limit you set will not be exceeded.
Yeah I see that now. Which is cool.

I can't wait to crank it up. I need to find a 700amp HV fuse..... :)
 
izeman said:
nope. not on the battery side. the field weakening is added to the phase current and the phase current limit you set will not be exceeded.

same goes for battery current, allowing field weakening current will not lead to the controller exceeding the battery current limit.
 
Lebowski said:
izeman said:
nope. not on the battery side. the field weakening is added to the phase current and the phase current limit you set will not be exceeded.

same goes for battery current, allowing field weakening current will not lead to the controller exceeding the battery current limit.
But in order to run a lot of field weakening you will need to increase the battery current limit. The battery current can exceed the RMS phase current (peak phase as you set in your contoeller x .707) if you run a decent amount of field weakening
 
Arlo1 said:
Lebowski said:
izeman said:
nope. not on the battery side. the field weakening is added to the phase current and the phase current limit you set will not be exceeded.

same goes for battery current, allowing field weakening current will not lead to the controller exceeding the battery current limit.
But in order to run a lot of field weakening you will need to increase the battery current limit. The battery current can exceed the RMS phase current (peak phase as you set in your contoeller x .707) if you run a decent amount of field weakening

The way the controller IC deals with battery current, based on the controller output voltage (which it knows as it generates this itself) and current (from the current sensors) it calculates the power going into the motor. This is the complete power going into the motor, so part will be turned into mechanical power, part into heating. Battery current is power divided by battery voltage. It actually uses the reverse equation, for the conditions it sees it calculates the allowed torque current (and limits throttle current accordingly).

The thing with field weakening current is that part of it will be turned into (mechanical) power. Looking for instance at the MAC at 55 k-erpm from a few posts ago. The 'torque' producing current takes 310 W from the battery. The field weakening current takes 376 W (again, from the battery). Based on these two and 57V battery, battery current is 12A (apparently, didn't measure it).

Mechanical power, based on the erpm (55k) and the erpm at 57V (32k-erpm) backemf voltage (sine peak-peak) is 113V. With the torque current (6.7A) this translates to 566 W going into the backemf (so 566 W will become mechanical power which for the unloaded motor will go towards friction losses and eddy current losses) .

With 686 W going in and 566 W going out, 120 W is dissipated in the motor resistance. With the currents flowing motor resistance can be calculated to be 95 milli-ohm (the controller measures 78 milli-ohm for a cold motor). So it all kind of adds up in a realistic way.
 
Long absence from working on anything EV related on a hobby level. After moving and changing jobs I finally have some time.

My own pcb works now to control the Honda IMA inverter and spins the motor, I just need to get the start up dialed in. Does the battery voltage have a great influence on the start up tune? Since im testing with +/- 54 volts and going to atleast 200 volts for the final application.

Tommorow im making some cutouts on the inside of the OEM cover to see If i can squeeze my pcb in there so you would never know its been hacked :D Plus some long overdue wiring tidying up.

https://www.youtube.com/watch?v=deUlqjwdXz8
 

Attachments

  • 20161014_204217e.jpg
    20161014_204217e.jpg
    110.9 KB · Views: 3,097
Tested the controller at 110 volts today, quite an improvement this motor got quite some back emf (understandable since its rated at probally 400-500 volts minimum).
However found a quirk with using the Honda IMA inverter as a powerstage, it shuts it shelf down with any rpm limit set above 8k erpm. This might be the main controller think hey why you turning so fast?

So in order to see if this is the issue I have cut the traces to the oem controller. Have yet to test again at 110 volts. Since I had the IMA inverter apart I decided to test my hunch of being able to fit everything in the oem enclosure.
So I dremeled away some plastic ribs on the inside of the housing and shortend my leads. And she fits like a glove, added a layers of isolation tape between the original pcb and the top of my own lebowski one. Only thing that gives it away now is my hackjob of a wiring mess. However this is nothing a few nice ampseal connectors cannot fix.

Here is my current settings, would anyone like to take alook and see if there is anything off? I have ran both the current sensor calibration and the inductance calibration.

Is there a general rule of thumb to trying to get the "start up" of the motor tuned?

Code:
0x58FD	0x03C2	0x022B	0x587D	0x01B4	0x00A3	0x02BE	0x0051
0x0036	0x0026	0x7FBC	0x0116	0x0000	0x0046	0x8000	0x015C
0x00AE	0x0294	0x03F7	0x03F7	0x03F6	0xAAAA	0xAAAA	0xAAAA
0x0BB7	0x04AF	0x008F	0x05DB	0x0006	0xE67E	0x06E0	0x2000
0x0000	0x0000	0xF000	0x0000	0x0000	0x00BC	0x02A4	0x0000
0x03FF	0x0570	0x0063	0x0570	0x022D	0x03E8	0x0258	0x0064
0x0890	0x0190	0x000E	0x0298	0x0000	0x999A	0x0030	0x0000
0x01E0	0xFFFF	0x6666	0xFFD0	0x0000	0xFE20	0x0000	0x07AE
0x0030	0x0000	0x01E0	0xFFFF	0xF852	0xFFD0	0x0000	0xFE20
0x0003	0x0000	0x0078	0x0000	0x0000	0xFFFD	0x0000	0xFF88
0x0000	0x0000	0x0000	0x0000	0x0003	0x0000	0x00C8	0x0000
0x0000	0xFFFD	0x0000	0xFF38	0x0000	0x0000	0x000C	0x0000
0x00F0	0x0000	0x0000	0xFFF4	0x0000	0xFF10	0x05AB	0x2635
0x0195	0x028E	0x0116	0x006D	0x01D4	0x7530	0x028E	0x0010
0x03BA	0x0042	0x0010	0x038E	0x0000	0x03E8	0x00C8	0x2716
0x03B6	0x6000	0x018E	0x028F	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0x4000	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF
0xFFFF	0xFFFF	0xFFFF	0xFFFF	0xFFFF	0x0000	0x0000	0x0000
0x0032	0xFFFF	0xC519	0x764B	0x5482	0x41B3	0x35C3	0x2D7A
0x276B	0x22C9	0x1F1E	0x1C28	0x19B5	0x17A6	0x15E6	0x1463
0x1312	0x11EB	0x10E4	0x0FFB	0x0F28	0x0E6B	0x0DC0	0x0D23
0x0C94	0x0C10	0x0B97	0x0B27	0x0ABF	0x0A5F	0x0A05	0x09B1
0x0962	*
 
Wanted to call it good enough for tonight, however not having tested the 110V after cutting the traces and placing the controller inside the inverter I knew this was going to keep nagging me until tomorrow. So I hooked up the second battery again set it to 10k erpm and give it a test. Motor is hesitant to start at first but once spinning and into mode 3 it takes off right to the emf limit. This was concluded because raising the erpm from 10k to 20k caused no rise in speed.

So tomorrow its time to make some busbars So I can arrange my battery pack closer together, this way I can safely test 165v and 250v.

https://www.youtube.com/watch?v=zTDh4V0WTe4
 
I'm back looking at the Mitsubishi/PowerEX IPM's again. I've got a 300A unit that I would like to play with again.

There appears to be a very good interface board that fits the PM300CLA060 (BP7B-LS) and PM450/600CLA060 (PB6A-LS) that provides optoisolation and isolated DC DC converters - all you need to provide it is UVW H/L drive - this would be ideal for interfacing the Lebowski board to some very high powered hardware - 200KW+!

The outputs of the Lebowski board need to be able to sink 15mA - I would assume they can do that, and is there an error handling input (ie. when a fault happens - can the drive be interrupted?)

If you had the option of hall outputs vs. quadrature encoding - what would you be better off with?
 
heathyoung said:
I'm back looking at the Mitsubishi/PowerEX IPM's again. I've got a 300A unit that I would like to play with again.

There appears to be a very good interface board that fits the PM300CLA060 (BP7B-LS) and PM450/600CLA060 (PB6A-LS) that provides optoisolation and isolated DC DC converters - all you need to provide it is UVW H/L drive - this would be ideal for interfacing the Lebowski board to some very high powered hardware - 200KW+!


You will never see 200+kw from a 300amp MAX and 600v MAX rated IGBT.

Very most you can expect is ~ 75kw as a PEAK for 10-30 seconds.

:EDIT I see you mentioned the PM600CLA060 with that you might peak 150kw for about 10-30 seconds.

When they say 600v it doesnt mean you can have a fully charged battery at 600v... It means it might be ok with 98s or 360v nominal which is ~405v fully charged. You need a head room in the voltage rating for switching and with high current and a big modual like that you will see voltage increase well past the battery voltage when the igbt turns off as the diode starts to conduct on the other side of the phase.

As for the current its more or less the same you can not exceed repeated pulses of 600 amps during switching. The RMS will be .707x the peaks so in a perfect world you might get a RMS current of 424 amps. And that's phase current then you will need some feild weakening to get DC current up to the same as the RMS phase current.

One more thing to note this will take some incredible batteries a properly sized battery will not sag past the nominal voltage but its very common for most EV batteries to sag a lot and you can expect them to sag to around the nominal voltage maybe even lower voltage at the cap in the inverter with sag and inductance in the wires.
 
Back
Top