Tesla Model 3 Rear Drive Unit Hacking

Topics concerning the Tesla front and rear drive unit drop-in board
User avatar
Jack Bauer
Posts: 3831
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 75 times
Been thanked: 696 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

I had someone ask a few days ago about the oil pump pinout. Red = +12 , Blue=LIN , Black=GND.
Attachments
20250918_110429.jpg
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3831
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 75 times
Been thanked: 696 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

The V THREEEEEE!

Ordered all the out of stock parts from JLC. Aiming to order 10 boards in approx 2 weeks.

Major changes on the V3 from V2 :

-HF Resolver

-Terminal 15 input and permanent 12v input. No more turning off a live inverter. Input is PA2 on MCU. MCU controls board power via PA15 and active discharge via PE12.

-Protection diodes on all inputs.

-Hole alignment fixed (fingers crossed).

-Added 2 more names to the board of folks who are and have done a LOT of hard work on this project.
Attachments
M3DU_BoardV3.pdf
(2.62 MiB) Downloaded 37 times
Screenshot from 2025-09-19 09-03-17.png
Screenshot from 2025-09-19 09-04-38.png
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3831
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 75 times
Been thanked: 696 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

Gonna have to try and find an equivalent for this guy : https://www.st.com/resource/en/datashee ... llf6ag.pdf

https://www.mouser.ie/ProductDetail/STM ... BCoA%3D%3D

Possibly this guy : https://jlcpcb.com/api/file/downloadByF ... 8644498432

TJ60S06M3L

Any thoughts? Preferable something in stock at JLC.
I'm going to need a hacksaw
User avatar
Bratitude
Posts: 1080
Joined: Thu Jan 02, 2020 7:35 pm
Location: Canada
Has thanked: 222 times
Been thanked: 413 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Bratitude »

Jack Bauer wrote: Sat Sep 20, 2025 7:51 am Gonna have to try and find an equivalent for this guy : https://www.st.com/resource/en/datashee ... llf6ag.pdf

https://www.mouser.ie/ProductDetail/STM ... BCoA%3D%3D

Possibly this guy : https://jlcpcb.com/api/file/downloadByF ... 8644498432

TJ60S06M3L

Any thoughts? Preferable something in stock at JLC.
Digi key Canada has 2500 or so in stock of the STD45P4LLF6AG fets. How many do you want? I could order and send them to you
https://bratindustries.net/ leaf motor couplers, adapter plates, custom drive train components
User avatar
Jack Bauer
Posts: 3831
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 75 times
Been thanked: 696 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

Thats very kind thanks will see If I can get them here first.
I'm going to need a hacksaw
jrbe
Posts: 653
Joined: Mon Jul 03, 2023 3:17 pm
Location: CT, central shoreline, USA
Has thanked: 266 times
Been thanked: 186 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by jrbe »

Have you found this jlc search?
https://yaqwsx.github.io/jlcparts/#/
It's much better than jlc's. It fetches from their part lists and finds stuff you can't easily find on jlc's site. Takes a bit to update the lists but it's pretty quick after that. It can be a bit of a resource hog though.
User avatar
Jack Bauer
Posts: 3831
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 75 times
Been thanked: 696 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

Well, the M3 inverter "blew"

all the characteristics , bang and a wisp of smoke and no response to throttle
As I climb out shaking and hanging my head in shame my ears detect the 8.8khz resolver freq...

hmmm

oic dumpall

Gate drivers fine, inverter in run but udc only a few volts....

wtf?

Long story short, seems I exceeded the number of connect and disconnect cycles on the stupid hv connector

The "wings" had spread and arced

Squeezed them back in with a pliers, cleaned off the burnt plastic....

and the T3RD LIVES AGAIN!

Arc fault test report : Passed.
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3831
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 75 times
Been thanked: 696 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

Well, after all that fun when trying to run on HV (340v) inverter starts and idles fine but trips desat on all 3 high sides when throttle is pressed. Run fine on lv (around 45v). Params attached. Guess I'll need to get aquainted with the FOC params again.
Attachments
t3rd1.json
(2.12 KiB) Downloaded 33 times
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3831
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 75 times
Been thanked: 696 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

I'm guessing the very low (0.5mH measured with a cheap lcr meter) of the M3 motor is having some factor here.
I'm going to need a hacksaw
davefiddes
Posts: 375
Joined: Mon Jan 18, 2021 12:39 pm
Location: Edinburgh, Scotland, UK
Has thanked: 149 times
Been thanked: 195 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by davefiddes »

Eek. That's somewhat above my pay grade. Electric motors remain black magic to me...

There is a lot of useful information in the giant simulation thread: viewtopic.php?t=2611 with some useful discussion on how to measure the inductance of PMSM here viewtopic.php?p=46915#p46915
User avatar
uhi22
Posts: 1143
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 231 times
Been thanked: 638 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by uhi22 »

Just for the records, this means: Desat trip test report: PASS for all three phases. :-)
User avatar
Jack Bauer
Posts: 3831
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 75 times
Been thanked: 696 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

Well, I done screwed up again. Param changes made no real difference. Below around 80v inverter behaves fine. Much over we desat trip on all 3 high sides as soon as pwm even thinks about leaving the STM32. So I went back to the circuit diagram and probed a bit around the high side driver of an OEM board. Didnt take long to find the culprit. On the OEM board high side pin 19 is connected to VL. On the V2 (and V1) OI board pin 19 is floating. Best guess is once we got up on volts it started working the transistors enough to put some noise into that pin. I'll have to take the inverter back out of the car and put some links on to prove the point. Thankfully had not ordered the V3 batch as yet.
Attachments
Screenshot from 2025-09-24 12-32-18.png
Screenshot from 2025-09-24 12-31-56.png
I'm going to need a hacksaw
davefiddes
Posts: 375
Joined: Mon Jan 18, 2021 12:39 pm
Location: Edinburgh, Scotland, UK
Has thanked: 149 times
Been thanked: 195 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by davefiddes »

Doh! Fingers crossed it's that simple...
User avatar
Jack Bauer
Posts: 3831
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 75 times
Been thanked: 696 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

So found another problem on a re run through of the gate driver section. 4K7 resistors R1671 and R1681 in the attached were missed. At least now the diodes on the turn off resistors make sense. Confirmed after removing a high and low side driver chip that indeed pin 19 is tied to Vl on both high and low on OEM board. Gonna start the process of getting the inverter out of the car.
Attachments
Screenshot from 2025-09-25 11-34-30.png
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3831
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 75 times
Been thanked: 696 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

Ok. Update time.Mostly good news but not all the way yet. Got the inverter out of the car and did the mods as in the circuit diagram above. Two things happened. All the spurious high side desat trips at hv voltages stopped and as an added bonus the deadtime setting can be wound right back down to almost nothing without any ill effects. So started testing with 180v. Tripped off on "DESAT" as soon as throttle pressed but this time its not coming from the power stage. Rather SOMEONE left the desat pin on the mcu floating and with added voltages on the board it started picking up enough noise or leakage to trip off. Remapped it to a pin with a pull up and problem solved. Motor spins. Up to 240v next. OVERCURRENT trips as soon as throttle pressed. Wound up the current lim and away we go. Perfect spinning. Up to 360v. More overcurrent trips as soon as throttle pressed but this time even with current limit on the moon it still trips. Have seen this before on the SDU. Super tired and pained but happy with progress. Also VERY happy the board can take 360v with no flashes.
Attachments
20250925_140122.jpg
20250925_140117.jpg
20250925_140111.jpg
I'm going to need a hacksaw
davefiddes
Posts: 375
Joined: Mon Jan 18, 2021 12:39 pm
Location: Edinburgh, Scotland, UK
Has thanked: 149 times
Been thanked: 195 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by davefiddes »

The gate drivers are configured to have a deadtime of 800ns. If you go below this (deadtime param setting of 28 i believe) it'll start throwing DT faults and shutting down.
User avatar
Jack Bauer
Posts: 3831
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 75 times
Been thanked: 696 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

Well that was epic. Now running the M3 drive unit at full HV (sorry batt a bit low at 330v). Will give a propper update soon. Of course it wasn't just one problem but its now even smoother than before and spins up the motor with only 100mA.
Attachments
Screenshot from 2025-09-26 15-20-46.png
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3831
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 75 times
Been thanked: 696 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »



First tests with Regen and a 330V battery. No trips or judders. 1C temp rise on heatsink after doing this for about 30 mins.
Attachments
Screenshot from 2025-09-27 10-25-46.png
Screenshot from 2025-09-27 10-24-56.png
Screenshot from 2025-09-27 10-21-12.png
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3831
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 75 times
Been thanked: 696 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

V3 schematics and board layout now on Github. Review and board cleanup continues ahead of first real order.
https://github.com/damienmaguire/Tesla- ... ter/Design
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3831
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 75 times
Been thanked: 696 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

For fun and adventure I decided to hook the front drive unit up to the rear drive unit inverter and V2 board. Being a bit rusty on sine firmware I gave it gas. The inverter pumped 700 peaks amps into the motor , flash melted all 3 6mm sq leads into a pool, tripped desat and gave me the finger. Some new leads later it would seem the sine firmware thinks the rotor is turning when its stationalry. One plot is with sine and one with foc so looks to be a sw problem.
Attachments
Screenshot from 2025-10-01 15-19-30.png
Screenshot from 2025-10-01 15-14-45.png
I'm going to need a hacksaw
davefiddes
Posts: 375
Joined: Mon Jan 18, 2021 12:39 pm
Location: Edinburgh, Scotland, UK
Has thanked: 149 times
Been thanked: 195 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by davefiddes »

That's odd. It seems to be working for me:
Screenshot 2025-10-01 180433.png
This is what I get when I run my inverter in manual mode and run an uncalibrated nut round inside the resolver ring. This usually produces a much rougher signal than the official resolver rotor but still a stable angle that reflects the position/movement.

Can you provide your parameters? I think I had to change the encmode to HFResolver after I installed the sine firmware. I'm running with polepairs = 3 and respolepairs = 3.
User avatar
Jack Bauer
Posts: 3831
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 75 times
Been thanked: 696 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

I'll post the params tomorrow. Can you try run mode? I did not try manual today but can do tomorrow.
I'm going to need a hacksaw
davefiddes
Posts: 375
Joined: Mon Jan 18, 2021 12:39 pm
Location: Edinburgh, Scotland, UK
Has thanked: 149 times
Been thanked: 195 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by davefiddes »

Ooh, that's wild!
Screenshot 2025-10-01 182721.png
Should have tried normal run mode before...in my defence the button for manual mode was just there waiting to be pushed. I'll look into that tomorrow.
User avatar
manny
Posts: 165
Joined: Sun Jan 23, 2022 4:15 pm
Location: Netherlands
Has thanked: 38 times
Been thanked: 125 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by manny »

This is how it's supposed to work

https://openinverter.org/wiki/Parameters
Motor rotor angle, 0-360°. When using the SINE software, the slip is added to the rotor position.
This is not the physical angle, but a "virtual" angle. E.g. if your motor has four pole pairs (motor and resolver), then per one physical revolution the "angle" will change four times between 0 and 360°. Discussed here: viewtopic.php?p=71253#p71253
[DRIVING] Citroen Saxo electrique
  • Volvo ERAD motor, XC90 inverter/DCDC (custom OI board)
  • PSA battery (50kWh)
  • Foccci and MG ZS charger 6.6kW
  • Zombie VCU
User avatar
Jack Bauer
Posts: 3831
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 75 times
Been thanked: 696 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

I'm going to need a hacksaw
Post Reply