Page 22 of 26

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Mon Aug 29, 2022 5:15 pm
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:

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Tue Sep 13, 2022 8:09 am
by Jack Bauer
Personally I think now is the time to buy an M3 drive unit before this firmware is made public.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Tue Sep 13, 2022 9:18 am
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-)

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Tue Sep 13, 2022 6:23 pm
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

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Wed Sep 14, 2022 2:25 am
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?

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Mon Sep 19, 2022 10:50 pm
by vwbrady
glad to hear im not the only one hoarding a Model 3 RDU.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Fri Oct 07, 2022 4:10 pm
by Jack Bauer
Let's see if we can try a different approach...

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Fri Oct 07, 2022 4:56 pm
by JaniK
You bought a new replacement drive unit?

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Fri Oct 07, 2022 9:34 pm
by davefiddes
I'm clearly not typing quickly enough! ;)

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Sat Oct 08, 2022 1:48 pm
by Jack Bauer
Far from it Dave:) We'd be nowhere on the firmware option without you.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Sat Oct 08, 2022 1:50 pm
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.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Sat Oct 08, 2022 3:56 pm
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.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Sat Oct 08, 2022 8:38 pm
by JaniK
Great find Damien!

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Sun Oct 09, 2022 8:36 pm
by AMP3R
Hello there! Which of these drive units is better to buy? 1120980-00-G or 1120990-00-G or 1120990-00-H.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Mon Oct 10, 2022 8:05 am
by EV_Builder
Is the milage of all three the same? Or what is your definition of "better"?

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Mon Oct 10, 2022 8:28 am
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

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Mon Oct 10, 2022 8:38 am
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.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Sat Oct 15, 2022 7:18 am
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:)

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Sat Oct 15, 2022 10:45 am
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...

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Sat Oct 15, 2022 4:29 pm
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

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Sat Oct 15, 2022 6:21 pm
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:)

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Fri Oct 21, 2022 12:26 pm
by Jack Bauer
Perfect fit:) Now to work on the pins.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Fri Oct 21, 2022 2:16 pm
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.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Fri Oct 21, 2022 4:21 pm
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.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Sat Oct 22, 2022 12:28 pm
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.