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 »

Thanks for the offer. If people want to get involved I can put the modboards up for sale in the webshop on the understanding its sold as untested. What say you OpenInverter?
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 »

I can solder and assemble it, but honestly software part is not so much my friend here. If you feel it helps.

Is this solved yet? "will need Johannes to do a few firmware mods to trigger the gate drivers at the right time during power up."
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
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 »

No I keep forgetting. Again, how do I detect it's a Model 3 board and which pin do I need to toggle?
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 »

So for detection precharge out (PB1) and DCSW (PC13) are tied high via a 1k resistor.

VTG_OUT (PC11) needs to toggle upon entering run mode to enable the gate drivers.

PDF Schematic attached.
Attachments
Tesla_M3_RDU_V1 - Schematic.pdf
(256 KiB) Downloaded 178 times
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 »

Not much assembly to be honest. Just fitting the wifi header to maintain it as a "kit". Then its a task of wiring various points from the modboard to locations on the inverter pcb. This will need some video and documentation from me as I can't see anyone else publishing that kind of data.
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 »

And a pcb view for good measure.
Attachments
Tesla_M3_RDU_V1 - PCB.pdf
(149.86 KiB) Downloaded 154 times
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 »

By solder and assembly, I was referring to assembling it to the model3 inverter. / Wiring the modpoints. I will open my inverter this weekend to see it is physically intact. (From a crashed car anyways)

I understand that this untested modchip endeavour may result in smoke getting loose from inverter. But I will do my best to avoid it, because its pretty hard trying to get it back there, as electronics seems to be powered with it.
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 »

Back at the M3 stuff finally. So, Joahnnes has done the required software mods and I have done up the attached pinout so there ain't nothing left to do but do it:)

I'm getting inundated by emails from people looking for M3 drive unit and BMS boards. As Johannes says these just cause interrupts (NMI) and actually slow down the process so please just be patient a little longer.
Attachments
M3_ModBoard_V1_Pinout.pdf
(854.25 KiB) Downloaded 169 times
I'm going to need a hacksaw
User avatar
mdrobnak
Posts: 692
Joined: Thu Mar 05, 2020 5:08 pm
Location: Colorado, United States
Has thanked: 1 time
Been thanked: 5 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by mdrobnak »

For those not in the computer world - NMI - Non-Maskable Interrupt - ie, you have to stop. :)
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, pleased to announce success so far. Wired in the modboard with the following :

-Ground,5v and 3v3 from the Tesla board
-All 6 pwm + 3 driver enable signals
-CAN
-Current sensors

Custom software from Johannes works perfectly. Detects M3 board and fires the driver enable lines upon entering run mode. Spun a small motor open loop to prove driver functionality.

Next up : Resolver, HVDC sense and heatsink temp and we are ready to roll.
Attachments
2020-07-21 14.42.11.jpg
2020-07-21 14.00.46.jpg
2020-07-21 14.00.39.jpg
2020-07-21 14.00.31.jpg
2020-07-21 14.00.25.jpg
I'm going to need a hacksaw
User avatar
mdrobnak
Posts: 692
Joined: Thu Mar 05, 2020 5:08 pm
Location: Colorado, United States
Has thanked: 1 time
Been thanked: 5 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by mdrobnak »

Awesome progress! How will noise and such be handled when all is said and done? I would imagine large currents are going to cause an issue, right? I'm curious how the efficiency of these drivers stacks up to others given their exotic nature. (I want to say Silicon carbide for some reason, but that also sounds like PCCB brakes..)

-Matt
User avatar
clanger9
Posts: 203
Joined: Mon Oct 28, 2019 7:41 am
Location: Chester, UK
Been thanked: 1 time
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by clanger9 »

This is such awesome progress! Thanks (as ever) for sharing, Damien.
I'm following with interest, as I'd like to follow a similar modboard approach with my Prius 4 inverter...
User avatar
Kevin Sharpe
Posts: 1345
Joined: Fri Dec 14, 2018 9:24 pm
Location: Ireland and US
Been thanked: 4 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Kevin Sharpe »

mdrobnak wrote: Tue Jul 21, 2020 3:32 pm I want to say Silicon carbide for some reason, but that also sounds like PCCB brakes..)
Some useful info here;

viewtopic.php?f=10&t=69&start=30#p1792
This is a personal post and I disclaim all responsibility for any loss or damage which any person may suffer from reliance on the information and material in this post or any opinion, conclusion or recommendation in the information and material.
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 »

I took part my inverter and came here to tell I am ready to help, but it seems you allready found some time or got excited again about this. Better to see tests from the designer as troubleshooting goes much faster. :)

Anyways, I have my inverter now ready for the modchip.
If you have more of them in stock, I would like one.
IMG_20200721_212158.jpg
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.
rbray89
Posts: 2
Joined: Tue Jul 21, 2020 8:54 pm
Location: Colorado (United States)

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by rbray89 »

Oh wow, excellent progress. Very excited with this, as I'm eyeing using the full Model 3 rear subframe and drive assembly in a conversion.
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 »

Little more progress, lots more work. Wired up the heatsink temp sensor. Easy peasy as its read by a 3v3 adc on the TI micro anyway. Seems to be giving some reasonable readings with the "MBR600" setting in the inverter so we might get lucky. Bad luck with the HV bus monitor. Its a plain vanilla HCPL something something that provides a differential isolated output BUT Elon skimped on the summing amp to make it into a unipolar signal and they just use a pair of adcs on the TI micro to read it differentially. We don't have that option so we'll need a summing amp on the modboard. No big deal in any event.

Now the resolver was a real tour de force. Talk about over complicating something. At first it looked easy (doesn't everything), they use a DAC to pump out a nice 3v3 level sine wave, feed it to an exciter amp and all done..........but noooooo let's not do that. Instead lets use another DAC to make a sawtooth then a four channel op amp to do some funky summing/differentiating and send the result of THAT to the power amp. Makes perfect sense in MuskLand I'm sure. Anyway, good news is we can bypass that s$%tshow and go straight to the power amp. BAD news is the power amp has a fixed gain and needs about 700mv of signal to get max output amplitude. We're about ten times less than that after the filter so I'll be adding a nice cheap 4 channel opamp to the mod board to deal with all this.

GOOD news is they feed the sine and cosine through some nice signal conditioning straight to a pair of adcs Johannes style so we can just steal those signals and say thanks for the conditioning guys. So we do have some hope of a little closed loop run soon to prove it out then onto a V2 for the modboard, massive sales, big$$$ and retire to Lanzarote.
Attachments
2020-07-22 15.30.29.jpg
2020-07-22 15.30.27.jpg
I'm going to need a hacksaw
User avatar
clanger9
Posts: 203
Joined: Mon Oct 28, 2019 7:41 am
Location: Chester, UK
Been thanked: 1 time
Contact:

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by clanger9 »

That’s a deeply mad way of generating the exciter signal.
There must be a logic to it?
...
nope ...
not seeing it... :roll:
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, it is better you did it.

Out ofmyleague stuff here.

Very nice for you to share the info, maybe Iearn something on the way. Thanks
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 »

My pleasure. 90% of the problem with Tesla stuff is 90% of the people involved don't share.
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, fun times. Did some analysis on the stock Tesla exciter parameters. I'm guessing Elon must be a lurker on here because it was VERY similar to the Johannes circuit. Only problem was they bias at a higher voltage before going into the adc on the TI mcu so it wouldnt work out of the box. Well what if we altered the bias going into the power amp? Bingo! We can use the bias of the exciter drive to alter the bias on the sine and cos processed signals and bring them into happy stm32 teritory. Played about on a breadbord with an opamp and some resistors and came up with the pictured circuit. Works perfectly and gives excellent angle plots on the web interface.

Next up I'll see if I can use the spare side of the mcp602 to do the dc link measurements and then its V2 time.

Oh and found out what they use the sawtooth for.......but I'm not telling! Time to make millions on patents...........Just kidding! its used to create the exciter amp bias.
Attachments
2020-07-23 15.29.35.jpg
2020-07-23 15.26.23.jpg
2020-07-23 15.26.12.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 »

Some good progress today. Made a bodge board for the resolver signal circuit and it works great. Can now rotate the drive unit with its own inverter. Chasing a possible bug in the foc firmware. V2 schematic attached.

Overcurrent shutdown and stator temp monitoring confirmed working also.
Attachments
2020-07-24 14.12.41.jpg
2020-07-24 11.38.57.jpg
Tesla_M3_RDU_V2 - Schematic.pdf
(268.49 KiB) Downloaded 107 times
I'm going to need a hacksaw
rbray89
Posts: 2
Joined: Tue Jul 21, 2020 8:54 pm
Location: Colorado (United States)

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by rbray89 »

Jack Bauer wrote: Thu Jul 23, 2020 2:40 pm Oh and found out what they use the sawtooth for.......but I'm not telling! Time to make millions on patents...........Just kidding! its used to create the exciter amp bias.
Computer engineer here, so I'm more familiar with the digital than analog, but curious why they did that. Is that to get more fidelity out of the amplifier?
User avatar
Kevin Sharpe
Posts: 1345
Joined: Fri Dec 14, 2018 9:24 pm
Location: Ireland and US
Been thanked: 4 times

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by Kevin Sharpe »

Fascinating project update for patrons 8-)

https://www.patreon.com/posts/model-3-drive-39701785
This is a personal post and I disclaim all responsibility for any loss or damage which any person may suffer from reliance on the information and material in this post or any opinion, conclusion or recommendation in the information and material.
ChazFisher
Posts: 53
Joined: Wed Jul 03, 2019 1:32 am
Location: Central Virginia, USA

Re: Tesla Model 3 Rear Drive Unit Hacking

Post by ChazFisher »

Nice work! I've got to admit, the modboard idea really intrigues me. Looking forward to seeing the schematic.
Chaz Fisher
Slowly creeping up on that e-motorcycle.
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 »

V2 schematic and pcb layout now available on github :
https://github.com/damienmaguire/Tesla- ... Drive-Unit

Please note design source files will be only available via Patreon for a period of time:

https://www.patreon.com/evbmw
Attachments
2020-07-26 10.42.32.jpg
2020-07-26 10.42.17.jpg
I'm going to need a hacksaw
Post Reply