Tesla Large Drive Unit Support Thread
-
- Posts: 12
- Joined: Thu Apr 23, 2020 2:30 am
- Location: Ventura, CA, USA
Re: Tesla Large Drive Unit Support Thread
Need some help on my LDU bench test.
Setup:
wiring base on github.com. 12V power supply with 4A limit, 2S LG Chem @ 118V, BMW E46 Pedal, original Ampseal connector with encoder cable section in place and plug in. Cutoff switch between Battery + to contactor. UDCSW=0, UDCMIN= 0, UCDNOM = 100. Firmware =4.00 (a bit old, I bought the card last year but my other setup wasn't ready yet...).
Test:
set main switch on. Turn on 12V supply, ignition contactor closed, engage start signal, main contactor closed (at this time all contactor is closed). switch on Drive Forward signal, depress pedal and the motor turns very slowly with jerking motion (pedal has to press all the way down, motor not turning at 1/2 way).
Questions:
Firmware is old and needs update, Is the updates on site same for all motor's? LDU, SDU... I don't really see the motor/board type (sorry if I missed). do I only need the foc.bin and sin.bin files? and no .hex files? https://github.com/jsphuebner/stm32-sin ... ag/v5.12.R
For the encoder, I am assuming I retain the original encoder portion of the Ampseal connector is good, is this correct? mainly do I have to split out and give its own 5V power? current version of firmware doesn't have option to change "encmode".
How fast would I expect the LDU to spin with 118V? with pedal full pressed, it barely spins. is this an encoder problem? or is it a pedal signal / calibration problem?
thanks.
Setup:
wiring base on github.com. 12V power supply with 4A limit, 2S LG Chem @ 118V, BMW E46 Pedal, original Ampseal connector with encoder cable section in place and plug in. Cutoff switch between Battery + to contactor. UDCSW=0, UDCMIN= 0, UCDNOM = 100. Firmware =4.00 (a bit old, I bought the card last year but my other setup wasn't ready yet...).
Test:
set main switch on. Turn on 12V supply, ignition contactor closed, engage start signal, main contactor closed (at this time all contactor is closed). switch on Drive Forward signal, depress pedal and the motor turns very slowly with jerking motion (pedal has to press all the way down, motor not turning at 1/2 way).
Questions:
Firmware is old and needs update, Is the updates on site same for all motor's? LDU, SDU... I don't really see the motor/board type (sorry if I missed). do I only need the foc.bin and sin.bin files? and no .hex files? https://github.com/jsphuebner/stm32-sin ... ag/v5.12.R
For the encoder, I am assuming I retain the original encoder portion of the Ampseal connector is good, is this correct? mainly do I have to split out and give its own 5V power? current version of firmware doesn't have option to change "encmode".
How fast would I expect the LDU to spin with 118V? with pedal full pressed, it barely spins. is this an encoder problem? or is it a pedal signal / calibration problem?
thanks.
-
- Posts: 656
- Joined: Sat Oct 05, 2019 6:50 pm
- Location: Northern California, USA
- Been thanked: 2 times
- Contact:
Re: Tesla Large Drive Unit Support Thread
You need the sine.bin or sine.hex file (either one works). Not FOC.
Not sure about the encoder wiring, I'll let someone with LDU experience chime in.
118v should be enough to really get it going, so be careful.
For bench testing it would be safer to get some coolant in the inverter, its thermal mass is low and they have burned up on the bench before.
The jerking sounds to me like an encoder problem.
If you turn the motor by hand, can you see the 'speed' and 'turns' values changing?
If you plot 'angle' do you get a nice increasing graph? (It should go up to 360 and back to zero).
These can all show you if the board is reading your encoder correctly.
Not sure about the encoder wiring, I'll let someone with LDU experience chime in.
118v should be enough to really get it going, so be careful.
For bench testing it would be safer to get some coolant in the inverter, its thermal mass is low and they have burned up on the bench before.
The jerking sounds to me like an encoder problem.
If you turn the motor by hand, can you see the 'speed' and 'turns' values changing?
If you plot 'angle' do you get a nice increasing graph? (It should go up to 360 and back to zero).
These can all show you if the board is reading your encoder correctly.
-
- Posts: 12
- Joined: Thu Apr 23, 2020 2:30 am
- Location: Ventura, CA, USA
Re: Tesla Large Drive Unit Support Thread
Isaac96, thanks for the overheat warning. My test setup is limited right now, I don't have room to insert the drive shaft to turn the motor, and my motor is missing one of the coolant intake coupling...

I plotted the angle and turn, if I am not mistaken that the "angle" is the angular position when the motor is turning, then I think there's something wrong. when I am NOT pressing, I logged values like a "step sine wave":

Did not notice any meaningful change to angle when pedal is pressed.
- johu
- Site Admin
- Posts: 6623
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 345 times
- Been thanked: 1486 times
- Contact:
Re: Tesla Large Drive Unit Support Thread
What you're seeing is slip frequency. Set fslipmin=0 to get rid of it.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 1055
- Joined: Tue Sep 17, 2019 8:33 pm
- Location: Raleigh, NC, USA
- Has thanked: 223 times
- Been thanked: 261 times
Re: Tesla Large Drive Unit Support Thread
If you have the original wiring harness from that LDU, you don't need to change encoder wiring. If the wiring harness is from a different LDU, in some rare cases you may have to flip A and B, but otherwise the original ampseal-to-encoder wiring is fine.Maverick441 wrote: ↑Mon Oct 18, 2021 1:24 am
For the encoder, I am assuming I retain the original encoder portion of the Ampseal connector is good, is this correct? mainly do I have to split out and give its own 5V power? current version of firmware doesn't have option to change "encmode".
If at first you don't succeed, buy a bigger hammer.
1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed Hot Rod Drag Week 2023 and 2024
https://www.youtube.com/@MangelsdorfSpeed
1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed Hot Rod Drag Week 2023 and 2024
https://www.youtube.com/@MangelsdorfSpeed
-
- Posts: 12
- Joined: Thu Apr 23, 2020 2:30 am
- Location: Ventura, CA, USA
Re: Tesla Large Drive Unit Support Thread
Well updating firmware was not successful. downloaded the latest firmware R5.11.R sine.bin and use the upload function on web interface. message indicate download complete, then status bar starts, but stuck at 57%:

waited for a long time and no change in status, no reaction from other buttons. I have no choice but to reboot the inverter card. It reconnected but all the parameters and spot section has rotating wheel with no values.

I attempt to upload again but it is the same for a few times. The contactor would click uncontrollably for a few second in some of the update attempts.
With the "upload complete" message, what is the meaning of the % status bar? what should be the typical update process like?
on the update section, there's also an option to "upload other files to update the web interface", am I missing this file for the new firmware?
Hope I didn't break my board...
- johu
- Site Admin
- Posts: 6623
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 345 times
- Been thanked: 1486 times
- Contact:
Re: Tesla Large Drive Unit Support Thread
You didn't break it. Since contactors are clicking make sure there is no HV.
Right now there is no valid firmware so the board will reboot every 2s and *should* allow to upload another update.
As long as there is no valid firmware you will not see parameters, as they are downloaded from the STM32
Upload complete means the file has been transferred onto the ESP8266 module. The percentage then shows the transfer from the ESP module to STM32
Right now there is no valid firmware so the board will reboot every 2s and *should* allow to upload another update.
As long as there is no valid firmware you will not see parameters, as they are downloaded from the STM32
Upload complete means the file has been transferred onto the ESP8266 module. The percentage then shows the transfer from the ESP module to STM32
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- Roadstercycle
- Posts: 118
- Joined: Mon Sep 23, 2019 10:28 pm
- Location: California
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
Re: Tesla Large Drive Unit Support Thread
Just to be clear, in the video or this frame of the video there is a red wire running down behind the 12 volt battery which runs to 2 Chrysler Pacifica batteries. Around 100 volts.Mowza wrote: ↑Mon Sep 06, 2021 12:58 pm While that certainly makes sense the reason I chose 12v was because that is exactly what was used in this video:
and it seems to work just fine for an initial low speed test. I do not see any other power source in it and everything seems to be wired to the battery on the table.
-
- Posts: 12
- Joined: Thu Apr 23, 2020 2:30 am
- Location: Ventura, CA, USA
Re: Tesla Large Drive Unit Support Thread
Finally got the firmware updated after a few attempt, works after I accidentally bump the voltage from 12.0V to 12.3V, which is closer to car battery voltage.

Also able to access encoder setting by this commend (from earlier post)

Default setting for encoder is A/B, which is jerking and very slow. I am able to get the motor to run smoothly and fast with "encoder mode = single", opposed to what Damien suggested... need to figure out why.
Next, will calibrate the throttle paddle, only reacting when the paddle is press down close to half way.
Thanks for all the help and suggestion.
the min value of my interface for fslipmin = 0.28...

Also able to access encoder setting by this commend (from earlier post)

Default setting for encoder is A/B, which is jerking and very slow. I am able to get the motor to run smoothly and fast with "encoder mode = single", opposed to what Damien suggested... need to figure out why.
Next, will calibrate the throttle paddle, only reacting when the paddle is press down close to half way.
Thanks for all the help and suggestion.
-
- Posts: 656
- Joined: Sat Oct 05, 2019 6:50 pm
- Location: Northern California, USA
- Been thanked: 2 times
- Contact:
Re: Tesla Large Drive Unit Support Thread
Okay, your encoder A/B might be switched.
Good to hear it's working otherwise!
Good to hear it's working otherwise!
- johu
- Site Admin
- Posts: 6623
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 345 times
- Been thanked: 1486 times
- Contact:
Re: Tesla Large Drive Unit Support Thread
Oh, you're right. Hmm, put it to neutral then, that should disable slip.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 12
- Joined: Thu Apr 23, 2020 2:30 am
- Location: Ventura, CA, USA
Re: Tesla Large Drive Unit Support Thread

I switch the pins for encoder A & B and reset the encmode to A/B. It works the same as previously with encmode = single. I will keep it this way.
However odd, I realized the motor is spinning opposite direction for both Forward and Reverse. I checked the wiring and pin on the Ampseal connector and it is correct. Would there be adverse effect to switch the F/R signal so the motor will run correctly?
Re: Tesla Large Drive Unit Support Thread
F and R are swapped on the Tesla board. Its normal.
Formerly 92 E30 BMW Cabrio with Tesla power
-
- Posts: 32
- Joined: Tue Apr 20, 2021 8:55 pm
Re: Tesla Large Drive Unit Support Thread
Does anybody have any experience with tuning the parameters for braking at low speed? When I brake, before coming to a complete stop the regenerative braking ramps up extremely violently. I have set the brake ramp-up time to about 10 seconds, so I can take my foot of the brake pedal for a second before coming to a stop, to temporarily solve the problem. I also tried tweaking the "brkrampstr" parameter, but I haven't been able to solve the problem. The problem occurs when decelerating beneath 10-5kmh or something like that.
Another question; What do you think is an acceptable "fmax" value? I saw Jon Volk is using 650. Isn't that a little to much? My current topspeed is about 175-180kmh on GPS, but it would be well appreciated if 200kmh was reachable.
Another question; What do you think is an acceptable "fmax" value? I saw Jon Volk is using 650. Isn't that a little to much? My current topspeed is about 175-180kmh on GPS, but it would be well appreciated if 200kmh was reachable.
-
- Posts: 1055
- Joined: Tue Sep 17, 2019 8:33 pm
- Location: Raleigh, NC, USA
- Has thanked: 223 times
- Been thanked: 261 times
Re: Tesla Large Drive Unit Support Thread
You can adjust brkmax and brknompedal to change the total amount of regen braking, that reduced the braking violence problem I was having in initial test drives.
If at first you don't succeed, buy a bigger hammer.
1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed Hot Rod Drag Week 2023 and 2024
https://www.youtube.com/@MangelsdorfSpeed
1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed Hot Rod Drag Week 2023 and 2024
https://www.youtube.com/@MangelsdorfSpeed
-
- Posts: 32
- Joined: Tue Apr 20, 2021 8:55 pm
Re: Tesla Large Drive Unit Support Thread
The problem is that I would like to benefit from the regenerative braking at higher speeds, but I don't want it to behave violently at low speeds.
These are my current parameters:
{
"boost": 2300,
"fweak": 258,
"fweakstrt": 400,
"fconst": 450,
"udcnom": 360,
"fslipmin": 0.84,
"fslipmax": 3.06,
"fslipconstmax": 9,
"sincosofs": 2048,
"fmax": 540,
"dirchrpm": 100,
"dirmode": 1,
"ocurlim": 1400,
"udcgain": 7.46,
"potmin": 470,
"potmax": 4095,
"pot2min": 4095,
"pot2max": 4095,
"potmode": 0,
"throtramp": 5.84,
"throtramprpm": 20000,
"ampmin": 0.34,
"slipstart": 55,
"brknompedal": -35,
"regenramp": 0.09,
"brknom": 0,
"brkmax": -55,
"brkcruise": -30,
"brkrampstr": 10,
"brkout": -10,
"bmslimhigh": 100,
"bmslimlow": -20,
"udcmin": 0,
"udcmax": 426,
"idcmax": 5000,
"idcmin": -5000,
"idckp": 2,
"idcflt": 9,
"tmphsmax": 85,
"tmpmmax": 300,
"throtmax": 100,
"throtmin": -100,
"iacmax": 5000,
"ifltrise": 10,
"ifltfall": 0,
"chargemode": 0,
"chargecur": 0,
"chargekp": 80,
"chargeki": 10,
"chargeflt": 8,
"chargepwmin": 0,
"chargepwmax": 90,
"idlespeed": 250,
"idlethrotlim": 50,
"idlemode": 3,
"speedkp": 0.09,
"speedflt": 5,
"cruisemode": 0,
"udcsw": 290,
"udcswbuck": 540,
"tripmode": 0,
"bootprec": 0,
"pwmfunc": 0,
"pwmgain": 100,
"pwmofs": 0,
"canspeed": 1,
"canperiod": 0,
"nodeid": 1,
"fslipspnt": 0,
"ampnom": 0
}
These are my current parameters:
{
"boost": 2300,
"fweak": 258,
"fweakstrt": 400,
"fconst": 450,
"udcnom": 360,
"fslipmin": 0.84,
"fslipmax": 3.06,
"fslipconstmax": 9,
"sincosofs": 2048,
"fmax": 540,
"dirchrpm": 100,
"dirmode": 1,
"ocurlim": 1400,
"udcgain": 7.46,
"potmin": 470,
"potmax": 4095,
"pot2min": 4095,
"pot2max": 4095,
"potmode": 0,
"throtramp": 5.84,
"throtramprpm": 20000,
"ampmin": 0.34,
"slipstart": 55,
"brknompedal": -35,
"regenramp": 0.09,
"brknom": 0,
"brkmax": -55,
"brkcruise": -30,
"brkrampstr": 10,
"brkout": -10,
"bmslimhigh": 100,
"bmslimlow": -20,
"udcmin": 0,
"udcmax": 426,
"idcmax": 5000,
"idcmin": -5000,
"idckp": 2,
"idcflt": 9,
"tmphsmax": 85,
"tmpmmax": 300,
"throtmax": 100,
"throtmin": -100,
"iacmax": 5000,
"ifltrise": 10,
"ifltfall": 0,
"chargemode": 0,
"chargecur": 0,
"chargekp": 80,
"chargeki": 10,
"chargeflt": 8,
"chargepwmin": 0,
"chargepwmax": 90,
"idlespeed": 250,
"idlethrotlim": 50,
"idlemode": 3,
"speedkp": 0.09,
"speedflt": 5,
"cruisemode": 0,
"udcsw": 290,
"udcswbuck": 540,
"tripmode": 0,
"bootprec": 0,
"pwmfunc": 0,
"pwmgain": 100,
"pwmofs": 0,
"canspeed": 1,
"canperiod": 0,
"nodeid": 1,
"fslipspnt": 0,
"ampnom": 0
}
-
- Posts: 1055
- Joined: Tue Sep 17, 2019 8:33 pm
- Location: Raleigh, NC, USA
- Has thanked: 223 times
- Been thanked: 261 times
Re: Tesla Large Drive Unit Support Thread
Your regenramp is below the minimum (yours is 0.09 and the parameter database says the minimum is 0.1) That may be causing an issue.
You could also try adjusting brkrampstr to change at what point regen torque is reduced.
You could also try adjusting brkrampstr to change at what point regen torque is reduced.
If at first you don't succeed, buy a bigger hammer.
1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed Hot Rod Drag Week 2023 and 2024
https://www.youtube.com/@MangelsdorfSpeed
1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed Hot Rod Drag Week 2023 and 2024
https://www.youtube.com/@MangelsdorfSpeed
- johu
- Site Admin
- Posts: 6623
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 345 times
- Been thanked: 1486 times
- Contact:
Re: Tesla Large Drive Unit Support Thread
Also try setting brkrampstr to 20 or even 30.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 111
- Joined: Thu Dec 03, 2020 5:03 pm
- Been thanked: 2 times
Re: Tesla Large Drive Unit Support Thread
Question about temperatures in the LDU. I'm proceeding cautiously with my initial road tests to make sure my coolant setup is sufficient. Also, as an American I have to constantly convert C to F... I drove the car around the block ~20mph and the temperature for tmphs quickly ramps up. At it's peak I saw it go a little above 50C. In my searches it sounds like the Tesla has some protection features around 100C but just wanted to see if what I'm observing sounds normal to everyone else. tmpm moves much more slowly....
Cooling setup is a Davies Craig pump that does 30.38 gpm, but I have it going through the battery coolant plates first and then the LDU. My batteries during testing are ambient (~70F).
Thanks for the help!


Cooling setup is a Davies Craig pump that does 30.38 gpm, but I have it going through the battery coolant plates first and then the LDU. My batteries during testing are ambient (~70F).
Thanks for the help!


- Boxster EV
- Posts: 481
- Joined: Fri Jul 26, 2019 9:32 pm
- Location: UK
- Has thanked: 56 times
- Been thanked: 48 times
Re: Tesla Large Drive Unit Support Thread
On my unit, presuming the temp readings were accurate, I think restriction kicked in at about 70c. So with 50 you’re okay.
Can you hear/feel coolant flowing through the pipework?
Can you hear/feel coolant flowing through the pipework?
-
- Posts: 111
- Joined: Thu Dec 03, 2020 5:03 pm
- Been thanked: 2 times
Re: Tesla Large Drive Unit Support Thread
Thanks @Boxster EV. I definitely feel coolant flowing through the pipes. I'll do a longer test drive to see if the temperature keeps creeping up. My big concern is that the coolant plates have very narrow passageways which is probably choking the flow. I may end up with either two pumps (one pushing through the batteries and one through the inverter).
Thanks!
Thanks!
- Boxster EV
- Posts: 481
- Joined: Fri Jul 26, 2019 9:32 pm
- Location: UK
- Has thanked: 56 times
- Been thanked: 48 times
Re: Tesla Large Drive Unit Support Thread
I think as long as coolant is moving and you have a sufficient size rad then you’ll be fine with one pump if ambient temperatures aren’t extreme.rjmcdermott81 wrote: ↑Sun Dec 05, 2021 7:19 pm Thanks @Boxster EV. I definitely feel coolant flowing through the pipes. I'll do a longer test drive to see if the temperature keeps creeping up. My big concern is that the coolant plates have very narrow passageways which is probably choking the flow. I may end up with either two pumps (one pushing through the batteries and one through the inverter).
Thanks!
- muehlpower
- Posts: 681
- Joined: Fri Oct 11, 2019 10:51 am
- Location: Germany Fürstenfeldbruck
- Has thanked: 14 times
- Been thanked: 134 times
Re: Tesla Large Drive Unit Support Thread
Since the temperature level of the battery and motor is very different (40 ° C to 70 ° C), some use two separate cooling systems, each with a pump, controlled as required.rjmcdermott81 wrote: ↑Sun Dec 05, 2021 7:19 pm Thanks @Boxster EV. I definitely feel coolant flowing through the pipes. I'll do a longer test drive to see if the temperature keeps creeping up. My big concern is that the coolant plates have very narrow passageways which is probably choking the flow. I may end up with either two pumps (one pushing through the batteries and one through the inverter).
Thanks!
-
- Posts: 111
- Joined: Thu Dec 03, 2020 5:03 pm
- Been thanked: 2 times
Re: Tesla Large Drive Unit Support Thread
A follow-up on my tmphs question for anyone who searches later with the same question/issue. I drove this morning for a longer period and the temperature continued to climb. It would jump rapidly when I gave it throttle and eventually built up to 70C with ~15 blocks of driving.
As a test I decided to take the batteries out of the loop tonight and it made a night and day difference. I did the same drive and the temperature never crossed 30C.
Long story short, don't narrow the cooling loop below 3/4". Good to go.
As a test I decided to take the batteries out of the loop tonight and it made a night and day difference. I did the same drive and the temperature never crossed 30C.
Long story short, don't narrow the cooling loop below 3/4". Good to go.
- johu
- Site Admin
- Posts: 6623
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 345 times
- Been thanked: 1486 times
- Contact:
Re: Tesla Large Drive Unit Support Thread
Alright, valuable piece of info. I wonder if it can be conserved in the wiki somehow? Under batteries? Or some new "best practise" page?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9