Tesla Model S/X Large Drive Unit ("LDU")

From openinverter.org wiki
Revision as of 01:25, 14 June 2023 by Collin80 (talk | contribs) (Added a blurb about CAN control)
Jump to navigation Jump to search

The Tesla Model S/X Large Rear Drive Unit...

LDU Connectors

Purchase in openinverter shop

Parameters

Setup FAQ

Ampseal Connector Mapping

LDU connection diagram
HV wiring with precharge and main contactors
PIN NUMBER OEM OPEN SOURCE
1 IGN +12V IGN +12V
2 BRAKE ON N.O. BRAKE ON
3 BRAKE OFF N.C. PRECHARGE RELAY
4 CAN HIGH CAN HIGH
5 CAN LOW CAN LOW
6 CHG PROXIMITY MAIN CONTACTOR
7 HVIL IN FORWARD
8 HVIL OUT REVERSE
9 ENC +5V ENC +5V
10 ENC A ENC A
11 GND GND
12 ACCEL 1 +5V ACCEL 5V
13 ACCEL 1 ACCEL INPUT
14 ACCEL 2 BRAKE TRANSDUCER
15 ACCEL 1 GND ACCEL GND
16 ENC B ENC B
17 ENC GND ENC GND
18 ENC SHIELD ENC SHIELD
19 CAN HIGH OUT
20 CAN LOW OUT
21 ACCEL 2 +5V CRUISE IN
22 ACCEL 2 GND GND
23 12V ALWAYS T30 START

Tesla large drive unit logic board

This board replaces the original board that comes with the OEM Tesla drive train. As opposed to the latter this board lets you use the drive train in the first place and allows you to fine-tune driving behaviour with the usual set of openinverter parameters. It does not restrict you in power output or regen input.

You can fully control the board via CAN or via a set of digital and analog inputs.

Application Info

If you buy the board from the openinverter shop it comes programmed with a recent software version. Please check github for recent software releases. In addition the board comes with a set of parameters appropriate to run the Tesla LDU. So it will work out of the box. Parameters that must not be changed are hidden to eliminate sources of error.

You will need to solder the supplied connectors to the board. The drive unit connectors will plug right in.

To test run your drive unit, supply the board with 12V and GND on the Ampseal connector. Also supply 12V „Forward“ to select forward direction.

Supply inverter with some high voltage. For first tests it is recommended to put a large resistor/heating element/kettle in series.

You can start in manual mode using the button on the web interface and enter like 1Hz for „Fslipspnt“ and some value between 10-50 for „ampnom“ to see if the motor spins up. Be careful because manual mode does not enforce a motor speed limit! However, „Fslipspnt“ sets the base speed requested of the motor. Setting it to 1Hz will spin the motor very slowly. Setting it to 5, 10, or 15Hz will spin it progressively faster. For any given speed you will need to experiment with „ampnom“ to find a happy place where enough current is allowed to flow but not too much. Finding a good set of values should make your motor spin reasonably smoothly.

You may also set parameter „udcsw“ and „udcmin“ to 0 and start drive mode by pulsing 12V on „Start“. Then connect a pot between 5V, GND and „Pot“ (wiper). This will also spin the motor AND enforce a speed limit.

By default the inverter is controlled as above - by using digital I/O and directly connecting an accelerator pedal. However, it is also possible to control it directly over CAN: CAN communication

CAN control could be used to control the inverter via an external VCU such as the Zombie (not yet supported).

On Encoder Issues

It is not uncommon to have issues with the encoder on these drive units. The encoder is connected via a 4 wire cable from the 23 pin external connector of the drive unit to the encoder which is situated on the opposite side of the drive unit. The biggest sign of encoder problems is the motor "bucking" back and forth and not wanting to spin properly in the requested direction. It may spin the direction you've asked for but roughly and with great trouble. This situation needs to be corrected. There are a number of things that could be wrong:

  1. The wires may be broken. You should attempt a continuity check of each of the wires.
  2. The encoder signals may be backward. There are two channels - A and B. They must be presented to the inverter in the proper order. If this is in doubt, try swapping them.
  3. One of the encoder signals may be missing. As above, there should always be two channels. They're "quadrature" which means that they fire 90 degrees apart.

To check the encoder signals you should have either a logic analyzer or an oscilloscope. Both come in a wide range of prices. The encoder signal is not particularly fast, especially when the motor is not spinning that fast. As such, even cheap test equipment can be adequate. You may find that there is no particularly good place to connect to in order to read the encoder signals. But, there does exist a reasonable place - right at the 20 pin connector on the LDU board where the 23 pin external connector's wires are routed. If your logic analyzer or oscilloscope has little grabber adapters you can do something like in this picture:

ClipsOnPins-LDUEncoder.jpg


The pins on this connector are numbered starting with 1 at the far right and going more positive toward the left until you get to pin 20.

Pin Number Function
5 Encoder 5V Source
6 Encoder A Channel
7 Encoder B Channel
8 Encoder Ground


So, in the picture, channel 0 is connected to encoder 5v (to monitor that voltage is properly there), channel 1 is connected to the A channel of the encoder, channel 2 is connected to the B encoder channel, and scope ground is connected to the encoder ground wire. This allows for monitoring all of the relevant signals. But, keep in mind not to short any pins while doing this. Very fine probes will be needed and extreme caution not to clip two pins together. The clips/grabbers in this picture are from a Saleae Logic Pro 8. This is *NOT* your cheapest option for monitoring encoder signals but does work very well. It also doubles as a 50Mhz oscilloscope which can be handy. Cheaper options (including knock offs of Saleae Logic) do exist.





Here is a picture of what it may look like when one encoder signal is missing:

Note how Channel 1 shows an encoder signal but Channel 2 looks completely flat. This should not occur. If one is showing a signal, so should the other.


Another good way to check the encoder is to use the steps to enter manual mode but do not set „Fslipspnt“ nor „ampnom“. You need to not be in "Off" mode. In Off mode the speed and turns values do not update in the spot values. But, in manual mode they do. So, enter manual mode without asking for any speed, then turn the motor. With the motor spinning you should see some position feedback in the form of a non-zero speed value and the turns value should increment. If these things do not reliably occur then you may still be having encoder problems. If they do occur, still check to ensure that your A and B channels are the right way around.

Other considerations

The motor itself seems to run as well in the reverse direction as in the forward direction. However if you are running the gearbox integrated with the drive unit in reverse you will want to replace the gearbox's oil pump with a reverse oil pump. These can be found on ZeroEV. [1]