Tesla Model 3 Rear Drive Unit Hacking

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

GPIO72 (pin 139) goes to an led that flashes at about 10hz on power application.

GPIO84 (pin 154) goes to another led that flashes alternativly with the other. One red one green.
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 »

Just to be clear here while I am happy to explore the blank the TI device and port over the Openinverter system idea there are a few caveats:

1-Reading through the datasheet for the part, I am concerned about the code security module. I would bet my shiny new Keysight scope that Elon will be using that to prevent access to the memories. As to if it would stop the device being erased and reprogrammed with new code is uncertain.

2-the only option I will participate in is the porting of the openinverter. No instaspin or other nonsense.

3-My main focus is the modboard. I will (for as long as I have the drive units) be available to test TI device software options developed by the community.
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 »

So looks like the JTAG connector used on both front and rear inverters is : DF20F-10DP-1V(55) from Hirose. Available from RS :https://ie.rs-online.com/web/p/pcb-headers/6850722/

Now need to find a plug that fits.

EDIT : Matching plug : DF20A-10DS-1C
RS : https://ie.rs-online.com/web/p/wire-hou ... s/6850696/

Pins : DF20F-2830SCFA
RS : https://ie.rs-online.com/web/p/crimp-contacts/6850757/
I'm going to need a hacksaw
User avatar
station240
Posts: 12
Joined: Wed Jul 29, 2020 11:04 pm
Location: Australia
Been thanked: 2 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by station240 »

Ah GPIO72 and GPIO84 are tied to 3.3V via the LEDs then.
I was worried they wouldn't be attached to anything at all, given the size of the pins that would be an issue.

1. Yeah I worry about the various software locks that could be fitted also, but given the complete lack of information we have to try and see.
In theory it could be reprogrammed over CAN but I suspect there are encryption keys for that.

2. Instaspin isn't an option, TI didn't feel like porting it to this micro. :roll:
It's a pain to use anyway, took me 2 days just to get it to compile on a micro it is supported on.

3. Fair enough, it's a lot of work just figuring out the pin out of the device.
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 »

What JTAG tool would you recommend?
I'm going to need a hacksaw
User avatar
station240
Posts: 12
Joined: Wed Jul 29, 2020 11:04 pm
Location: Australia
Been thanked: 2 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by station240 »

I've been using the XDS100-V2, as it's one TI build into their own Dev boards.
Not seen anyone selling a version with the HV isolation though.
https://www.olimex.com/Products/DSP/Emu ... XDS100-V2/

TI have also shared all the design files to make your own.
"Q: Where can I get the design / schematic / BOM for the XDS100v2"
https://processors.wiki.ti.com/index.ph ... mmended.29
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 »

Ordered from Olimex. Also have what I hope is the right connector and pins for the jtag port on the way so we'll see what happens.

In other news , V2 modboards on the way from JLCPCB so should be with me in a few days.
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 »

That was fast. Can I have 1? ;)

Assuming it works out as you intented of course.
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 »

Of course you can have one:) Will be on sale soon all going well :
https://www.evbmw.com/index.php/evbmw-w ... u-modboard

In other news in honor of the recent success at SpaceX I got me a LaunchPad:)
Attachments
2020-08-03 10.53.06.jpg
I'm going to need a hacksaw
User avatar
johu
Site Admin
Posts: 5775
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1018 times
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by johu »

Sounds interesting :) Due to lack of time I can't be of any assistance in porting the software to C2000. Quick and dirty solution would probably be porting the relevant parts of libopencm3 to C2000, I suppose.
Really cool solution would be to create an openinverter specific HAL that bundles all peripheral access. But again, I don't have time for that right now.
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 »

That's why we have the modboard:)
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 »

Just arrived:)
Attachments
2020-08-03 14.41.15.jpg
2020-08-03 14.41.26-2.jpg
I'm going to need a hacksaw
MX5EV
Posts: 7
Joined: Mon Jun 08, 2020 4:52 pm
Location: New Hampshire, USA

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by MX5EV »

I purchased this Launchpad I'd definitely be willing to help as well. Though I don't have a ton of experience programming TI parts. I'm going to try and figure out how to blinking the LEDs mentioned.

Hopefully, once we end up with these motors overflowing at junkyards the price will come down.
User avatar
station240
Posts: 12
Joined: Wed Jul 29, 2020 11:04 pm
Location: Australia
Been thanked: 2 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by station240 »

One downside of that TI Launchpad board is not all the signals are available.
There is a very tiny connector on the underside with some extra signals, it's cell phone connector small, and TI never did release that addon board to break it out.

Oh and only CANB is connected to a transceiver, CANA needs an extra transceiver chip added (think I'd had bad luck getting that to work)
To be honest we probably need a custom made TMS320F28379D board, for development as Drive Unit PCBs are kinda expensive and come with a heavy lump attached.

I have my own custom TI board for a different processor, however it's just a block of blank PCBs and components till I get everything I need to assemble one. It does have Isolated CAN and JTAG over USB, which I could re-use.
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 »

Have you found anything in the resolver signaling "sawtooth" or other parts in inverter that would prevent running the M3RDU in reverse?
Attachments
Allmost there..
Allmost there..
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 »

Nope. And with the electric oil pump it can go full bore in reverse without and mechanical mods. Now I just need to make some time to fit and test the new modboard....
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 »

Cool. Thanks for fast answer. :)
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 »

Finally back at the M3 rear du. Time to swap out the old V1 modboard for the V2 and see if we can run closed loop with the inverter back on the drive unit:)
Attachments
20200929_141127.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 »

Also since I've been away seems this guy has had some major success :)
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 »

Good news is the V2 modboard resolver circuit is working perfectly. We are now driving the original Tesla amp and reading back via their filter. BAd news is it seems my current sensor signs are flipped so no foc tuning today.
Attachments
2020-09-30 14.20.56.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 »

Ok I'm an idiot. Just had to set il gains and ocur lim to negative and we have full closed loop control:)

Muhahahah.....hahah......waahhhhahahahahah
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 »

Good work and great news!

What happened with the oil choice?
Is there a good choice or just random choice?
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 »

I have a gallon of Dexron 6 waiting.
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 »

At this time I have decided to do a full opensource release of all design sources:)
More updates and video to following including testing in a M3 front DU.
https://github.com/damienmaguire/Tesla- ... Drive-Unit

Rear drive unit now responding to throttle commands in both directions with regen.
To Do :
Secure mod wires.
Button up the inverter
360v full test.
Make install video showing every step (super boring) in a front DU
Run front DU
Retire to Lanzarote on the profits.
I'm going to need a hacksaw
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 »

Great!
Front DU is induction IIRC, does that make for easier tuning and probably easier integration into vehicles?
Post Reply