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

Thanks I tried as much as 10amps but usually the chip dies at 10amps. < Its not really good for that much current.
I tried 6khz and all the way up to 20khz. It shows higher R then it should but that's my experience with this software and IGBTs
 
Arlo1 said:
Hi all,

Its been a while since I have been here. I am working on a little motor controller to run a HV HVAC compressor using this brain from lebowski.
I have an issue when I try to measure inductance I get a ERROR. "Overflow during impedance measurement"

I am trying to remember A what causes this and B how I can set resistance and inductance manually?

Thanks.

-Arlin

Hi Arlo

I have successfully tested Prius gen2 AC compressor with Volt/Ampera inverter. First i used main IGBTs and had them set too low. I just couldnt get the darn L/R sensing to work. I think those 700A sensors were too coarse for the fine motor wires. BTW i measured them with caliper and i think they are about 1mm2 in thickness.

Second test was with the 3rd power section inside Volt/inverter. That worked beautifully. And i caould measure L/R and quickly run compressor. Finally to get it to work reasonably i used a throttle with RC circuit connected to 12V AC clutch command. Whenever AC would go on motor would start spooling to preset RPM. Of course i set this up with broad acceleration limiter of 1 - 7! I have some results on youtube and some settings posted. I will dig them up if you need them.
Also your current sensors need to be on some 50A scale. Not much more since it is a 300Vdc+ system
I also managed to run a Leaf AC compressor by bypassing the inbuilt inverter.

On the reason for the L/R sensing error, did you make sure your current sensor mV/A ratio is correct?
If you see from my video compressor DC current doesnt go higher than 5A!
EDIT: Yes first you need to autodetect L/R ratio and then i usually keep the L value and multiply the R by 3. This brings it quite close to optimal values... Also dead time influences that measurement a lot. Maybr you need to extent deadtime?


https://endless-sphere.com/forums/viewtopic.php?f=30&t=99812&start=75#p1550991
https://www.diyelectriccar.com/threads/chevy-volt-opel-ampera-inverter.179922/post-1055793
https://leafdriveblog.wordpress.com/tag/ac-compressor/
https://www.youtube.com/watch?v=r0wZcXttehc&t=34s
https://www.youtube.com/watch?v=xo-NJ9fLtgk
 
I find the resistance measures high and I always need to enter in a lower number manually.

I tried playing with dead time. But I set it about where it needs to be according to datasheets.

How did you get the OEM compressors working with the OEM inverters?
Do you meen the little attached inveters? Or the BIG inverter that is for driving the car?
 
Arlo1 said:
I find the resistance measures high and I always need to enter in a lower number manually.

I tried playing with dead time. But I set it about where it needs to be according to datasheets.

How did you get the OEM compressors working with the OEM inverters?
Do you meen the little attached inveters? Or the BIG inverter that is for driving the car?

Prius compressor doesnt have inverter in its case. Rather it is located remotely inside main inverter. I didnt use it because i simply use small controler inside Volt inverter case. Also i tried to run Nissan Leaf compressor and i had to bypass its inverter to get to RST pins. Then i got a good start with Volt Aux controler.

First i tried to run compressor with small chineese brushless controler at 48Vdc. To my surprise it worked instantly. So i knew motor was good.
Then like i said i first tried with big 600A controler drive but current sensors were too coarse. I couldnt get L/R value out of it no matter how low i dropped the amp settings.
Then i used the small Aux controler under the main cap. I tested it for current sensor mV/A and then i got reliable L/R values.
I used small amp values and slow throttle advance.
https://www.diyelectriccar.com/threads/chevy-volt-opel-ampera-inverter.179922/page-5#post-1017183

EDIT:
Prius AC compressor:
Motor Inductance: 2550uH
Motor phase resistance: 600mOhm
Voltage used 360Vdc
Current set at 25Arms and max battery current 10A, no regen, no reverse.
I made simple voltage divider in front of throttle line. 10K/3K3 and i added 470uF cap across 3K3 resistor. When i apply 13V to this line it makes 3V6 on divider, but cap charges it in about a second. This signal coupled with acceleration limiter causes AC compressor to spool up and reach its working RPM slowly.
Acceleration limiter: 1 trough 5
Wiggle settings:
f) wiggle range: 90 deg
g) wiggle rate: 180 Hz
https://openinverter.org/forum/viewtopic.php?f=9&t=1035&p=17037&hilit=leaf+ac+compressor#p17037
 
Arlo1 said:
This chip is ~ 10a AC max. Its for a HV HVAC with I would love to have 4kw max but the chips I found are ~ 1-2kw max. So 4-6amps ac is likely where I would run it.

That should not be a problem for you to find those...
https://eu.mouser.com/ProductDetail/ROHM-Semiconductor/BM64377S-VA?qs=DRkmTr78QARtdu9VHXeFtg%3D%3D
https://eu.mouser.com/ProductDetail/ROHM-Semiconductor/BM64375S-VA?qs=DRkmTr78QAQ1NmFHsg9iaw%3D%3D
 
arber333 said:
Arlo1 said:
This chip is ~ 10a AC max. Its for a HV HVAC with I would love to have 4kw max but the chips I found are ~ 1-2kw max. So 4-6amps ac is likely where I would run it.

That should not be a problem for you to find those...
https://eu.mouser.com/ProductDetail/ROHM-Semiconductor/BM64377S-VA?qs=DRkmTr78QARtdu9VHXeFtg%3D%3D
https://eu.mouser.com/ProductDetail/ROHM-Semiconductor/BM64375S-VA?qs=DRkmTr78QAQ1NmFHsg9iaw%3D%3D

Oh hey thanks. I like the 30a rated version. My problem has been they rate most of these (600v)versions for no more than 400-450Vdc input But yet I am running 470Vdc hot off the charger. I might be able to do something so the current is limited at 470 until the pack is down a bit which is not long depending on what the car will be used for that day.
 

Attachments

  • 30a600Vdc.JPG
    30a600Vdc.JPG
    58.1 KB · Views: 1,549
arber333 said:
Arlo1 said:
I find the resistance measures high and I always need to enter in a lower number manually.

I tried playing with dead time. But I set it about where it needs to be according to datasheets.

How did you get the OEM compressors working with the OEM inverters?
Do you meen the little attached inveters? Or the BIG inverter that is for driving the car?

Prius compressor doesnt have inverter in its case. Rather it is located remotely inside main inverter. I didnt use it because i simply use small controler inside Volt inverter case. Also i tried to run Nissan Leaf compressor and i had to bypass its inverter to get to RST pins. Then i got a good start with Volt Aux controler.

First i tried to run compressor with small chineese brushless controler at 48Vdc. To my surprise it worked instantly. So i knew motor was good.
Then like i said i first tried with big 600A controler drive but current sensors were too coarse. I couldnt get L/R value out of it no matter how low i dropped the amp settings.
Then i used the small Aux controler under the main cap. I tested it for current sensor mV/A and then i got reliable L/R values.
I used small amp values and slow throttle advance.
https://www.diyelectriccar.com/threads/chevy-volt-opel-ampera-inverter.179922/page-5#post-1017183

EDIT:
Prius AC compressor:
Motor Inductance: 2550uH
Motor phase resistance: 600mOhm
Voltage used 360Vdc
Current set at 25Arms and max battery current 10A, no regen, no reverse.
I made simple voltage divider in front of throttle line. 10K/3K3 and i added 470uF cap across 3K3 resistor. When i apply 13V to this line it makes 3V6 on divider, but cap charges it in about a second. This signal coupled with acceleration limiter causes AC compressor to spool up and reach its working RPM slowly.
Acceleration limiter: 1 trough 5
Wiggle settings:
f) wiggle range: 90 deg
g) wiggle rate: 180 Hz
https://openinverter.org/forum/viewtopic.php?f=9&t=1035&p=17037&hilit=leaf+ac+compressor#p17037

So I went though the same process. I opened mine up and found it was 6mags (3pairs) Set that up in a cheep VESC controller and got it running in minutes!!
Then I tried my lebowski brain powered board with a low current 1200V rated IPM chip and it would only sample inductance at 1amp but I was at 47Vdc just trying to get it running at a safe voltage first.
I would never run sensorless and never run the motor. I am about to re-design the controller for a different IPM and add some other needed circuits.
Are you saying you are having good luck with sensorless starts?
 
Huh! As long as i use power section from OEM parts it is not luck. More like reverse engineering.
Since you build your own power section you will probably have to tune out the current sensor feedback loop.
For example, at the beginning i had terrible problems starting reliably even with OEM PS. Then i went back to OEM brain board and looked at current sensor wiring. I noticed they used 4K7 pulldown resistors just behind the connector. I guessed they use that to lightly filter out the grass on the input. As soon as i added that resistor on each current sense line everything went smooth.
Try different values if it works for you. It is probably different for each sensor...
 
Can a moderator step in and help fix the OP on this thread. When ever you click the links lebowski posted they don't work. I have a feeling stuff got lost when some work was done on the forum.
 
kiwifiat said:
To change the inductance you press capital "L", or resistance capital "R"

I think you would need more than 1 amp to get an accurate measurement, maybe try lowering the test frequency and keeping current at 10A.

I just tried this and It doesn't seem to work
 
Arlo1 said:
I just tried this and It doesn't seem to work

That is weird! It works or me and has done so 100's of times, start at 6:32 [youtube]e1yjwl3GE3c[/youtube]
The motor I am setting up in this video is just a larger 3 pole pair HSG IMP similar to your aircon IPM in most ways.
It won't work until you have a successful test however, maybe a 1 amp test doesn't satisfy the requirements. I would definitely try testing at 5A and lower the test frequency until you have a successful test. What is the current sensor sensitivity?
 
kiwifiat said:
Arlo1 said:
I just tried this and It doesn't seem to work

That is weird! It works or me and has done so 100's of times, start at 6:32 [youtube]e1yjwl3GE3c[/youtube]
The motor I am setting up in this video is just a larger 3 pole pair HSG IMP similar to your aircon IPM in most ways.
It won't work until you have a successful test however, maybe a 1 amp test doesn't satisfy the requirements. I would definitely try testing at 5A and lower the test frequency until you have a successful test. What is the current sensor sensitivity?

You know what I am running older version of Lebowskis code. I will upgrade it.
But at this point one time I was able to calibrate the L and R with 3 amps. When I try more current for the FOC measurement it won't take it and I get the error. My new chips are 30a rated I have max amps set to 15 at the moment and the current sensors are 40mv/a 50amp sensors. I will look for lower current sensors but these should work. I only need in the 2-4kw range with 470Vdc max input so I will see what I can do. So far my tests have been at 60vdc input I will try more if I need. But I should be able to get it with 60vdc input.
 
Also I need to look at why but one of the current sensors keeps calibrating with a big offset. Like 80mv... And when I try that it gets stuck pulsing in drive 0.

So I zero my current sensors then it lets it go into drive 2

Do you use the current sensor calibration? In my experience it doesn't help.
 
Arlo1 said:
Also I need to look at why but one of the current sensors keeps calibrating with a big offset. Like 80mv... And when I try that it gets stuck pulsing in drive 0.

So I zero my current sensors then it lets it go into drive 2

Do you use the current sensor calibration? In my experience it doesn't help.

The Honda IMA has ~350A current sensors and I find they have quite large and irregular offsets so I now set sub menu m) in menu b) which is current sensor offset filtering to say 10A. I zero the current sensor calibration in menu f) then run the motor for a while and let the controller collect some stats on the sensor offsets while the motor is actually running. Once that is done I set sub menu m) in b) back to zero and run with that. You can enter menu f) and see what the controller has set the offsets to. iirc you mentioned in one of your threads that you found you got smoother starts with your CRX if calibrated the current sensors but I do know that Lebowski is dubious about it.

Given that the current sensor measurements are a critical component of the sensorless algorithm I think it is highly recommended to use a sensor that
has a dynamic range that falls within the normal operation of the controller. So maybe 30A sensors would be an idea. Also remember that the control loop coefficients in menu g) basically all need to be left at autocomplete values to run in sensorless mode on these high voltage IPM motors. At least that has been my recent experience with the Leaf and Hyundai HSG IPM motors. Small RC motors are a different story.

What is the part number of the current sensors? Do they need a pull down resistor on them? Many do and if so the Lebowski controller basically will not run without them because of the noise on the current sensors without the pull downs in place.
 
kiwifiat said:
Arlo1 said:
Also I need to look at why but one of the current sensors keeps calibrating with a big offset. Like 80mv... And when I try that it gets stuck pulsing in drive 0.

So I zero my current sensors then it lets it go into drive 2

Do you use the current sensor calibration? In my experience it doesn't help.

The Honda IMA has ~350A current sensors and I find they have quite large and irregular offsets so I now set sub menu m) in menu b) which is current sensor offset filtering to say 10A. I zero the current sensor calibration in menu f) then run the motor for a while and let the controller collect some stats on the sensor offsets while the motor is actually running. Once that is done I set sub menu m) in b) back to zero and run with that. You can enter menu f) and see what the controller has set the offsets to. iirc you mentioned in one of your threads that you found you got smoother starts with your CRX if calibrated the current sensors but I do know that Lebowski is dubious about it. I found at the end of that cars life It was better to just zero the current sensors... It was more consistent for better starts.

Given that the current sensor measurements are a critical component of the sensorless algorithm I think it is highly recommended to use a sensor that
has a dynamic range that falls within the normal operation of the controller. So maybe 30A sensors would be an idea. Also remember that the control loop coefficients in menu g) basically all need to be left at autocomplete values to run in sensorless mode on these high voltage IPM motors. At least that has been my recent experience with the Leaf and Hyundai HSG IPM motors. Small RC motors are a different story.

What is the part number of the current sensors? Do they need a pull down resistor on them? Many do and if so the Lebowski controller basically will not run without them because of the noise on the current sensors without the pull downs in place.
My current sensors are the lowest current rating of this size. But I am going to investigate them more after work. I added extra cap to them 10nf on the signal to GND and 4.7uF from 5v-GND. I never thought about a pull down or a pull up....
ACS759LCB-050B-PFF-T
 
Those sensors do not need a pull down , Chevy Volt/Opel Ampera and Honda IMA both do and have ~5k pull down on the oem inverter boards.
 
kiwifiat said:
Those sensors do not need a pull down , Chevy Volt/Opel Ampera and Honda IMA both do and have ~5k pull down on the oem inverter boards.

Hm... i am not so sure. See Allegro datasheet page 6 COMMON OPERATING CHARACTERISTICS
https://www.allegromicro.com/~/media/Files/Datasheets/ACS759-Datasheet.ashx
Output Load Resistance RLOAD(MIN) VIOUT to GND 4.7 – – kΩ

Maybe it also needs pulldown. I remember TomDB having similar problems with Ampera/Volt inverter when trying to run Remy motor. I think its even on video somewhere...

EDIT: This afternoon I will measure pulldown on Ampera Aux inverter which i think has the same Allegro sensors.
 
arber333 said:
Hm... i am not so sure. See Allegro datasheet page 6 COMMON OPERATING CHARACTERISTICS
https://www.allegromicro.com/~/media/Files/Datasheets/ACS759-Datasheet.ashx
Output Load Resistance RLOAD(MIN) VIOUT to GND 4.7 – – kΩ

Maybe it also needs pulldown. I remember TomDB having similar problems with Ampera/Volt inverter when trying to run Remy motor. I think its even on video somewhere...

EDIT: This afternoon I will measure pulldown on Ampera Aux inverter which i think has the same Allegro sensors.

I am 100% sure that both the original Lebowski 40 pin design and the later BobC/Lebowski power board design work perfectly without pull downs on the current sensor outputs, but they do have 1k/10n low pass filters. Interesting that Alegro only show a low pass on the typical application schematic in the data sheet.

However, good catch! In the circumstances it is probably a good idea. And yes, as noted the IMA and Volt/Ampera OEM inverters do use pull downs on the current sensors.
 
Yeah I am pretty sure I have a bad sensor. Phase C keeps calibrating at -110mv and the others ~ +- 10mv. So I have some on order to try again. Also some off the board sensors to try if needed.
 
My PC crashed while flashing the firmware. Now I can't access the controller anymore. Lebowski told me that the firmware code was released. And I remember I saw this somewhere.
I bought a PICKIT3 for programming the MCU. Is there any documentation where to find the files and how to flash it?
Thanks!

EDIT: Should have search a little more https://www.endless-sphere.com/forums/viewtopic.php?f=30&t=104895
We'll see how far I come
 
I ressurect this thread to notify anyone interested that i changed setting n) in menu g) from 48 to 16 and it seems i got somewhat better/surer start from 0.
 
I finally had an opportunity to test the amplitude setting menu g) sub h and i.
I had it set as high as 400 / 20 and as low as 10 / 0.5 and i found that last setting is really good for a smooth takeoff and transition to mode 3.
HOWEVER!!! With low amplitude setting at speeds beyond field weakening i.e. 120km/h suddenly it started to shake. I tried to push over and my inverter conked out! I managed a good restart and then tried to repeat this several times. Every time conkout happened!
On higher setting the transition was not really comfortable with shaking on transition.

I guess i will have to rebalance this setting to one that does not conk out.
 
I ressurect this thread to notify anyone interested that i changed setting n) in menu g) from 48 to 16 and it seems i got somewhat better/surer start from 0.
One of the best things you can do when running a Chevy Volt/Opel Ampera inverter with a Lebowski brain is to set the PWM frequency to 7kHz. In the oem application the Volt inverter runs at 10kHz so we know the gate drivers are up to the task. Choosing 7kHz pwm with the Lebowski brain results in a 28kHz control loop frequency versus 24kHz with a 6kHz pwm frequency and that in my experience helps with overall stability.
 
Hi experts,
Roger has been incredibly kind and generous with his time helping me with his board and the IMA setup and I've poured in some time to create a build guide and use the Lebowski + IMA in my motorbike (both links in signature).
I'm learning tons and have been re-reading this thread as I'm in the process of tuning it for the Enertrac.
So first of all many thanks to all, especially Bas and Roger! Secondly, can you have a look at the build thread and let me know if anything needs to be fixed.
 
One of the best things you can do when running a Chevy Volt/Opel Ampera inverter with a Lebowski brain is to set the PWM frequency to 7kHz. In the oem application the Volt inverter runs at 10kHz so we know the gate drivers are up to the task. Choosing 7kHz pwm with the Lebowski brain results in a 28kHz control loop frequency versus 24kHz with a 6kHz pwm frequency and that in my experience helps with overall stability.

I can attest 7kHz setup works really good on at least 2 cars with EM61 Leaf motor and Chevy Volt inverter. Driveoff now is really good and low speed control is smooth.
 
Back
Top