Page 36 of 40
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Thu Sep 18, 2025 10:07 am
by Jack Bauer
I had someone ask a few days ago about the oil pump pinout. Red = +12 , Blue=LIN , Black=GND.
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Fri Sep 19, 2025 8:32 am
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.
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Sat Sep 20, 2025 7:51 am
by Jack Bauer
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Sat Sep 20, 2025 12:18 pm
by Bratitude
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
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Sat Sep 20, 2025 4:59 pm
by Jack Bauer
Thats very kind thanks will see If I can get them here first.
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Sat Sep 20, 2025 6:59 pm
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.
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Tue Sep 23, 2025 12:06 pm
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.
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Tue Sep 23, 2025 2:29 pm
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.
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Tue Sep 23, 2025 5:23 pm
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.
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Tue Sep 23, 2025 5:45 pm
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
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Tue Sep 23, 2025 7:25 pm
by uhi22
Just for the records, this means: Desat trip test report: PASS for all three phases.

Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Wed Sep 24, 2025 11:50 am
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.
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Wed Sep 24, 2025 12:37 pm
by davefiddes
Doh! Fingers crossed it's that simple...
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Thu Sep 25, 2025 10:37 am
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.
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Thu Sep 25, 2025 2:54 pm
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.
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Thu Sep 25, 2025 9:36 pm
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.
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Fri Sep 26, 2025 2:30 pm
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.
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Sat Sep 27, 2025 9:36 am
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.
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Mon Sep 29, 2025 6:15 pm
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
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Wed Oct 01, 2025 2:23 pm
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.
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Wed Oct 01, 2025 5:10 pm
by davefiddes
That's odd. It seems to be working for me:
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.
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Wed Oct 01, 2025 5:15 pm
by Jack Bauer
I'll post the params tomorrow. Can you try run mode? I did not try manual today but can do tomorrow.
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Wed Oct 01, 2025 5:29 pm
by davefiddes
Ooh, that's wild!
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.
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Wed Oct 01, 2025 5:45 pm
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
Re: Tesla Model 3 Rear Drive Unit Hacking
Posted: Wed Oct 01, 2025 7:28 pm
by Jack Bauer