Why won't the leaf motor spin?

User avatar
jerrykco
Posts: 120
Joined: Thu Dec 12, 2019 5:32 pm
Location: United States, Colorado
Has thanked: 10 times
Been thanked: 8 times
Contact:

Why won't the leaf motor spin?

Post by jerrykco »

I am trying to bring up the the system following the Procedure in "Using FOC Software" (I admit I might have to do something else first, but if so I haven't got a clue).
Code 4.76.R-foc - Leaf Parameter File
Steps
1. Power on the BMS Controller using the Pack Sniffer 2, Wait for relays to apply HV DC
2. Power on my 12V Supply'
a. Power On Pre-charge Relay, Wait 10 Seconds '
b. Power on Main Contactor (bypasses precharge Resistor), Power of Pre-Charge Relay
b, power on to the Inverter
3. Connect to Inverter WiFi
4. Apply Momentary 12V to Start Inverter and Verify it is going and no errors via Web Interface
5. Verify Cosine amplitude changes via scope while rotating Rotor. (Did Sine yesterday)
6. Verify Angle or Rotor changes with rotation 0-360n via Web Interface
7. Verify FWD/REV/Neutral switch is working and recognized by Inverter via Web Interface
8. Verified Step 3 in Using FOC Software, syncofs=0 via Web Interface
9. Cant get past Step 4. Never get movement setting manualid 0-350, I got 'set OK' each time via web iinterface and no errors except Warn cantimeout.'

Suggestions?
Jerry Kauffman
jerryk48 at gmail dot com
arber333
Posts: 3261
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 231 times
Contact:

Re: Why won't the leaf motor spin?

Post by arber333 »

Remove CAN from equasion. Take the CAN wires off from the load. Are you using CAN throttle?

Obviously brain is waiting for CAN signal and it is not receiving expected signal. See if you have some CAN parameters set in code. You need to remove them or set them to 0.

A
User avatar
jerrykco
Posts: 120
Joined: Thu Dec 12, 2019 5:32 pm
Location: United States, Colorado
Has thanked: 10 times
Been thanked: 8 times
Contact:

Re: Why won't the leaf motor spin?

Post by jerrykco »

arber333 wrote: Sat Apr 11, 2020 6:07 pm Remove CAN from equation. Take the CAN wires off from the load. Are you using CAN throttle?
See if you have some CAN parameters set in code. You need to remove them or set them to 0.
Thanks Arber333. I do not have a can bus at all. So the throttle is a Prius throttle pedal. I have 5 volts going to it and connected to one of the input throttle connections.
However, I am confused because the guide for using FOC doesn't mention CAN bus or inputs needed or using the throttle.
I will set any can parameters to zero. And then try again.
Jerry Kauffman
jerryk48 at gmail dot com
arber333
Posts: 3261
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 231 times
Contact:

Re: Why won't the leaf motor spin?

Post by arber333 »

jerrykco wrote: Sat Apr 11, 2020 6:26 pm
arber333 wrote: Sat Apr 11, 2020 6:07 pm Remove CAN from equation. Take the CAN wires off from the load. Are you using CAN throttle?
See if you have some CAN parameters set in code. You need to remove them or set them to 0.
Thanks Arber333. I do not have a can bus at all. So the throttle is a Prius throttle pedal. I have 5 volts going to it and connected to one of the input throttle connections.
However, I am confused because the guide for using FOC doesn't mention CAN bus or inputs needed or using the throttle.
I will set any can parameters to zero. And then try again.
Can you post your parameters file .json here so we can see if there is something odd.
Also do you have 120R terminator on your CAN transceiver?
User avatar
jerrykco
Posts: 120
Joined: Thu Dec 12, 2019 5:32 pm
Location: United States, Colorado
Has thanked: 10 times
Been thanked: 8 times
Contact:

Re: Why won't the leaf motor spin?

Post by jerrykco »

arber333 wrote: Sat Apr 11, 2020 6:40 pm Can you post your parameters file .json here so we can see if there is something odd.
Also do you have 120R terminator on your CAN transceiver?
No i do not have any termination resister on the Leaf external plug where the Can Bus comes out.
Un fortunately I only have a 1K resister at home.

{
"curkp": 64,
"curki": 32,
"curkifrqgain": 50,
"fwkp": -1,
"dmargin": -2000,
"polepairs": 4,
"fmax": 550,
"dirchrpm": 100,
"dirmode": 1,
"syncofs": 0,
"syncadv": 8,
"snsm": 14,
"pwmfrq": 1,
"ocurlim": 600,
"il1gain": 1.68,
"il2gain": 1.68,
"udcgain": 5.75,
"udcofs": 250,
"udclim": 540,
"bmslimhigh": 50,
"bmslimlow": -1,
"udcmin": 0,
"udcmax": 520,
"idcmax": 200,
"idcmin": -50,
"throtmax": 100,
"throtmin": -100,
"potmin": 0,
"potmax": 4095,
"pot2min": 4095,
"pot2max": 4095,
"potmode": 2,
"throtramp": 1,
"throtramprpm": 20000,
"throtcur": 4,
"brknompedal": -20,
"regenramp": 1,
"brknom": 20,
"brkmax": -15,
"brkrampstr": 15,
"brkout": -50,
"idlespeed": 500,
"idlethrotlim": 60,
"idlemode": 3,
"speedkp": 0.18,
"speedflt": 5,
"cruisemode": 0,
"udcsw": 300,
"tripmode": 0,
"pwmfunc": 0,
"pwmgain": 100,
"pwmofs": 0,
"canspeed": 1,
"canperiod": 0,
"manualiq": 0,
"manualid": 0
}
Jerry Kauffman
jerryk48 at gmail dot com
User avatar
johu
Site Admin
Posts: 5759
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1005 times
Contact:

Re: Why won't the leaf motor spin?

Post by johu »

I don't think it matters right now but the Leaf boards are shipped with throttle mode set to "CAN". That produces your warning message but won't inhibit operation in manual mode. Have you hit the "Start Manual Mode" button and does opmode display "MANUAL RUN"?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
arber333
Posts: 3261
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 231 times
Contact:

Re: Why won't the leaf motor spin?

Post by arber333 »

Doesnt look anything wrong...
Did you assign some CAN RX value to any of the reported parameters? I dont see them in your partameters...
EDIT: Ah... you use Leaf inverter board. That is clearly out of my expertise.
User avatar
jerrykco
Posts: 120
Joined: Thu Dec 12, 2019 5:32 pm
Location: United States, Colorado
Has thanked: 10 times
Been thanked: 8 times
Contact:

Re: Why won't the leaf motor spin?

Post by jerrykco »

johu wrote: Sat Apr 11, 2020 7:40 pm Have you hit the "Start Manual Mode" button and does opmode display "MANUAL RUN"?
That explains a lot. I was using the 12V start pulse. to enable the inverter.
OK I got the motor to move around Manualid=175 but it only moved 15 degrees and stopped.
I went up from there but it never moved again. When I got to around 205 I heard a click in the motor.
I checked the Error and {38187]: STOP - OVERCURRENT
Jerry Kauffman
jerryk48 at gmail dot com
User avatar
jerrykco
Posts: 120
Joined: Thu Dec 12, 2019 5:32 pm
Location: United States, Colorado
Has thanked: 10 times
Been thanked: 8 times
Contact:

Re: Why won't the leaf motor spin?

Post by jerrykco »

I just repeated it and this time the motor is at a different angle ( I hand turned the rotor between sessions)
This time I heard the click at manualid=175. Checked errors and STOP - OVERCURRENT again....
Then I did something stupid you might consider stupid.
I hit the Start Inverter In Manual mode and the motor spun up several revolutions then clicked.
I wasn't thinking about the value that manualid was left setting at.
Can I start with manualid = 50 then start the inverter in manual mode?
Jerry Kauffman
jerryk48 at gmail dot com
User avatar
jerrykco
Posts: 120
Joined: Thu Dec 12, 2019 5:32 pm
Location: United States, Colorado
Has thanked: 10 times
Been thanked: 8 times
Contact:

Re: Why won't the leaf motor spin?

Post by jerrykco »

I have to get larger wire. It's warm between the inverter and the motor. I'll update this Monday night.
Happy Easter. And thanks on getting me to my next step.
Jerry Kauffman
jerryk48 at gmail dot com
damian.lo
Posts: 123
Joined: Sat Dec 22, 2018 12:46 pm
Location: Poland

Re: Why won't the leaf motor spin?

Post by damian.lo »

Hi,

I remember, that I had similar situation, but mine syncofs was near 0 (40 to be exact) and with first trials all of the time with manualid from 0 to 150 mine motor won't spin.
So in some next trials first I changed syncofs to 8000 and then increase manualid to about 80 from 0 in steps like Johannes wrote - 10.
I had about 60VDC. Check also like Johannes said if after applying 12V to start - it really have info opmode=RUN.
With mine trials DC battery current was connected with 2x2,5sqmm and was ok for trials.
User avatar
jerrykco
Posts: 120
Joined: Thu Dec 12, 2019 5:32 pm
Location: United States, Colorado
Has thanked: 10 times
Been thanked: 8 times
Contact:

Re: Why won't the leaf motor spin?

Post by jerrykco »

Thanks Damian.lo,
I managed to get heavy duty (4 AWG) battery cable wire yesterday from an auto shop. I replaced the repurposed 3 wire Dryer 240V wire between the Leaf Inverter and the Leaf Motor with the 4 AWG wire. I did notice 1 loose connection of the three phase wire on the dryer cord at the motor. I will give it a try tonight.
Jerry Kauffman
jerryk48 at gmail dot com
User avatar
jerrykco
Posts: 120
Joined: Thu Dec 12, 2019 5:32 pm
Location: United States, Colorado
Has thanked: 10 times
Been thanked: 8 times
Contact:

Re: Why won't the leaf motor spin?

Post by jerrykco »

I am no longer seeing a signal on pins 20,21 (Sin+, Sin-) back from the resolver using a scope looking on the pins on the LEAF inverter interface board. I do see the 17,18 (Cos+, Cos-) signal.

As stated in the Main Board V3 Documentation:
Alternatively Pin 1 and 3 can be connected to a sin/cos feedback device and Pin 4 can generate a resolver excitation sine wave. In that case Pin 2 provides 1.7V to make the resolver feedback unipolar.
If I understand ( I'm not a EE ;-) ) this means if I do not see a signal back on SIN that there is something wrong down at the motor resolver or more likely it is my wiring to the resolver?

I would like to debug this issue without having high voltage connected.
What trick can I use to get around "STOP PRECHARGE"?
Jerry Kauffman
jerryk48 at gmail dot com
User avatar
johu
Site Admin
Posts: 5759
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1005 times
Contact:

Re: Why won't the leaf motor spin?

Post by johu »

jerrykco wrote: Tue Apr 14, 2020 12:17 pm I would like to debug this issue without having high voltage connected.
What trick can I use to get around "STOP PRECHARGE"?
Set udcsw=0

Yes something is wrong with your wiring. While I was messing with crocodile clips directly on the resolver I also cut one of the thin copper wires.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
jerrykco
Posts: 120
Joined: Thu Dec 12, 2019 5:32 pm
Location: United States, Colorado
Has thanked: 10 times
Been thanked: 8 times
Contact:

Re: Why won't the leaf motor spin?

Post by jerrykco »

Now I have good signals for SIN/COS again. And I can see them on Pins 2,3 on the Controller.
However, setting manualid heats the water jacket of the inverter and the motor does not spin. Occasionally I see it move 15-20 degrees. But then upping manualid doesn't move it. I am afraid that something else could be wrong.
Could I put a scope on the AC output from the inverter?
I'll need good directions so I don't kill myself. Or burn down the house.
Jerry Kauffman
jerryk48 at gmail dot com
arber333
Posts: 3261
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 231 times
Contact:

Re: Why won't the leaf motor spin?

Post by arber333 »

Don't try to scope AC wires with HV if you don't know how.
Or better yet you can remove GND wires from your probes and scope phase wires by twos with each probe. Is your scope dual channel? Make sure probes are set to 10x!

I would put like 4 car batteries together for 48v testing. If you think you have problem with HV lines.

Does motor shake when you apply throttle in normal mode? Like 15deg from one side to the other? That could be a sign your sin/cos wires are not aligned with phases. Can you change both wires in your encoder connector. Or just try changing any of phase wire combinations until your motor spins?

Like Damian said you apply ID current in steps of 10 if you use low voltage. When I use HV I get motor moving at 3 or 5 value already. Sync offset usually I get from 4000 to 9000...
User avatar
johu
Site Admin
Posts: 5759
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1005 times
Contact:

Re: Why won't the leaf motor spin?

Post by johu »

And keep in mind if the motor does not spin at manualid you may have already reached your goal of correct syncofs.
If you want to see it spin, set manualiq > 0
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
jerrykco
Posts: 120
Joined: Thu Dec 12, 2019 5:32 pm
Location: United States, Colorado
Has thanked: 10 times
Been thanked: 8 times
Contact:

Re: Why won't the leaf motor spin?

Post by jerrykco »

johu wrote: Wed Apr 15, 2020 7:21 am And keep in mind if the motor does not spin at manualid you may have already reached your goal of correct syncofs.
If you want to see it spin, set manualiq > 0
I was following the directions in Procedure in "Using FOC Software" and syncofs =0. So I don't think I got there yet.I'm at the part in the bring up procedure for setting syncofs by adjusting it after you get it to spin - where you go up small steps in Manualid then adjust syncofs. I never got to where I can adjust syncofs because the motor wont spin (more than a few degrees. And I don't know what limits I should use for manualid. The default in the leaf parameter file is -400 to +400. I started at 0.
Should I start at -400?
(I don't understand the theory of what I am doing). Also when you say set manualiq > 0 , what like 100, 1, 1000
I can borrow high voltage probes from work (up to 30kv) to test the 3 phase output from the inverter, but not until the weekend.

CAUTION next two questions might be ignorant......
1. If the purpose of the this procedure is to find syncofs, could't I set it to 32768 and then set manualid to 5A and see what happens?
results not good, use binary search method to find the correct value?

2. Would all Leaf Motors, of the same vintage use the same syncofs?

With all the brilliant minds on this forum, seems like an auto tune could be accomplished.
Jerry Kauffman
jerryk48 at gmail dot com
arber333
Posts: 3261
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 231 times
Contact:

Re: Why won't the leaf motor spin?

Post by arber333 »

My experience would be to set iq to 0 and Id from 0 to something like 3 or 5. There I usually get motor spinning. I go a step back to 4 if motor is too wild.
Then I go and set syncoffset from 0 in steps of 1000. Usually motor stops turning before I come to 15000.
Oh, and you need to set (by hand) the rotor as close to 0deg resolver as possible.

Imagine IQ is one component of force to pull a rotor along. This is field component... Sort of. ID then is 90deg component that provides the pull. We need to find where rotor does not move with the force.

But this is with 360Vdc. If you have less your ID value will be higher.
User avatar
jerrykco
Posts: 120
Joined: Thu Dec 12, 2019 5:32 pm
Location: United States, Colorado
Has thanked: 10 times
Been thanked: 8 times
Contact:

Re: Why won't the leaf motor spin?

Post by jerrykco »

arber333 wrote: Fri Apr 17, 2020 12:03 am My experience would be to set iq to 1 and Id from 0 to something like 3 or 5. There I usually get motor spinning. I go a step back to 4 if motor is too wild.
Then I go and set syncoffset from 0 in steps of 1000. Usually motor stops turning before I come to 15000.
Oh, and you need to set (by hand) the rotor as close to 0deg resolver as possible.

Imagine IQ is one component of force to pull a rotor along. This is field component... Sort of. ID then is 90deg component that provides the pull. We need to find where rotor does not move with the force.

But this is with 360Vdc. If you have less your ID value will be higher.
Thanks Arber333. I am also using 360V. I will give it a try.
DO I understand this?

Set IQ to 1 then set ID 1 and go up by 1 until rotor spins slowly.
Once it spins slowly, then adjust syncofs to 1000 and keep adding 1000 until it stops.
Now stop inverter and then move rotor by hand to 0 degrees and see if syncofs setting found in last step keeps rotor from spinning when ID and IQ are set to their settings that caused the rotor to initially spin slowly.
Hopefully the Rotor wont spin.
Jerry Kauffman
jerryk48 at gmail dot com
arber333
Posts: 3261
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 231 times
Contact:

Re: Why won't the leaf motor spin?

Post by arber333 »

Yes, do this except set resolver to 0 by hand first before you start adding ID.
Oh and iq could also be 0. It's just Johannes said that firmware wants some value other than 0 so give it 1 so that you hear motor hissing. Than add ID until you get it turning. Be careful with adding values. Wait for some seconds as wifi needs som time to relay values.
User avatar
johu
Site Admin
Posts: 5759
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1005 times
Contact:

Re: Why won't the leaf motor spin?

Post by johu »

Almost, and I indeed forgot to mention it: manualid needs to be non-zero (e.g. 1) in order for manualiq to spin the motor.

This calibration procedure can be skipped with the Leaf motor and you can come back to it later: syncofs=0 isn't too far out. Just in case you want to see some spinny goodness.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
jerrykco
Posts: 120
Joined: Thu Dec 12, 2019 5:32 pm
Location: United States, Colorado
Has thanked: 10 times
Been thanked: 8 times
Contact:

Re: Why won't the leaf motor spin?

Post by jerrykco »

johu wrote: Fri Apr 17, 2020 6:53 am Almost, and I indeed forgot to mention it: manualid needs to be non-zero (e.g. 1) in order for manualiq to spin the motor.

This calibration procedure can be skipped with the Leaf motor and you can come back to it later: syncofs=0 isn't too far out. Just in case you want to see some spinny goodness.
SO today I tried the above Setting manualid to 1 and then set manualiq to 3. No spin. Then I tried manualiq to 10. Voilà, it started to spin up. Slowly at first and I thought great. But then I thought a jet was taking off in my room off the work bench. Wow. Scared the shit out of me. I killed the power and it took more than a minute to come down to Zero RPM. Later on, after recovering my wits, I tried it again, this time manualiq at 5. It did the same thing. I was going to try 4 but I'm a little gun shy now. But I certainly did get to "see some spinny goodness".
Jerry Kauffman
jerryk48 at gmail dot com
User avatar
johu
Site Admin
Posts: 5759
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1005 times
Contact:

Re: Why won't the leaf motor spin?

Post by johu »

:D
happened to me while the motor was in the car, glad my gear box is still in one piece. Thats why I recommend doing it with wheels jacked up to be able to use the disk brakes - but honestly who wants to wait that long for spinny goodness.
Anyway, now you know it runs fine and you can get back to tuning.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Kevin Sharpe
Posts: 1345
Joined: Fri Dec 14, 2018 9:24 pm
Location: Ireland and US
Been thanked: 4 times

Re: Why won't the leaf motor spin?

Post by Kevin Sharpe »

jerrykco wrote: Sat Apr 18, 2020 2:52 am But I certainly did get to "see some spinny goodness".
Congratulations :D
This is a personal post and I disclaim all responsibility for any loss or damage which any person may suffer from reliance on the information and material in this post or any opinion, conclusion or recommendation in the information and material.
Post Reply