How hard is it to kill a Tesla LDU encoder?

Topics concerning the Tesla front and rear drive unit drop-in board
Post Reply
jangell
Posts: 5
Joined: Sun Jun 04, 2023 7:59 pm

How hard is it to kill a Tesla LDU encoder?

Post by jangell »

I have a Tesla LDU with a new OpenInverter board running the latest firmware. I'm doing low-voltage tests with two UB12350 12v scooter batteries. They're not super powerful, but they will turn the motor.

The problem is that the motor doesn't turn smoothly. I'm getting that jogging/cogging/clunking thing that implies the encoder wires are swapped. I've read through a lot of forum posts trying to figure out how to fix this.

I'm using the default inverter settings, except:
- udcmin is 0v
- udcsw is 15v
- potmin and potmax were adjusted for my throttle.

What I've done so far:
- Swapped the encoder wires. Same result.
- Unplugged the encoder entirely. Same result.
- Tried changing encmode to A, but that had no effect (I set it back to AB, which as I understand it is what Tesla motors should always be set to due to the quadrature encoder).

I then wanted to test the encoder itself. Since I don't have an oscilloscope to play with, I connected it to a logic analyzer. I powered the encoder directly with a 5v bench power supply. It was not connected to the OpenInverter board, which I used to spin the motor with a dedicated 12v power supply and the two 12v batteries. My motor didn't come with shafts, so it's difficult to spin it diff by hand; I'm assuming that you have to hold one side still while you turn the other side for the encoder to pulse. Having the OpenInverter board turn it seemed simpler.

Now, importantly, I screwed up my encoder test by mistakenly swapping the 5v and ground from my ben ch power supply to the encoder. I feel like this PROBABLY didn't kill the encoder, but I'm not entirely sure, mostly because I don't know how this particular encoder works (is it hall-based or optical or what) and how sensitive it is to reverse polarity. I feel like it's probably fine, but since I could never get anything out of it to begin with, I'm not entirely sure.

Mind you, it wasn't working before I reversed the polarity, so that's not the root cause of my problem.

So my questions are:
- How can I be sure the encoder works?
- Did I kill the encoder with reverse polarity?
- if I did, does anyone know the part number of the encoder so I can replace it?
- Is there a way to see the raw encoder values in the OpenInverter web interface? I never see the speed (rpm) or turns change, and angle just steps up forever even if the throttle is up, like in this post: viewtopic.php?p=32932#p32932 .

Thanks!

-- Joe
jangell
Posts: 5
Joined: Sun Jun 04, 2023 7:59 pm

Re: How hard is it to kill a Tesla LDU encoder?

Post by jangell »

Replying to my own thread: The part number appears to be 1002722, and they're not hard to get from ebay (although you have to wait 2-4 weeks for it to come from China). I may order a couple just in case.

I pulled the sensor and found some drops of liquid on it. Now I'm wondering if I should replace the seals, or see how it runs in the car first. From the outside, the motor appears to be in extremely good shape, but I don't know how many miles were on it before I got it.

I still need to figure out why I don't seem to be getting a signal from the encoder, though.

-- Joe
collin80
Posts: 110
Joined: Sun Aug 30, 2020 3:28 pm
Location: United States, Michigan
Been thanked: 4 times
Contact:

Re: How hard is it to kill a Tesla LDU encoder?

Post by collin80 »

I updated the wiki page for the LDU so you may want to look there. But, one thing I found is that RPM and turns do not change unless the inverter is activated. You can have it in manual mode for that. Just tell the webpage to put the inverter in manual mode and then don't tough the controls for manually spinning the motor and instead try to spin it yourself. You should see RPM and turns changing if the encoder is working.

As for whether you killed the encoder with reverse polarity - I'd think it's a lot more likely than you seem to. Usually electronics really do not like reverse polarity and many things don't have protection for it. I'm not about to test that theory on my encoder.
jangell
Posts: 5
Joined: Sun Jun 04, 2023 7:59 pm

Re: How hard is it to kill a Tesla LDU encoder?

Post by jangell »

Sorry for the very long delay in getting back to this thread; other projects took my attention for a bit. Thanks for the tip about making sure the inverter is activated -- I didn't think of that, but it does make sense.

I got some more Hall sensors and tested them, and had the same results.

What finally worked was replacing my hand-built wiring harness (with new 23-pin and 4-pin connectors, and a butchered shielded ethernet cable to the Hall sensor) with a used Tesla harness. I had assumed that a new custom-built harness would be better than a used one, but I had a lot of trouble getting the 4-pin connector properly assembled, which I think may have kept it from seating properly.

After switching to the Tesla harness, the LDU properly read a signal from the Hall sensor when I turn the motor by hand.

So, progress! Except that I'm still getting cogging in a low-voltage test, and the motor isn't turning very fast. I'll start another thread on that.

Thanks!

-- Joe
User avatar
mane2
Posts: 171
Joined: Fri Jan 13, 2023 6:32 am
Location: Finland
Has thanked: 18 times
Been thanked: 6 times

Re: How hard is it to kill a Tesla LDU encoder?

Post by mane2 »

I have tested encoder with wires the wrong way and the right way. It survived :) Easy to test with just basic multimeter too. Give it 5V and put some metal against side of it. Reading the signal wire and ground will change when close to metal. Other channel shows 5V when you bring metal close and other goes to 0V.
Post Reply