Tesla Model 3 Rear Drive Unit Hacking

Topics concerning the Tesla front and rear drive unit drop-in board
JaniK
Posts: 391
Joined: Sun Aug 25, 2019 12:39 pm
Location: Finland
Has thanked: 49 times
Been thanked: 10 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by JaniK »

Vwbrady, I feel ya, I bought a M3 RDU when it happened to be cheap few years back (about when this thread had just started) and my project was so far from needing a motor. But went for a Leaf motor instead, when I reached a point where I needed to start making motor mounts and driveshafts etc. stuff, so I too have a M3 DU for "some day" project :lol:
Any opinions are my own, unless stated otherwise. I take no responsibility if you follow my way of doing things and it doesn't work. Please double check with someone who knows what they are doing.
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

Personally I think now is the time to buy an M3 drive unit before this firmware is made public.
I'm going to need a hacksaw
JaniK
Posts: 391
Joined: Sun Aug 25, 2019 12:39 pm
Location: Finland
Has thanked: 49 times
Been thanked: 10 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by JaniK »

Yep, that's why I still have mine. Don't want to get rid of it now, just to see that I want to buy another one later 8-)
Any opinions are my own, unless stated otherwise. I take no responsibility if you follow my way of doing things and it doesn't work. Please double check with someone who knows what they are doing.
Doig5710
Posts: 44
Joined: Wed Apr 22, 2020 6:41 am
Location: Rangiora, New Zealand
Has thanked: 44 times
Been thanked: 1 time

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Doig5710 »

Yup was exactly my thinking when I saw one for quite a cheap price, not sure I'd it's good or not but about as cheap as I'd seen them and perfect to get my project started
ArKamin
Posts: 2
Joined: Sun Jun 26, 2022 7:58 am

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by ArKamin »

Ok, ich war eigentlich auch zu früh und habe eine FDU und eine RDU auf Halde gelegt, waren halt günstig. Bis mein T3 Projekt soweit ist dauert noch ein Moment.
Bin noch am Anfang und bin mir nicht sicher ob die Übersetzung richtig war aber habe ich das richtig verstanden das mit dem Zombieverter es möglich sein wird die M3 F/R DU zu betreiben?
User avatar
vwbrady
Posts: 246
Joined: Mon Dec 16, 2019 1:18 am
Location: Seattle, WA
Has thanked: 5 times
Been thanked: 11 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by vwbrady »

glad to hear im not the only one hoarding a Model 3 RDU.
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

Let's see if we can try a different approach...
Attachments
unnamed2.jpg
I'm going to need a hacksaw
JaniK
Posts: 391
Joined: Sun Aug 25, 2019 12:39 pm
Location: Finland
Has thanked: 49 times
Been thanked: 10 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by JaniK »

You bought a new replacement drive unit?
Any opinions are my own, unless stated otherwise. I take no responsibility if you follow my way of doing things and it doesn't work. Please double check with someone who knows what they are doing.
davefiddes
Posts: 211
Joined: Mon Jan 18, 2021 12:39 pm
Location: Edinburgh, Scotland, UK
Has thanked: 14 times
Been thanked: 35 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by davefiddes »

I'm clearly not typing quickly enough! ;)
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

Far from it Dave:) We'd be nowhere on the firmware option without you.
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

For anyone looking for the 30 pin data connector on the drive units Toyota to the rescue : Toyota 90980-12712 (Sumitomo 6189-6987).
22Euros from my local dealer. Will report back once it lands.
I'm going to need a hacksaw
davefiddes
Posts: 211
Joined: Mon Jan 18, 2021 12:39 pm
Location: Edinburgh, Scotland, UK
Has thanked: 14 times
Been thanked: 35 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by davefiddes »

Congratulations on finding that. I spent 2 days straight looking through every automotive connector I could find on the distributor websites and TE Connectivity without success. Paid a fortune for an official wiring loom which turned out to have a slightly broken clip. Will investigate a replacement when I come to fitting into a vehicle.
JaniK
Posts: 391
Joined: Sun Aug 25, 2019 12:39 pm
Location: Finland
Has thanked: 49 times
Been thanked: 10 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by JaniK »

Great find Damien!
Any opinions are my own, unless stated otherwise. I take no responsibility if you follow my way of doing things and it doesn't work. Please double check with someone who knows what they are doing.
AMP3R
Posts: 37
Joined: Sun Oct 09, 2022 8:32 pm
Has thanked: 10 times
Been thanked: 3 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by AMP3R »

Hello there! Which of these drive units is better to buy? 1120980-00-G or 1120990-00-G or 1120990-00-H.
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by EV_Builder »

Is the milage of all three the same? Or what is your definition of "better"?
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
JaniK
Posts: 391
Joined: Sun Aug 25, 2019 12:39 pm
Location: Finland
Has thanked: 49 times
Been thanked: 10 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by JaniK »

AMP3R wrote: Sun Oct 09, 2022 8:36 pm Hello there! Which of these drive units is better to buy? 1120980-00-G or 1120990-00-G or 1120990-00-H.
Since nothing more than model number is stated, he propably wants the 980 model to have more umpf.

This is picture of my 990 series inverter and it doesn't have all the MOSFETs that the pcb would support.
M3RDU 990 series
M3RDU 990 series
The 990 has 6/channel and 980 8/channel
18/24 total
Any opinions are my own, unless stated otherwise. I take no responsibility if you follow my way of doing things and it doesn't work. Please double check with someone who knows what they are doing.
davefiddes
Posts: 211
Joined: Mon Jan 18, 2021 12:39 pm
Location: Edinburgh, Scotland, UK
Has thanked: 14 times
Been thanked: 35 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by davefiddes »

Yep. You want the 980 all things being equal. Don't know whether the current commercial inverter interface solutions make full use of the additional capability but it seems likely.
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

Model 3 drive unit. Round 3.








So what do we have here you may well ask. Thanks to a really nice person I now have my very own M3 Rear Drive Unit. As you may recall I have had an extended loan of some M3 parts for the past few years but in one sense was limited in what I could do with the drive units as they are not mine. No such restrictions now:)

So what is the state of play with making these guys run? Dave Fiddes is working away on the monumental task of writing a new firmware for the TI C2000 mcu based on the current openinverter FOC firmware. But as I fully understand he is just one guy with a life that gets in the way so its just a time question. In the meantime I am going to try 2 different approaches :

1)CAN. I know quite a bit more about M3 CAN now thanks to adventures with the PCS and charge port. Yes I know the immobiliser will stop me cold but its worth the journey even if we already know the destination.

2)Logic Board. No not a mod board but a complete replacement PCB for the M3 drive units. Why didn't I do this before? Well before we didn't understand much about how the board works. Now we understand about 90%. We know how the gate drivers are configured over SPI as an example. Another reason I didn't want to take this route was the complexity of the magnetics used in the gate drive power supply section. Now thankfully both Recom and Murata make gate drive DCDC converters specifically designed to power SiC mosfet power stages for about $8 each. So as one of my Patrons would say : Yay! Now don't worry we're not going to ask a poor STM32F1 medium density part to do all the work by itself. We'll take the lessons learned from the Model S/X drive units and also take a leaf from the OEM playbook : 2 MCUs :)

One medium density STM32F103 will be solely dedicated to the motor control function. See throttle, give torque. A second Connectivity line STM32F107 will look after external comms CAN and RS232 , Gate drive SPI, Oil pump LIN and all that fun stuff specific to the M3 inverter. This way the motor control part can run the standard OI firmware and can benefit from the updates that will surely happen over time. The 107 can have a specific firmware that can remain reasonably static once debugged. Finally, we'll put some nice fast hardware logic in there to prevent incorrect firing of gate signals and rapid shutdown on fault detection.



So there it is folks, the grand plan. With luck by the time I get this done Dave will have the TI firmware ready for test so we'll have multiple solutions. Of course all this will be opensource as usual. Am I mad? Probably. Let's see how much I can screw this up:)
Attachments
2022-10-07 15.04.01.jpg
I'm going to need a hacksaw
davefiddes
Posts: 211
Joined: Mon Jan 18, 2021 12:39 pm
Location: Edinburgh, Scotland, UK
Has thanked: 14 times
Been thanked: 35 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by davefiddes »

Be very interesting to see if you get anywhere on the CAN front. Others have done this so it is possible. Reusing all of the Tesla firmware engineering and understanding of how to best work their motor is not to be sniffed at (as I will no doubt demonstrate in the coming months/years...)

A new logic board is a pretty audacious project. Sounds like you are planning on reusing the existing gate drive architecture? That sounds like a good idea and fairly straight forward to clone. The STGAP1AS is a neat solution and we know how to drive and configure it now.

Your architecture sounds like a good approach. The old mod boards were adding too much special case system stuff to the main inverter code base which was just going to turn it into an unmanageable mess. Putting that on a separate MCU is a very good idea IMO. I plan on eventually doing something similar and having the main inverter running on one core and the rest of the system, configuration and monitoring managed by the other core. It's a nailed on certainty that this is how Tesla organise things...

Having the ability to reassign the main connector pins to an RS232 serial connection rather than two CAN buses is a great idea. The thing that's really slowing my project is the need to replace all of the existing openinverter configuration, control and datalogging capability with something that runs exclusively over CAN. No doubt it'll be useful to others when I get there but it's a ton of busywork in the meantime...
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by johu »

Great plans :)
I'd suggest connecting the CAN bus to both processors as it is actually more "standard" to have CAN comms on the motor control MCU
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

Should be an interesting project. Just got my desktop pc and desk setup in the house. Last booted April 6th so lots of updates before I can start working:)
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

Perfect fit:) Now to work on the pins.
Attachments
2022-10-21 13.04.24.jpg
2022-10-21 13.05.01.jpg
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

...annnd we have the pcb off. Actually quite a bit easier than the Model S SDU :) Reverse engineering work on the gate drive is next then starting a rough pcb layout.
Attachments
2022-10-21 14.47.00.jpg
2022-10-21 14.43.01.jpg
2022-10-21 14.42.51.jpg
2022-10-21 14.42.48.jpg
2022-10-21 14.42.45.jpg
2022-10-21 14.42.39.jpg
2022-10-21 14.30.47.jpg
I'm going to need a hacksaw
davefiddes
Posts: 211
Joined: Mon Jan 18, 2021 12:39 pm
Location: Edinburgh, Scotland, UK
Has thanked: 14 times
Been thanked: 35 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by davefiddes »

Cool. Lots of copper under there. Shouldn't think the gate drive will be too horrendous to reverse engineer especially now you've got multimeter access to both sides.
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Jack Bauer »

Made a start this morning. Helps that we can now get the datasheet for the STGAP1BS now as opposed to the 1AS.
Mr.M uses a N chan and P chan fet to boost the gate drive.
N-Chan : Infineon IPD50N04S3-08
P-Chan : STD45P4LLF6AG

Working out the descrete parts next.
Attachments
2022-10-22 13.20.04.jpg
2022-10-22 13.20.12.jpg
2022-10-22 13.21.12.jpg
2022-10-22 13.21.19.jpg
I'm going to need a hacksaw
Post Reply