Page 5 of 31

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Thu Jul 16, 2020 5:33 pm
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?

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Thu Jul 16, 2020 6:02 pm
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."

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Thu Jul 16, 2020 6:26 pm
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?

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Fri Jul 17, 2020 6:35 am
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.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Fri Jul 17, 2020 6:38 am
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.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Fri Jul 17, 2020 6:42 am
by Jack Bauer
And a pcb view for good measure.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Fri Jul 17, 2020 7:01 am
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.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Mon Jul 20, 2020 2:34 pm
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.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Mon Jul 20, 2020 3:19 pm
by mdrobnak
For those not in the computer world - NMI - Non-Maskable Interrupt - ie, you have to stop. :)

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Tue Jul 21, 2020 1:55 pm
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.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Tue Jul 21, 2020 3:32 pm
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

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Tue Jul 21, 2020 4:15 pm
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...

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Tue Jul 21, 2020 4:25 pm
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

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Tue Jul 21, 2020 6:39 pm
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

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Tue Jul 21, 2020 8:55 pm
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.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Wed Jul 22, 2020 2:45 pm
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.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Wed Jul 22, 2020 3:22 pm
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:

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Thu Jul 23, 2020 6:53 am
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

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Thu Jul 23, 2020 6:57 am
by Jack Bauer
My pleasure. 90% of the problem with Tesla stuff is 90% of the people involved don't share.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Thu Jul 23, 2020 2:40 pm
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.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Fri Jul 24, 2020 2:00 pm
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.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Fri Jul 24, 2020 6:46 pm
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?

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Sat Jul 25, 2020 4:34 pm
by Kevin Sharpe
Fascinating project update for patrons 8-)

https://www.patreon.com/posts/model-3-drive-39701785

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Sun Jul 26, 2020 1:13 am
by ChazFisher
Nice work! I've got to admit, the modboard idea really intrigues me. Looking forward to seeing the schematic.

Re: Tesla Model 3 Rear Drive Unit Hacking

Posted: Sun Jul 26, 2020 10:02 am
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