My LDU won't spin up correctly  [SOLVED]

Post Reply
OtterTech
Posts: 17
Joined: Mon Mar 02, 2026 1:54 pm
Location: Berlin, Germany
Has thanked: 2 times

My LDU won't spin up correctly

Post by OtterTech »

I'm currently working on a project in which I want to operate a LDU in a static test environment. Therefore the initial spinup test is basically my whole setup and I need it to work flawlessly. But I have issues:
  1. The LDU won't spin faster than 12.8 RPM, except when alowing for more rotor slip (about 23 RPM than)
  2. I constantly get Encoder Errors but I have checked the cable shield, the continuity and even swapped the sensor
  3. I often loose the connection between ESP and STM
Here is a video in which I go over my parameters and setup:

If you have any suggestions or questions feel free to comment, I will try to try them as soon as I'm back in the shop.
User avatar
catphish
Posts: 966
Joined: Fri Oct 08, 2021 11:02 pm
Location: Dorset, UK
Has thanked: 99 times
Been thanked: 197 times

Re: My LDU won't spin up correctly

Post by catphish »

Very slow speed is almost always the result of an encoder problem, and if you are getting encoder errors then that re-enforces this assumption. The first thing to try would be to swap the two data lines to the encoder, in case it is running backwards, and also triple check that its power supply polarity is correct. If possible, attach an osilloscope to the encoder data lines and turn the motor by hand, and see if they show clean signals.

To explain why this happens, the way the motor control works is that the sine wave sent to the motor is a specific frequency higher than the speed of the rotor (as measured by the encoder). So if the encoder always reads zero, then the sine wave frequency will always be the slip.

Losing connection between the ESP and the STM is a common problem, though I've never properly understood what causes it.
OtterTech
Posts: 17
Joined: Mon Mar 02, 2026 1:54 pm
Location: Berlin, Germany
Has thanked: 2 times

Re: My LDU won't spin up correctly

Post by OtterTech »

Before changing the encoder cable I did the pin swap and also had an oscilloscope attached to the data lines. I also tried a new encoder. Here are the results:

Cable swap to a properly shielded one: no change
Pin swap: no change
Encoder swap: no change
The oscilloscope had an incredibly noisy but recognizable quadrature signal.

I will definitively hook up an oscilloscope again and check the pinout.
Is there a reliable reference for the pinout as I had trouble finding something about the order of connection on the encoder side. The 23 pin is well documented.
OtterTech
Posts: 17
Joined: Mon Mar 02, 2026 1:54 pm
Location: Berlin, Germany
Has thanked: 2 times

Re: My LDU won't spin up correctly

Post by OtterTech »

Some updates but no change in the issues:

I connected a scope to the encoder on the oi board, directly to the STM pins here is the image I captured at 12.8 RPM:
Image

I also swapped the A and B pins on the encoder again without a change in behaviour.
P.S.Mangelsdorf
Posts: 1230
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 323 times
Been thanked: 349 times

Re: My LDU won't spin up correctly

Post by P.S.Mangelsdorf »

Please share your parameters
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed Hot Rod Drag Week 2023, 2024, and 2025

https://www.youtube.com/@MangelsdorfSpeed
OtterTech
Posts: 17
Joined: Mon Mar 02, 2026 1:54 pm
Location: Berlin, Germany
Has thanked: 2 times

Re: My LDU won't spin up correctly

Post by OtterTech »

All default except UDCmin, throttle via CAN and disabled regen. The end of the video has a slow scroll through
Attachments
params.json
(1.46 KiB) Downloaded 3 times
User avatar
johu
Site Admin
Posts: 7182
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 552 times
Been thanked: 1913 times
Contact:

Re: My LDU won't spin up correctly

Post by johu »

Those parameters look like the generic default, not based on an LDU set.
Take these and go from there: https://openinverter.org/parameters/view.html?id=33
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
OtterTech
Posts: 17
Joined: Mon Mar 02, 2026 1:54 pm
Location: Berlin, Germany
Has thanked: 2 times

Re: My LDU won't spin up correctly

Post by OtterTech »

johu wrote: Tue Apr 21, 2026 2:47 pm Those parameters look like the generic default, not based on an LDU set.
Take these and go from there: https://openinverter.org/parameters/view.html?id=33
I will try again using these parameters. Yes they are generic default. I assumed that they would work as a starting point for further tuning.
P.S.Mangelsdorf
Posts: 1230
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 323 times
Been thanked: 349 times

Re: My LDU won't spin up correctly

Post by P.S.Mangelsdorf »

OtterTech wrote: Tue Apr 21, 2026 3:59 pm Yes they are generic default. I assumed that they would work as a starting point for further tuning.
The best thing about the OI control board is you have control of every parameter. The worst thing about the OI control board is you have control of every parameter.

Its always good to start with a known set of parameters for that specific inverter/motor combination, if its available. There are plenty of parameters that are set-and-forget, that are the EV equivalent of telling an ECU "how many cylinders" or "displacement" or "cam profile", which may be very different between different inverters. You might get motion if they're wrong, but you won't get a good result.

The ones Johannes shared are a good starting point. I've also attached my old base tune. I've got to pull a more recent one off my workshop laptop at some point, but this one was a pretty good street tune with a base LDU.
Attachments
params.json
(1.69 KiB) Downloaded 4 times
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed Hot Rod Drag Week 2023, 2024, and 2025

https://www.youtube.com/@MangelsdorfSpeed
OtterTech
Posts: 17
Joined: Mon Mar 02, 2026 1:54 pm
Location: Berlin, Germany
Has thanked: 2 times

Re: My LDU won't spin up correctly

Post by OtterTech »

P.S.Mangelsdorf wrote: Wed Apr 22, 2026 12:17 am The ones Johannes shared are a good starting point. I've also attached my old base tune. I've got to pull a more recent one off my workshop laptop at some point, but this one was a pretty good street tune with a base LDU.
I will also have a look at those. Let's hope they work on performance LDU with the sole goal of running on a teststand.
OtterTech
Posts: 17
Joined: Mon Mar 02, 2026 1:54 pm
Location: Berlin, Germany
Has thanked: 2 times

Re: My LDU won't spin up correctly

Post by OtterTech »

OtterTech wrote: Tue Apr 21, 2026 11:34 am Some updates but no change in the issues:

I connected a scope to the encoder on the oi board, directly to the STM pins here is the image I captured at 12.8 RPM:
Image

I also swapped the A and B pins on the encoder again without a change in behaviour.
Any additional ideas reguarding the encoder setup? As far as I understand swapping the encoder A and B should result in notably different performance, which is does not for me. I'm still capped at 12.8 RPM, reguardless of voltage (tested 24-80V). Therefore I think that there is a different problem interfering with the performance before encoder issues can show.
Also there is a lot of noise on the signal that gets higher the more current flows through the inverter. I.e. when accelerationg and taking away throttle I have more noise. The signal is clean when idle (and turning the motor by hand).
User avatar
johu
Site Admin
Posts: 7182
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 552 times
Been thanked: 1913 times
Contact:

Re: My LDU won't spin up correctly

Post by johu »

No additional ideas, first try one of the parameter sets and report back. The noise might also couple into the test leads.

Be aware that not all parameters are shown (to keep you from changing them). Using the upload parameter function will apply them anyway. It means that trying to apply parameters manually will miss the most important ones.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
P.S.Mangelsdorf
Posts: 1230
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 323 times
Been thanked: 349 times

Re: My LDU won't spin up correctly

Post by P.S.Mangelsdorf »

OtterTech wrote: Wed Apr 22, 2026 9:18 am I will also have a look at those. Let's hope they work on performance LDU with the sole goal of running on a teststand.
Yes, a base tune will work in a sport/performance LDU. The sport version just allows you to turn up the power, which I've mostly done by raising fslipmax and lowering fweak. (I switched from a base to sport inverter)

There are two LDU tuning threads, on one of them Jon Volk has a good outline of what he found while tuning his LDU. What I've learned in addition to that is that the LDU is a bit sensitive to traction. If you have a lot of traction, it will very easily draw too much current and the phases will shut themselves down, requiring a full power cycle to restart. Jon's tune got a bit more aggressive than mine, I believe that was in part because he reached wheelslip before me. I'm still working on changes to chassis and tire setup to soften the hit and let me have more power.
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed Hot Rod Drag Week 2023, 2024, and 2025

https://www.youtube.com/@MangelsdorfSpeed
OtterTech
Posts: 17
Joined: Mon Mar 02, 2026 1:54 pm
Location: Berlin, Germany
Has thanked: 2 times

Re: My LDU won't spin up correctly

Post by OtterTech »

johu wrote: Wed Apr 22, 2026 9:53 am Be aware that not all parameters are shown (to keep you from changing them). Using the upload parameter function will apply them anyway. It means that trying to apply parameters manually will miss the most important ones.
I would have expected the hidden ones to be set by some flags in the hardware and should never be adjusted because they are correct for that hardware. I.e. number of phases on LDU won't change ever. I was already wondering why AB and BA encoder mode are not available anymore but you have to instead change the pins on the plug.
But if they have to be adjusted what is the correct way of going about it except uploading and maybe modifying a working tune? Downloading the parameters from the inverter does also hide the protected ones.
OtterTech
Posts: 17
Joined: Mon Mar 02, 2026 1:54 pm
Location: Berlin, Germany
Has thanked: 2 times

Re: My LDU won't spin up correctly

Post by OtterTech »

P.S.Mangelsdorf wrote: Wed Apr 22, 2026 11:47 am Yes, a base tune will work in a sport/performance LDU. The sport version just allows you to turn up the power, which I've mostly done by raising fslipmax and lowering fweak. (I switched from a base to sport inverter)

There are two LDU tuning threads, on one of them Jon Volk has a good outline of what he found while tuning his LDU. What I've learned in addition to that is that the LDU is a bit sensitive to traction. If you have a lot of traction, it will very easily draw too much current and the phases will shut themselves down, requiring a full power cycle to restart. Jon's tune got a bit more aggressive than mine, I believe that was in part because he reached wheelslip before me. I'm still working on changes to chassis and tire setup to soften the hit and let me have more power.
Well I won't ever experience any wheelslip as I won't have wheels :lol:
The setup is for a motor test stand to check drive units for bearing defects or inbalances. The whole thing will be used for motor repair in an independant EV repais shop.
User avatar
johu
Site Admin
Posts: 7182
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 552 times
Been thanked: 1913 times
Contact:

Re: My LDU won't spin up correctly  [SOLVED]

Post by johu »

OtterTech wrote: Wed Apr 22, 2026 5:32 pm I would have expected the hidden ones to be set by some flags in the hardware and should never be adjusted because they are correct for that hardware
Yes this would make sense in most cases. Just recently someone ran a synchronous motor with an SDU inverter, for whatever reason. It's niche but cool that it is possible.

What I do for the boards on the shop is flash a binary image with correct parameters and the ones hidden that mustn't be changed.

You can unhide by typing "flag <name> !hidden" to show it again.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
OtterTech
Posts: 17
Joined: Mon Mar 02, 2026 1:54 pm
Location: Berlin, Germany
Has thanked: 2 times

Re: My LDU won't spin up correctly

Post by OtterTech »

johu wrote: Tue Apr 21, 2026 2:47 pm Those parameters look like the generic default, not based on an LDU set.
Take these and go from there: https://openinverter.org/parameters/view.html?id=33
johu wrote: Wed Apr 22, 2026 7:58 pm Yes this would make sense in most cases. Just recently someone ran a synchronous motor with an SDU inverter, for whatever reason. It's niche but cool that it is possible.

What I do for the boards on the shop is flash a binary image with correct parameters and the ones hidden that mustn't be changed.

You can unhide by typing "flag <name> !hidden" to show it again.
I have now managed to correctly spin up the motor.
Loading the parameters from file / website proved difficult but the "flag <name> !hidden" command made it possible to merge my settings with the provided hidden ones.
I would think that an option like enabeling android dev mode by repeatadly sending the same command via CAN or tapping a button on the web UI might make it easier to do the initial setup or to simply check is somethin is a miss. -- Just a thought
Interestingly the Borad was bought directly from you but I might have reset it somehow at one time. Well now its running in AB mode with 36 PPR istead of Single mode with 60 PPR (and many more changes).
User avatar
johu
Site Admin
Posts: 7182
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 552 times
Been thanked: 1913 times
Contact:

Re: My LDU won't spin up correctly

Post by johu »

Yes maybe you hit the set default button at some point that was still displayed in old web frontends. It is now removed.

Good idea with dev mode, I'm sure Claude will do it for us :)
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
OtterTech
Posts: 17
Joined: Mon Mar 02, 2026 1:54 pm
Location: Berlin, Germany
Has thanked: 2 times

Re: My LDU won't spin up correctly

Post by OtterTech »

I think I reset via the CAN tool after it didnt work
Post Reply