Tesla Model 3 Rear Drive Unit Hacking

Topics concerning the Tesla front and rear drive unit drop-in board
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 »

JaniK wrote: Sat Oct 16, 2021 10:53 am I have an unmodified inverter sitting next to my PC..
Dammn you make me tempting togo after one my self too.... :D :D :D

I probably will because i still am in need of a front wheel drive motor. But i need tobe sure to have enough room for batteries so i better tackle that first...
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
dsp1108
Posts: 14
Joined: Sat Oct 16, 2021 5:27 pm

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by dsp1108 »

Hi guys!
I'm Dmitry from Russia.
It seems to me ... I was able to write a bootloder and foc program for tesla inverter 3.
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 »

Dmitry contacted me today and shared some videos of his work. He has an M3 inverter running custom firmware spinning a non Tesla motor! Fantastic work and welcome to the forum:)
I'm going to need a hacksaw
dsp1108
Posts: 14
Joined: Sat Oct 16, 2021 5:27 pm

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by dsp1108 »

If the moderator posts a video, then that will be good.

I am also ready to answer questions about the program.
dsp1108
Posts: 14
Joined: Sat Oct 16, 2021 5:27 pm

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by dsp1108 »

Thanks Jack Bauer!
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 »

Here is one of the videos of Dmitry's work :
I'm going to need a hacksaw
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by johu »

Keeps getting more interesting. Good job. What's the firmware based on? Is it on github?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Isaac96 »

Phenomenal! Well done!
collin80
Posts: 110
Joined: Sun Aug 30, 2020 3:28 pm
Location: United States, Michigan
Been thanked: 4 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by collin80 »

dsp1108 wrote: Sat Oct 16, 2021 5:49 pm If the moderator posts a video, then that will be good.

I am also ready to answer questions about the program.
!!! Otlichna! Horoshaya rabota!

Really, that's awesome! I hope we can all work together to make Tesla parts a bit easier to work with. You said you wrote FOC code and we can see in the video that it's some sort of other motor. Does that other motor also use a resolver or is it possible to interface an encoder to the M3 inverter? And, is your bootloader CAN based? Does it use UDS for firmware updates like the inverter does with the OEM firmware?
dsp1108
Posts: 14
Joined: Sat Oct 16, 2021 5:27 pm

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by dsp1108 »

I have been developing electronics for many years and got a Tesla inverter on occasion I have PMSM control projects, including for texas instrument processors.
I decided to transfer my code to a tesla inverter.
dsp1108
Posts: 14
Joined: Sat Oct 16, 2021 5:27 pm

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by dsp1108 »

The resolver is used.
Bootloader is first loaded via jtag.

Then the main program and calibrations are loaded through can.

Private can is for debugging and oscilloscope.

There is support for uds download, but it has not been tested.
jetpax
Posts: 15
Joined: Wed Jan 01, 2020 12:33 am
Been thanked: 1 time
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by jetpax »

You would be a total hero if you could share any of this with us mortals

I am especially interested in bootloader/CAN loader details, and how you use the private CAN for debugging and scope.

The M3 DU sitting in my garage would certainly appreciate it…
dsp1108
Posts: 14
Joined: Sat Oct 16, 2021 5:27 pm

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by dsp1108 »

I will prepare a bootloader project and post it.
A little bit later.
Now, I'm debugging the main program.
dsp1108
Posts: 14
Joined: Sat Oct 16, 2021 5:27 pm

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by dsp1108 »

What do you think of the idea to hack the tesla plaid inverter?

The probability, is more than 95 cents ...)))

The biggest problem, as I see it, is the squib.
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 »

dsp1108 wrote: Sun Oct 17, 2021 12:19 pm The biggest problem, as I see it, is the squib.
What is a squib?
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
dsp1108
Posts: 14
Joined: Sat Oct 16, 2021 5:27 pm

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by dsp1108 »

Breaks two of the three output buses.
dsp1108
Posts: 14
Joined: Sat Oct 16, 2021 5:27 pm

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by dsp1108 »

There is a consideration:
Break the squib activation circuit with voltage OFF.
And debug tesla plaid inverter.
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 »

How is it mounted / fixxed?
Can we emulate it's presence?

Who has this engine/inverter in the first place :)?
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
mikeselectricstuff
Posts: 120
Joined: Sun Nov 08, 2020 11:33 am
Been thanked: 2 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by mikeselectricstuff »

EV_Builder wrote: Sun Oct 17, 2021 12:31 pm
dsp1108 wrote: Sun Oct 17, 2021 12:19 pm The biggest problem, as I see it, is the squib.
What is a squib?
Shown here - pyro device to blow the busbars in case of a catastrophic fault

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 »

Yeah I remembered it. But again who has this engine / inverter?
Think we should first focus on the M3 engine it's more widely spread.
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
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 »

Good news : Harvested a FT2232 from a dev board, soldered to the jtag adapter, programmed and presto we are talking to Elon. Push fits perfectly into the horrible jtag socket.

Bad news : Design flaw! That 1k pull down resistor on ADBUS5? Should have been ACBUS5!! Gahhh. Anyway. Boards are fairly cheap from jlc without the ft2232 so I'll fix and order a fresh batch.
Attachments
2021-10-18 15.43.12.jpg
2021-10-18 15.43.02.jpg
I'm going to need a hacksaw
dsp1108
Posts: 14
Joined: Sat Oct 16, 2021 5:27 pm

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by dsp1108 »

Hello.
It seems to me, there is a simpler option:


Finished debugging 95 percent.
The loader will try to post on this week.
Attachments
IMG_20211018_181225.jpg
IMG_20211018_180645.jpg
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 »

Jack Bauer wrote: Mon Oct 18, 2021 2:52 pm Bad news : Design flaw! That 1k pull down resistor on ADBUS5? Should have been ACBUS5!! Gahhh. Anyway. Boards are fairly cheap from jlc without the ft2232 so I'll fix and order a fresh batch.
Sorry about missing that when I reviewed. That was my design fix too... :(
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 »

No worries Dave:) new boards ordered. At least we know it all works other than that.
I'm going to need a hacksaw
collin80
Posts: 110
Joined: Sun Aug 30, 2020 3:28 pm
Location: United States, Michigan
Been thanked: 4 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by collin80 »

dsp1108 wrote: Mon Oct 18, 2021 3:10 pm Hello.
It seems to me, there is a simpler option:


Finished debugging 95 percent.
The loader will try to post on this week.
That's only simpler if you can find the mating connector and successfully crimp the pins. Damien's board is a MUCH easier solution for everyone else. Since he's tested it to work (other than the one problem) I'd say he's in good shape and everyone is likely to want to go that route rather than crimping pins you need brain surgeon dexterity for.

I feel so lucky that the Model S board has 14 pin ARM JTAG headers right on it. No dinking around making things, just use a normal ARM JTAG cable and it works. Why couldn't they do that on the Model 3 as well?! XDS110 works great on a Model S controller too. It seems like they've went backward a bit in terms of accessibility. But, that doesn't really surprise me a whole lot.
Post Reply