Setting up for syncofs FOC tune - advice sought

Post Reply
Jacobsmess
Posts: 644
Joined: Thu Mar 02, 2023 1:30 pm
Location: Uk
Has thanked: 324 times
Been thanked: 89 times

Setting up for syncofs FOC tune - advice sought

Post by Jacobsmess »

So, I've got a basic bench setup together following Damiens/Johannes' videos on the FOC tuning but I'd appreciate some communicty input.
At present I have 2 lexus UX300E modules for around 60V to a cheap chinese 20A breaker in parallel with a 240V 77W bulb, to a 20A fuse, the main "On" switch, and finally to the 80kw leaf inverter running the rev3 OI Leaf board, with power then returning to the battery. I'm running firmware 4.87.R-foc as Damien does in the FOC tuning video because I've been advised in the current firmware the "Run in Manual Mode" button no longer works, and whilst trying with the latest 5.30R this seems to be the case (no inverter whine or bulb lighting when selecting Manual mode).

My params are attached below but much of it is set to default, with a few tweaks for the Leaf setup, I believe I have this correct for the bench test and I've calibrated my throttle.

Upon selecting Manual mode and closing the main "On" switch I get inverter whine, UDC populates on the web interface and the bulb lights. Previously I then tried closing the breaker, this then blew the fuse (previously a 15A fuse).

I disussed with BigPie who sugested trying different settings for ManualID and to watch for changes in the bulb, previously set at 0, it was light, but not full brightness, I tried settings in 5A increments up to 20A but the bulb did not change in brightness at all.

The inverter still whines when going into Manual mode so I'm hopeful I've not killed anything when I previously bypassed the bulb but I'd like any advice on what may or may not be the issue. Previously I was also getting a Precharge error however at the last try I was not and there was no status error.

I've attached my params and will include a diagram of the setup and some photos when I get chance.

Any advice appreciated, I'm hesitent to bypass the bulb until I've got current control, especially given the previous fuse blowing.
Attachments
params250108-3.json
(1.3 KiB) Downloaded 15 times
Jacobsmess
Posts: 644
Joined: Thu Mar 02, 2023 1:30 pm
Location: Uk
Has thanked: 324 times
Been thanked: 89 times

Re: Setting up for syncofs FOC tune - advice sought

Post by Jacobsmess »

A diagram of the setup at present.
Attachments
20250108_200956.jpg
User avatar
uhi22
Posts: 1010
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 167 times
Been thanked: 570 times

Re: Setting up for syncofs FOC tune - advice sought

Post by uhi22 »

Maybe I'm wrong, but shouldn't a zero requested motor current lead to a (nearly) zero supply current? So the bulb would be off if zero current is requested. Any chance to measure phase voltages with oscilloscope?
Jacobsmess
Posts: 644
Joined: Thu Mar 02, 2023 1:30 pm
Location: Uk
Has thanked: 324 times
Been thanked: 89 times

Re: Setting up for syncofs FOC tune - advice sought

Post by Jacobsmess »

uhi22 wrote: Wed Jan 08, 2025 9:03 pm Maybe I'm wrong, but shouldn't a zero requested motor current lead to a (nearly) zero supply current? So the bulb would be off if zero current is requested. Any chance to measure phase voltages with oscilloscope?
Unfortunately I've not got a scope, although could buy a cheap one if this would be useful, or I may be able to borrow one.
So far I'm going off Damiens/Johannes' videos where the bulb lights dimly during precharge, and is then bypassed as as a result is extinguished (or may just glow dimmer still if memory stands).
Zieg
Posts: 260
Joined: Mon Apr 25, 2022 3:31 am
Has thanked: 122 times
Been thanked: 105 times

Re: Setting up for syncofs FOC tune - advice sought

Post by Zieg »

For the FOC manual offset tuning you aren't requesting torque though, you are adding current in a vector that is i believe perpendicular, so the idea is that if the syncofs is right, you will be able to add a ton of current and the motor won't move. adjusting the syncofs up or down from the nominal value would cause the motor to turn in one direction or the other.

Is the motor connected to anything? I never tried mine unconnected (wanted to have the wheels on and be able to stomp the brake pedal if needed) but I needed a good bit more manualid current to get the thing to move. The closer to nominal you are, the more amps needed. I think I needed several tens of amps to get motion with the drivetrain attached and a syncofs that was 'out' by a few thousand digits.
Jacobsmess
Posts: 644
Joined: Thu Mar 02, 2023 1:30 pm
Location: Uk
Has thanked: 324 times
Been thanked: 89 times

Re: Setting up for syncofs FOC tune - advice sought

Post by Jacobsmess »

Thanks for the response, no the motor isnt connected to anything. I haven't even left the bulb precharge stage since blowing the fuse as I'm a little concerned things aren't set right firstly in the parameters. I'll have some more time to have a look today.
User avatar
uhi22
Posts: 1010
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 167 times
Been thanked: 570 times

Re: Setting up for syncofs FOC tune - advice sought

Post by uhi22 »

As first step, even before tuning anything, it needs to be assured that in "zero request" state, the inverter does not draw more than a small idle current. Maybe someone with a working setup could measure, how much current the inverter draws normally at 60V and zero request. I guess not more than a few hundred milliamps.
To compare different setups, it could help to know the DC voltage on the inverter (seems it is much less than 60V, because bulb is glowing and needs some ten volts to do this). Measure with multimeter on the inverter, this should show the same voltage as the U_DC in the web interface. Also measure the current in the same situation, using the ampere meter in series with the bulb. So we get an impression how the inverter behaves.
To further narrow the search window, you could disconnect the motor from the inverter and look if the current stays the same or drops. If the current stays high even with disconnected motor, I guess there is a short inside the inverter, either IGBT short or wrong control.
Jacobsmess
Posts: 644
Joined: Thu Mar 02, 2023 1:30 pm
Location: Uk
Has thanked: 324 times
Been thanked: 89 times

Re: Setting up for syncofs FOC tune - advice sought

Post by Jacobsmess »

uhi22 wrote: Thu Jan 09, 2025 8:11 am Measure with multimeter on the inverter, this should show the same voltage as the U_DC in the web interface.
I'll double check today bit this sounds right, the Web UI UDC is about 40v.
uhi22 wrote: Thu Jan 09, 2025 8:11 am Also measure the current in the same situation, using the ampere meter in series with the bulb.
Will do.
uhi22 wrote: Thu Jan 09, 2025 8:11 am you could disconnect the motor from the inverter and look if the current stays the same or drops.
Let's hope no shorts I'll disconnect the motor and have a look at things. Thanks for the guidance.
Jacobsmess
Posts: 644
Joined: Thu Mar 02, 2023 1:30 pm
Location: Uk
Has thanked: 324 times
Been thanked: 89 times

Re: Setting up for syncofs FOC tune - advice sought

Post by Jacobsmess »

So a setback....
Whilst setting up to test the inverter without the motor attached I stupidly connected the 12V and gnd to the inverter input backwards and fried IC6 on the OI board....
Appears this guy is the only victim on a visual inspection but I'm not electeonics savvy enough to diagnose the whole board.
I'll try replacing it and hope things fire up again. In the mean time I might revert to the stock board and zombie setup.
Before frying the IC I did a multimeter check across the inverter DC inputs terminals and the voltage was only 1.1V despite the webUI stating around 43V.
Attachments
17364152898097452552217865704007.jpg
User avatar
johu
Site Admin
Posts: 6429
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 293 times
Been thanked: 1388 times
Contact:

Re: Setting up for syncofs FOC tune - advice sought

Post by johu »

I just checked the code for 4.87.R and it disables PWM when setting manualid/iq to 0. So in this state you shouldn't hear inverter whine and there should be 0 current draw.

You can do the tuning with the latest firmware also, only Manual Mode has been made redundant. You just give it the regular start sequence and then adjust manualiX.

Oh, your setback just came in. The board has reverse polarity protection but apparently not the output drivers... So everything else should be fine.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Jacobsmess
Posts: 644
Joined: Thu Mar 02, 2023 1:30 pm
Location: Uk
Has thanked: 324 times
Been thanked: 89 times

Re: Setting up for syncofs FOC tune - advice sought

Post by Jacobsmess »

johu wrote: Thu Jan 09, 2025 9:57 am So in this state you shouldn't hear inverter whine and there should be 0 current draw.
That's interesting, so it appears I may have a faulty inverter in that case as the bulb was lit and the inverter whines, are there any parameters that might effect this kther than mandual Id/Iq?... the params I'm using are mish mash of settings I've found here and from the IPM tuning thread by Pete.

That's good to here that everything else should be ok, I've ordered a replacement IC, hopefully I can manage the SMD soldering without issue. Are all the ULN2003A ICs likely equivalent for this job?
I ordered these... https://www.ebay.co.uk/itm/233171826419 ... media=COPY
User avatar
johu
Site Admin
Posts: 6429
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 293 times
Been thanked: 1388 times
Contact:

Re: Setting up for syncofs FOC tune - advice sought

Post by johu »

Jacobsmess wrote: Thu Jan 09, 2025 12:49 pm Are all the ULN2003A ICs likely equivalent for this job?
I think yes. It is likely though that you don't even need this, unless you want to control the precharge relay and other things with the inverter
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Jacobsmess
Posts: 644
Joined: Thu Mar 02, 2023 1:30 pm
Location: Uk
Has thanked: 324 times
Been thanked: 89 times

Re: Setting up for syncofs FOC tune - advice sought

Post by Jacobsmess »

Interesting, so it may still work as it is? I will be using the zombieverter for control so no need for the IC (I will replace anyway as I have the parts coming now).
Thanks,
Now to find out why the bulb does not extinguish or get brighter....
Jacobsmess
Posts: 644
Joined: Thu Mar 02, 2023 1:30 pm
Location: Uk
Has thanked: 324 times
Been thanked: 89 times

Re: Setting up for syncofs FOC tune - advice sought

Post by Jacobsmess »

Ok, so some good news and some progress but still no cigar.
the OI board is seemingly unharmed except for the above mentioned exploded IC.
I reconnected everything last night and have now got manualID to control whether the bulb lights or not to confirm manual current control.
I've setup my parameters as below with pinswap set to 6 but I keep blowing fuses when I use the throttle and a overcurrent error. I did try other pinswap settings, one time at setting 4 I got a nice spin but very sudden stop with the throttle however this is no longer the case.
When I use manualID of 5 with syncofs at 0 or 1000 I get no movement but a light grinding sound from the motor.

Turning the motor by hand I get 4 revolutions of 360 plotted by the angle so I think the resolver is setup correctly but may be incorrect.
Attachments
params250112-3.json
(1.52 KiB) Downloaded 16 times
Jacobsmess
Posts: 644
Joined: Thu Mar 02, 2023 1:30 pm
Location: Uk
Has thanked: 324 times
Been thanked: 89 times

Re: Setting up for syncofs FOC tune - advice sought

Post by Jacobsmess »

So some progress.
I was having difficulty finding a syncofs that didn't send the motor off spinning to infinity rpm and then remembered that I'd used the stamped resolver value to calculate a syncofs setting previously.
20250102_131758.jpg
Based on this viewtopic.php?t=108 thread gives
So (0x77-0x80)*256 = -2304
Which didn't make sense at the time nor sound similar to anyone elses that I'd seen posted on here (syncofs of around 1000).
Then I saw on the FOC tuning wiki article https://openinverter.org/wiki/Using_FOC ... 360%C2%B0. that negative values are just subtracted from the max syncofs possible.
So giving me
65535-2304 = 63231
This resulted in a much better response, tuning up to 63500 and getting up to 120a for manualID (with a lot of screeching but no spinning), at which point ive not pushed it further.
I need to improve my bench setup if I want to tune further (cheap Chinese breakers overheating but not tripping, 40a RCB tripping, fuses blowing) but throttle response is smooth enough in forward (yet to test in reverse) and with manualIQ at 15 and manualID at 0.1 I get a steady smooth rotation.
Do I call it done at this point? Is there any harm that can occur from being close but not perfect? At least until I get the motor attached to the wheels and have a less janky bench setup with higher voltage....
User avatar
johu
Site Admin
Posts: 6429
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 293 times
Been thanked: 1388 times
Contact:

Re: Setting up for syncofs FOC tune - advice sought

Post by johu »

Sounds done to me
The noise is +-300 so no point in tuning it further
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Post Reply