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

Electric Motors and Controllers
User avatar
Arlo1   100 GW

100 GW
Posts: 8356
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

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

Post by Arlo1 » Apr 04 2019 9:52pm

I made a circuit to isolate the 0-5v from the voltage divider from the battery voltage to the 0-5v signal to the brain.
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

arber333   10 W

10 W
Posts: 87
Joined: Mar 29 2013 4:13pm

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

Post by arber333 » Apr 05 2019 12:58am

Arlo1 wrote:
Apr 04 2019 9:33pm
Yes You need battery voltage input to brain just not phase voltage
Can you elaborate what do you use that for? And how?
You use isolated opamp to sense voltage for precharge only or do you actually use it to sense analog 2.5V to 5V for controler information?

tnx

A

User avatar
Arlo1   100 GW

100 GW
Posts: 8356
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

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

Post by Arlo1 » Apr 05 2019 3:04pm

arber333 wrote:
Apr 05 2019 12:58am
Arlo1 wrote:
Apr 04 2019 9:33pm
Yes You need battery voltage input to brain just not phase voltage
Can you elaborate what do you use that for? And how?
You use isolated opamp to sense voltage for precharge only or do you actually use it to sense analog 2.5V to 5V for controler information?

tnx

A
Both.
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

arber333   10 W

10 W
Posts: 87
Joined: Mar 29 2013 4:13pm

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

Post by arber333 » Apr 07 2019 2:16pm

Hall sensors are working now. I learned to calibrate them and set their offset.
While they work and inverter has good behaviour specially in assisted sensorless mode i still have some issues.

1. When i calibrate hall sensors and setup offset i try to run in hall mode from reset. That goes well from start. However after i release throttle controler goes to 3rd LED (mode 2) and keeps some rpm turning. If i apply throttle from there it is easy to rev the motor. But how would that look in a 1t car?

2. This issue is in sensorless. Upon start 3rd LED (mode 2) is lit and inverter keeps pumping small ammounts of current which rock rotor back and forth. The same happens if i rev the motor and then come to a stop.

3. To start in sensorless it tooks like 3x banging back and forth before turning in the correct direction. Is that normal? Banging is not that powerfull, but is disconcerting...

My sensor data looks like this
code: 0, angle: 327 deg, confidence: 0, used: no
code: 1, angle: 101 deg, confidence: 6, used: no
code: 2, angle: 223 deg, confidence: 7, used: yes
code: 3, angle: 160 deg, confidence: 7, used: yes
code: 4, angle: 338 deg, confidence: 7, used: yes
code: 5, angle: 42 deg, confidence: 7, used: yes
code: 6, angle: 281 deg, confidence: 6, used: no
code: 7, angle: 178 deg, confidence: 0, used: no

I assembled my hall sensors in a pattern of 0deg, 60deg, 120deg which is sensor every 8 slots.
Would it be better if i set it up in 0deg, 120deg, 240deg? This means sensor every 16 slots.
Should i start to set them at a specific tooth/slot? Would that be an issue at all?
Can you give me some advice?

User avatar
Lebowski   1 GW

1 GW
Posts: 3287
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

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

Post by Lebowski » Apr 07 2019 2:43pm

Hall sensor spacing looks perfect (codes 1 to 6 have near perfect 60 degree spacing, when you go 5 to 1 to 3 to 2 to 6 to 4 to 5 etc), i would not change them.

Strange is that code 1 and 6 are not in use, this may explain your strange behavior of point 1. Did you turn them off ? Just turn those back on, but keep 0 and 7 off.

Did you calibrate the (offset of) the current sensors ?

When in sensorless only, at low throttle during motor start i can rock back and forth a bit, depends also on wiggle parameters (misc menu)

Why did you set an offset ? How high did you set it ? What did the chip indicate for offset and spread ?

arber333   10 W

10 W
Posts: 87
Joined: Mar 29 2013 4:13pm

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

Post by arber333 » Apr 07 2019 4:51pm

Lebowski wrote:
Apr 07 2019 2:43pm
Hall sensor spacing looks perfect (codes 1 to 6 have near perfect 60 degree spacing, when you go 5 to 1 to 3 to 2 to 6 to 4 to 5 etc), i would not change them.

Strange is that code 1 and 6 are not in use, this may explain your strange behavior of point 1. Did you turn them off ? Just turn those back on, but keep 0 and 7 off.

Did you calibrate the (offset of) the current sensors ?

When in sensorless only, at low throttle during motor start i can rock back and forth a bit, depends also on wiggle parameters (misc menu)

Why did you set an offset ? How high did you set it ? What did the chip indicate for offset and spread ?
Chip provided offset in -3.65deg with spread of 1.2

I am almost certain now that problem is created by some EMI between motor and inverter. However whenever i start controler is in mode 2. 3rd LED is on while controller keeps varying PWM without any throttle input. If i connect controller GND to inverter case brain goes immediately to mode 0 and stays there until i move GND from case. Classic decoupling problems?

A

User avatar
Arlo1   100 GW

100 GW
Posts: 8356
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

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

Post by Arlo1 » Apr 07 2019 7:38pm

My inverter case was connected to gnd which was the 12V battery -
My brain was fed isolated power but at some point I connected it to ground as well.

Never had the problem you have. But there is 100s of hours of tuning the halls to make them work well.
I honestly had 1000s of hours into tuning it to get the power I did.

-Arlin
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

arber333   10 W

10 W
Posts: 87
Joined: Mar 29 2013 4:13pm

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

Post by arber333 » Apr 08 2019 12:01am

Arlo1 wrote:
Apr 07 2019 7:38pm
My inverter case was connected to gnd which was the 12V battery -
My brain was fed isolated power but at some point I connected it to ground as well.

Never had the problem you have. But there is 100s of hours of tuning the halls to make them work well.
I honestly had 1000s of hours into tuning it to get the power I did.

-Arlin
Correct! I dont see why direct GND would be problematic since whole inverter logic is isolated from it with only signals being on that plane.
I can smell burning ozone if i brush cable against motor case. In low lighting there are sparks there but no real voltage. If i try to decouple and connect all potentials brain goes to mode 0. Now why is that? Does it see anything i dont?
I went in with a multimeter and scope and honestly i dont see anything other than static.

A

User avatar
Arlo1   100 GW

100 GW
Posts: 8356
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

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

Post by Arlo1 » Apr 08 2019 12:12am

arber333 wrote:
Apr 08 2019 12:01am
Arlo1 wrote:
Apr 07 2019 7:38pm
My inverter case was connected to gnd which was the 12V battery -
My brain was fed isolated power but at some point I connected it to ground as well.

Never had the problem you have. But there is 100s of hours of tuning the halls to make them work well.
I honestly had 1000s of hours into tuning it to get the power I did.

-Arlin
Correct! I dont see why direct GND would be problematic since whole inverter logic is isolated from it with only signals being on that plane.
I can smell burning ozone if i brush cable against motor case. In low lighting there are sparks there but no real voltage. If i try to decouple and connect all potentials brain goes to mode 0. Now why is that? Does it see anything i dont?
I went in with a multimeter and scope and honestly i dont see anything other than static.

A
Watch out for this.

Your Main traction pack might have a capacitance that is causing this. You should not be seeing sparks. I would start with an isolation test from each side of the battery to chassis ground. In fact you should have a circuit doing this for you.
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

User avatar
Lebowski   1 GW

1 GW
Posts: 3287
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

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

Post by Lebowski » Apr 08 2019 1:07am

maybe the motor windings are somehow shorted to the case ? That it stays in drive_0 (with the voltage feedback) means the motor windings are not 'floating' but connected to gnd somehow (that or a FET is on).

Another thing, when you did the throttle calibration for throttle close, did you give it a little gas ? This is important due to noise on the throttle signal. Normally there is noise on the throttle which averages out to 0. But when the throttle closed voltage is 0.0V, what happens is that the ADC inside the chip converts the positive halfs of the noise to a certain value, and the negative halves to 0 (as the ADC does not do negative input voltages, however small). The net effect is that all the positive parts of the noise constitute a small positive signal, meaning the controller IC thinks you're giving a little bit of gas. It will power the motor with this, making it run or (in case of sensorless start) maybe make it rock back and forth a bit.

So, make sure you give a little bit of gas when calibrating the throttle closed value ! In this way when you give no gas it will see voltage below the throttle open value, and keep motor phase current at 0 A.

arber333   10 W

10 W
Posts: 87
Joined: Mar 29 2013 4:13pm

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

Post by arber333 » Apr 08 2019 5:28am

Lebowski wrote:
Apr 08 2019 1:07am
maybe the motor windings are somehow shorted to the case ? That it stays in drive_0 (with the voltage feedback) means the motor windings are not 'floating' but connected to gnd somehow (that or a FET is on).

Another thing, when you did the throttle calibration for throttle close, did you give it a little gas ? This is important due to noise on the throttle signal. Normally there is noise on the throttle which averages out to 0. But when the throttle closed voltage is 0.0V, what happens is that the ADC inside the chip converts the positive halfs of the noise to a certain value, and the negative halves to 0 (as the ADC does not do negative input voltages, however small). The net effect is that all the positive parts of the noise constitute a small positive signal, meaning the controller IC thinks you're giving a little bit of gas. It will power the motor with this, making it run or (in case of sensorless start) maybe make it rock back and forth a bit.

So, make sure you give a little bit of gas when calibrating the throttle closed value ! In this way when you give no gas it will see voltage below the throttle open value, and keep motor phase current at 0 A.
Hi Bas

I did calibrate throttles like you describe. I have like 5% throttle travel wasted du to this. Ptius throttle operates from 1.5V to 4.6V i start at 1.7V.

Volt inverter has fault protection which can turn on with large enough current. However from my experience if one of IGBTs would be defect fault would trigger befoer PWM would even start.

That leaves motor windings then. I am not sure how to check for this. I can try to run it with Johannes controller and test for problems there.
I did dissassemble rear side of motor winding, glued in sensors and wind them up with thin cord. I used silicon glue. I think silicon is not conductive wouldnt you agree?
When i was cleaning windings i could have touched with my twezers to some of the frontal wires inside winding bundle. Only one or two. Could that have caused the issue? DOH!

Today I can try one more thing... i can connect neg pole from 12V battery i use to motor and inverter. Maybe i am seeing famous ground loop.

User avatar
Lebowski   1 GW

1 GW
Posts: 3287
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

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

Post by Lebowski » Apr 08 2019 6:43am

To check motor winding, just connect an ohmmeter between any winding and motor case...

arber333   10 W

10 W
Posts: 87
Joined: Mar 29 2013 4:13pm

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

Post by arber333 » Apr 08 2019 11:11am

I checked the motor and phse to motor case was good. No pass through. Than i checked phase to inverter case. To my horror i saw one phase was passing through directly. Then i disconnected cables and measured again. I found out that one of the bolts was contacting the internal brace for current sensors and thus creating short. I rebored the phase connectors and cleared the metal contact.

Then i tried to run motor in sensorless. Again i got some bumping with throttle but now if i released throttle PWM would die down.
I tried also with sensors and this was a world of difference. Smooth takeoff and good throttle response. No jumping across.

I think i am good to put it in a car now. I see i will rather use sensored mode since it works very good. Bas do you think at higher load i will have any problems with EMI on hall cables?

However! I tried to connect motor with inverter case and again Lebowski would go to reset. I tried to measure the voltage ifference and i got 4V difference from every phase to motor case. But i also got 207Vac from motor case to inverter case! Phase to inverter case was 200V measured on AC scale. How shall i explain this? If i measure phase to motor case i get no connection. You have any idea how to tame this beast? I imagine it is not good for the bearings to have high ac voltage on motor casing.

tnx

User avatar
Arlo1   100 GW

100 GW
Posts: 8356
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

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

Post by Arlo1 » Apr 08 2019 12:16pm

Are you using the brain board I designed? Make sure reset has a cap from reset to ground. I had to add this after the fact. I found honking the horn would trip reset on my.
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

kiwifiat   100 W

100 W
Posts: 153
Joined: Mar 16 2013 5:49pm
Location: Vancouver, Canada

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

Post by kiwifiat » Apr 08 2019 12:22pm

I have measured between the HV bus and the inverter case on my Volt inverter and there is no connection on either terminal. According to the Oakridge report on the gen1 Leaf drivetrain there is a brushed contact to ground on the input shaft of the gearbox.Assuming that you don't have another short somewhere, maybe there are some induced voltages generated by either or both the stator and the rotor? :?
Given that the Volt inverter has intergrated gate drive power supplies have you set under menu n) miscellaneous
c) low side pulsing in drive 0: to disabled?
“You never know if quotes on the internet are genuine.” - Abraham Lincoln

User avatar
Arlo1   100 GW

100 GW
Posts: 8356
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

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

Post by Arlo1 » Apr 08 2019 2:17pm

The brush is to recent/reduce EMP.
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

kiwifiat   100 W

100 W
Posts: 153
Joined: Mar 16 2013 5:49pm
Location: Vancouver, Canada

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

Post by kiwifiat » Apr 08 2019 2:59pm

Arlo1 wrote:
Apr 08 2019 2:17pm
The brush is to recent/reduce EMP.
Correct, but from what source? The motor or electrostatic buildup from the road tires?
“You never know if quotes on the internet are genuine.” - Abraham Lincoln

arber333   10 W

10 W
Posts: 87
Joined: Mar 29 2013 4:13pm

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

Post by arber333 » Apr 08 2019 3:19pm

Gentlemen observe signal on motor case....
IMG_20190408_215755_1.jpg
Now i measured and i get 207Vac! That is 0V DC! So i assume somewhere on the case there is a leak. But with ohm meter i measure in excess of 15Mohm from phase wires to motor case. How can i determine where to find the leak? Hm... could silicon glue conduct? I use generous ammout to glue hall sensors after i confirmed they work.

I could disassemble gearbox from motor and observe motor more in detail.
Arlo can you scope your motor case to GND when at some 2000rpm? Just so that i didnt loose my sanity yet...

I will add a cap to reset pin. How much, like 100nF? Chip does not go into reset, it frezes in mode 0 and doesnt want to start PWM. I can see drive 0 LED.
My chip is not isolated from 12V supply and gnd since Volt uses isolated power stage anyway.
I could do it though. I could try supplying it from one 2A AC to 12V converter. It is isolated so why not try it? Current sensors are closed system as well as hall position sensors. There is no other subsystem in there.

A

arber333   10 W

10 W
Posts: 87
Joined: Mar 29 2013 4:13pm

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

Post by arber333 » Apr 10 2019 1:53pm

NO F...N WAY!!!!!

I just solved the problem that seemed unsurmountable... by a single 100nF cap placed from reset pin to GND Thanks Arlo i think i will invite you for a beer if i find myself in Vancouver.

I was entertaining a thought of adding some 5V relays to test isolation when i decided to try the last thing. Well as allways it worked! I got good tracking. No problems with throttle bouncing.

Bas, can you ammend your schematic in such a way to add one 100nF cap from Reset pin to GND. It seems that reset pin was floating in the middle when PWM was applied...

Now i will go put this into a propper car!

Tnx

Arber

kiwifiat   100 W

100 W
Posts: 153
Joined: Mar 16 2013 5:49pm
Location: Vancouver, Canada

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

Post by kiwifiat » Apr 10 2019 2:36pm

Good job, and it looks like you tracked the case elctrification down to a phase wire shorting to the case of the inverter. What PWM frequency and dead time are you running with the Volt inverter power stage?
“You never know if quotes on the internet are genuine.” - Abraham Lincoln

arber333   10 W

10 W
Posts: 87
Joined: Mar 29 2013 4:13pm

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

Post by arber333 » Apr 10 2019 3:05pm

kiwifiat wrote:
Apr 10 2019 2:36pm
Good job, and it looks like you tracked the case elctrification down to a phase wire shorting to the case of the inverter. What PWM frequency and dead time are you running with the Volt inverter power stage?
Freq and all parameters are the same as Arlo setup in his video. That is 6kHz.
Well for dead time i experimented with Johannes brain and my ACIM motor in my car. The best value for me was 1.65uS and it works now for my Leaf motor also.
I dont use any isolation stage since Volt as its own isolation.

See my settings here:
version:2A1_
0x019A 0xE000 0xFFFF 0xFFFF 0x0003 0xFFFC 0x7000 0x0006
0x4C00 0x0000 0x0000 0x0000 0x0000 0x0000 0xFDAB 0x0000
0x0110 0x0347 0x00D1 0x0400 0x0400 0x000E 0xFFDA 0x460D
0xFFDE 0x4069 0xFFFF 0x167F 0x00DA 0x01F4 0x02EF 0x08DF
0x02A9 0x02D0 0x01E1 0x0071 0x02D0 0xFFFF 0xFFFF 0xFFFF
0xFFFF 0x1720 0x1AD0 0x7FBC 0x7D2E 0x0030 0x795E 0x0000
0x07AE 0x0018 0x0000 0x01E0 0xFFFF 0xF852 0xFFE8 0x0000
0xFE20 0x0000 0x4CCD 0x0060 0x0000 0x01E0 0xFFFF 0xB333
0xFFA0 0x0000 0xFE20 0x06AD 0x033B 0x0064 0x0017 0x2EF3
0xF800 0x9F39 0x4837 0x7239 0xF139 0xC837 0x1D39 0xFF00
0x0E49 0x0088 0x0044 0x0012 0x00E3 0x0000 0x04EB 0x0419
0x020C 0x0400 0x0400 0x0400 0x09C3 0x1194 0x0031 0x04E0
0x0007 0x0D39 0xFFC4 0x171F 0x1333 0x0000 0x0000 0xF999
0x0000 0x0000 0x0164 0x0242 0x003C 0x0361 0x1066 0x00D1
0x0577 0x02BB 0x04B0 0x0258 0x0064 0xC898 0x1998 0xFFFF
0xFFFF 0x0003 0x0000 0x0078 0x0000 0x0000 0xFFFD 0x0000
0xFF88 0x0000 0x0000 0x0005 0x0000 0x0064 0xFFFB 0x0000
0xFF9C 0x000C 0x0000 0x00F0 0xFFF4 0x0000 0xFF10 0x02D9
0x0221 0x0577 0x005B 0x0186 0x0221 0x000D 0x0010 0x0E10
0x88B8 0x03B6 0x6000 0x04EB 0x0088 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 0x2AA8 0x0005
0x8000 0x5F0C 0x0005 0xFC20 0x0000 0x0000 0x0000 0x0000
0x0000 0x0000 0x0000 0x0000 0xFFDA 0x460D 0xFFDE 0x4069
0x5F0C 0x0005 0x2000 0x928B 0x0015 0xFC38 0xFFFE 0x0088
0xFFDB 0xFE08 0x0000 0xFFE0 0x0000 0x0004 0xFFDA 0x460D
0xFFDE 0x4069 0xDA55 0x001E 0x2C00 0x9578 0x0002 0xFC38
0xF986 0xFFE2 0x04FD 0x0487 0x0000 0x0000 0x0000 0xFD49
0xFFDA 0x460D 0xFFDE 0x4069 0x3F5F 0x0009 0x2C00 0x011A
0x0000 0x0888 0xF71F 0xFFDB 0x057D 0x0749 0x0000 0x0005
0x0000 0xFC58 0xFFDA 0x460D 0xFFDE 0x4069 0xA164 0x0006
0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
0x0000 0x0000 0x0000 0x0000 0x0000 0x0324 0x0648 0x096A
0x0C8C 0x0FAB 0x12C8 0x15E2 0x18F9 0x1C0B 0x1F1A 0x2223
0x2528 0x2826 0x2B1F 0x2E11 0x30FB 0x33DF 0x36BA 0x398C
0x3C56 0x3F17 0x41CE 0x447A 0x471C 0x49B4 0x4C3F 0x4EBF
0x5133 0x539B 0x55F5 0x5842 *

User avatar
Arlo1   100 GW

100 GW
Posts: 8356
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

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

Post by Arlo1 » Apr 10 2019 5:45pm

arber333 wrote:
Apr 10 2019 3:05pm

Well for dead time i experimented with Johannes brain and my ACIM motor in my car. The best value for me was 1.65uS and it works now for my Leaf motor also.
Dead time is a calculation not something you experiment with to get set right. The reason for this is it changes as the different parts cycle though temps and various parts of the usable parameters of operation.
I dont use any isolation stage since Volt as its own isolation.
You should fluctuations on the 12v line can carry into the 5v circuit
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

kiwifiat   100 W

100 W
Posts: 153
Joined: Mar 16 2013 5:49pm
Location: Vancouver, Canada

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

Post by kiwifiat » Apr 10 2019 6:35pm

arber333 wrote:
Apr 10 2019 3:05pm

Freq and all parameters are the same as Arlo setup in his video. That is 6kHz.
Well for dead time i experimented with Johannes brain and my ACIM motor in my car. The best value for me was 1.65uS and it works now for my Leaf motor also.
I dont use any isolation stage since Volt as its own isolation.

See my settings here:
version:2A1_
0x019A 0xE000 0xFFFF 0xFFFF 0x0003 0xFFFC 0x7000 0x0006
0x4C00 0x0000 0x0000 0x0000 0x0000 0x0000 0xFDAB 0x0000
0x0110 0x0347 0x00D1 0x0400 0x0400 0x000E 0xFFDA 0x460D
0xFFDE 0x4069 0xFFFF 0x167F 0x00DA 0x01F4 0x02EF 0x08DF
0x02A9 0x02D0 0x01E1 0x0071 0x02D0 0xFFFF 0xFFFF 0xFFFF
0xFFFF 0x1720 0x1AD0 0x7FBC 0x7D2E 0x0030 0x795E 0x0000
0x07AE 0x0018 0x0000 0x01E0 0xFFFF 0xF852 0xFFE8 0x0000
0xFE20 0x0000 0x4CCD 0x0060 0x0000 0x01E0 0xFFFF 0xB333
0xFFA0 0x0000 0xFE20 0x06AD 0x033B 0x0064 0x0017 0x2EF3
0xF800 0x9F39 0x4837 0x7239 0xF139 0xC837 0x1D39 0xFF00
0x0E49 0x0088 0x0044 0x0012 0x00E3 0x0000 0x04EB 0x0419
0x020C 0x0400 0x0400 0x0400 0x09C3 0x1194 0x0031 0x04E0
0x0007 0x0D39 0xFFC4 0x171F 0x1333 0x0000 0x0000 0xF999
0x0000 0x0000 0x0164 0x0242 0x003C 0x0361 0x1066 0x00D1
0x0577 0x02BB 0x04B0 0x0258 0x0064 0xC898 0x1998 0xFFFF
0xFFFF 0x0003 0x0000 0x0078 0x0000 0x0000 0xFFFD 0x0000
0xFF88 0x0000 0x0000 0x0005 0x0000 0x0064 0xFFFB 0x0000
0xFF9C 0x000C 0x0000 0x00F0 0xFFF4 0x0000 0xFF10 0x02D9
0x0221 0x0577 0x005B 0x0186 0x0221 0x000D 0x0010 0x0E10
0x88B8 0x03B6 0x6000 0x04EB 0x0088 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 0x2AA8 0x0005
0x8000 0x5F0C 0x0005 0xFC20 0x0000 0x0000 0x0000 0x0000
0x0000 0x0000 0x0000 0x0000 0xFFDA 0x460D 0xFFDE 0x4069
0x5F0C 0x0005 0x2000 0x928B 0x0015 0xFC38 0xFFFE 0x0088
0xFFDB 0xFE08 0x0000 0xFFE0 0x0000 0x0004 0xFFDA 0x460D
0xFFDE 0x4069 0xDA55 0x001E 0x2C00 0x9578 0x0002 0xFC38
0xF986 0xFFE2 0x04FD 0x0487 0x0000 0x0000 0x0000 0xFD49
0xFFDA 0x460D 0xFFDE 0x4069 0x3F5F 0x0009 0x2C00 0x011A
0x0000 0x0888 0xF71F 0xFFDB 0x057D 0x0749 0x0000 0x0005
0x0000 0xFC58 0xFFDA 0x460D 0xFFDE 0x4069 0xA164 0x0006
0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
0x0000 0x0000 0x0000 0x0000 0x0000 0x0324 0x0648 0x096A
0x0C8C 0x0FAB 0x12C8 0x15E2 0x18F9 0x1C0B 0x1F1A 0x2223
0x2528 0x2826 0x2B1F 0x2E11 0x30FB 0x33DF 0x36BA 0x398C
0x3C56 0x3F17 0x41CE 0x447A 0x471C 0x49B4 0x4C3F 0x4EBF
0x5133 0x539B 0x55F5 0x5842 *
Thanks for that, wow :shock: is your gen1 Leaf motor really on 5.5mOhms ? or is that a tuning change by Arlo? My gen 2 Leaf motor measures 22.5mOhms and 175uH which gives a 7.8ms L/R time constant. I don't see any inverters on your gate drive lines, how do you manage to drive the "active low" optoisolators in the Volt inverter with active high settings in pwm menu??

A question for Lebowski, you commented when working on izeman's Mac motor that because it has a relatively long L/R time constant compared to the typical ~1ms it was optimal to reduce sections h) and i) of the contol loops coefficients menu G). Given that the Leaf motor also has a relatively long L/R constant what would be suitable values for G) sections h) and i) ?

Also in the miscelaneous menu section N) subsection h) # of cycles going from 2 --> 3 I see from the supplied file a value of 35,000. Is there a tuning methodology for determining the best value for this parameter? Does the value represent erpm or contol loop iterations? Thanks.
“You never know if quotes on the internet are genuine.” - Abraham Lincoln

User avatar
Arlo1   100 GW

100 GW
Posts: 8356
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

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

Post by Arlo1 » Apr 10 2019 6:58pm

kiwifiat wrote:
Apr 10 2019 6:35pm


Thanks for that, wow :shock: is your gen1 Leaf motor really on 5.5mOhms ? or is that a tuning change by Arlo? My gen 2 Leaf motor measures 22.5mOhms and 175uH which gives a 7.8ms L/R time constant. I don't see any inverters on your gate drive lines, how do you manage to drive the "active low" optoisolators in the Volt inverter with active high settings in pwm menu??

A question for Lebowski, you commented when working on izeman's Mac motor that because it has a relatively long L/R time constant compared to the typical ~1ms it was optimal to reduce sections h) and i) of the contol loops coefficients menu G). Given that the Leaf motor also has a relatively long L/R constant what would be suitable values for G) sections h) and i) ?

Also in the miscelaneous menu section N) subsection h) # of cycles going from 2 --> 3 I see from the supplied file a value of 35,000. Is there a tuning methodology for determining the best value for this parameter? Does the value represent erpm or contol loop iterations? Thanks.
Inductance is all that matters for the current rise time. In short its because things are happening to fast for the resistance to play a roll. When I went for "ALL THE POWER" I found ~65uH in the settings what was worked best. I think this is because of a couple reasons.
1 the leaf motor is a IPM rotor which is a lot like the Tesla model 3 you see all these people calling a SR motor when its really not.
and with that design it does work a little like a SR rotor at higher currents as it saturates.
2 the time for each signwave got quite short when I was running 1khz (15000rpm) electrical frequency and you only have so much time to keep the current in check at high RPM with field weakening.
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

User avatar
Lebowski   1 GW

1 GW
Posts: 3287
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

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

Post by Lebowski » Apr 11 2019 12:49am

kiwifiat wrote:
Apr 10 2019 6:35pm
Thanks for that, wow :shock: is your gen1 Leaf motor really on 5.5mOhms ? or is that a tuning change by Arlo? My gen 2 Leaf motor measures 22.5mOhms and 175uH which gives a 7.8ms L/R time constant. I don't see any inverters on your gate drive lines, how do you manage to drive the "active low" optoisolators in the Volt inverter with active high settings in pwm menu??

A question for Lebowski, you commented when working on izeman's Mac motor that because it has a relatively long L/R time constant compared to the typical ~1ms it was optimal to reduce sections h) and i) of the contol loops coefficients menu G). Given that the Leaf motor also has a relatively long L/R constant what would be suitable values for G) sections h) and i) ?

Also in the miscelaneous menu section N) subsection h) # of cycles going from 2 --> 3 I see from the supplied file a value of 35,000. Is there a tuning methodology for determining the best value for this parameter? Does the value represent erpm or contol loop iterations? Thanks.
The polarity of the PWM signals IS NOT saved in the hex file (maybe I should put that in caps :o )

I don't know if I still agree with my comment about options h and i in menu g... Things were happening with Izeman's motor that in the end were fixed in a totally different way, with a fundamental change in the control loops (a change to something which I've never seen in any motor control application note).

About the # of cycles from 2 to 3... the way it works is the transition from halls to sensorless is instant. But to prevent it from conking out it runs a # of cycles on the more relaxed error settings of drive 2, before switching to drive 3 with its more strict error settings. This is what # of cycles (of f_sample) represents. So if f_sample is 20000, and # cycles is 4000, it will run 0.2 seconds on the more relaxed drive 2 error settings. But the transition is setup pretty good so that roughly #1000 should be enough.

Post Reply