Tesla Model 3 Rear Drive Unit Hacking
- uhi22
- Posts: 1143
- Joined: Mon Mar 14, 2022 3:20 pm
- Location: Ingolstadt/Germany
- Has thanked: 231 times
- Been thanked: 638 times
Re: Tesla Model 3 Rear Drive Unit Hacking
Sorry I'm late with the review of the schematics.
Regarding the throttle inputs: I'd propose to re-arrange TVS and the serial resistor, to make these inputs 12V tolerant. It is a good rule, to avoid circuits which are killed by just putting 12V on them. In best case, even +12V and -12V should not lead to smoke. So I propose to put the TVS behind the serial resistor, and not directly to the pin.
Regarding the throttle inputs: I'd propose to re-arrange TVS and the serial resistor, to make these inputs 12V tolerant. It is a good rule, to avoid circuits which are killed by just putting 12V on them. In best case, even +12V and -12V should not lead to smoke. So I propose to put the TVS behind the serial resistor, and not directly to the pin.
Github: http://github.com/uhi22 --- Patreon: https://www.patreon.com/uhi22
- Jack Bauer
- Posts: 3831
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 75 times
- Been thanked: 696 times
- Contact:
Re: Tesla Model 3 Rear Drive Unit Hacking
Yes but the front M3 drive unit is an induction motor not PM so am trying to run with sine firmware not FOC. Sine needs to know only rotor direction and rpm. In both screenshots above , the rotor is stationary. Sorry if am missing something obvious.manny wrote: ↑Wed Oct 01, 2025 5:45 pm This is how it's supposed to work
https://openinverter.org/wiki/Parameters
I'm going to need a hacksaw
- Jack Bauer
- Posts: 3831
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 75 times
- Been thanked: 696 times
- Contact:
Re: Tesla Model 3 Rear Drive Unit Hacking
So ran some more tests. Set fslipmin to 2Hz. In manual mode I can set a freq and ampnom and the rotor will turn as expected. In this case angle behaves as expected but speed(rpm) is always 0. In run mode upon starting the inverter injects current and 2Hz into the motor. Pressing the throttle increases current as expected but as the sw does not see motor rpm it just sits at 2Hz and keeps increasing current.
Edit : in fact rotordir remains at neutral so the control loop is not seeing direction or rpm.
Edit : in fact rotordir remains at neutral so the control loop is not seeing direction or rpm.
I'm going to need a hacksaw
- Jack Bauer
- Posts: 3831
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 75 times
- Been thanked: 696 times
- Contact:
Re: Tesla Model 3 Rear Drive Unit Hacking
Annnnnd.....forget all that its working perfectly 
I'm going to need a hacksaw
Re: Tesla Model 3 Rear Drive Unit Hacking
With the new board does this make the 990 have the same output potential as 980 models?
-
davefiddes
- Posts: 375
- Joined: Mon Jan 18, 2021 12:39 pm
- Location: Edinburgh, Scotland, UK
- Has thanked: 149 times
- Been thanked: 195 times
Re: Tesla Model 3 Rear Drive Unit Hacking
Good! I was at a loss to know what the problem could be.
Unfortunately not. The 980 has 4 pairs of mosfets per phase but the 990 has only 3 pairs. As with other OpenInverter boards you'll have free reign to configure the inverter to do what ever it can do with what it has got.
- Jack Bauer
- Posts: 3831
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 75 times
- Been thanked: 696 times
- Contact:
- Jack Bauer
- Posts: 3831
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 75 times
- Been thanked: 696 times
- Contact:
Re: Tesla Model 3 Rear Drive Unit Hacking
V THREEEE is ordered! Mars or bust.
I'm going to need a hacksaw
- Jack Bauer
- Posts: 3831
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 75 times
- Been thanked: 696 times
- Contact:
- johu
- Site Admin
- Posts: 6968
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 454 times
- Been thanked: 1771 times
- Contact:
Re: Tesla Model 3 Rear Drive Unit Hacking
Off-topic posts moved here: viewtopic.php?t=6707
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
davefiddes
- Posts: 375
- Joined: Mon Jan 18, 2021 12:39 pm
- Location: Edinburgh, Scotland, UK
- Has thanked: 149 times
- Been thanked: 195 times
Re: Tesla Model 3 Rear Drive Unit Hacking
I've been making steady progress on the firmware side of things. Nothing particularly glamorous. There have been problems with the reliability of configuration via CANopen SDO which are now fixed. I've also added support for fetching error logs from the inverter which works with the most recent OpenInverter CAN Tool release. A volunteer to add support to the esp32-web-interface would be nice...
I have made a bunch of changes to make sure that the firmware for this project is obviously distinct from johu's stm32-sine releases. Firmware builds (and releases in the fullness of time) are automatically tagged from the status of the git repo. This makes things more traceable to the project:
The version string always starts with "M3_DU" followed by the core version number. It'll start at 5.39 and follow normal semantic versioning going forward. The "test-2-ga39941c" part indicates that the version is two commits after the "M3_DU_v5.39_test" tag and has a short-hash of "a39941c" which you can look up in git if desired. The "dirty" suffix is added to indicate this build came from a git repo with uncommitted changes (bad Dave). Finally the "sine" suffix indicates this unit is running "SINE" firmware rather than "FOC". Changes to the git repo force a parameter database checksum change so that OpenInverter CAN Tool and esp32-web-interface will report the correct version string.
Official releases will be much shorter e.g. "M3_DU_v5.39.0-foc".
I've updated the README and made the "M3_DU" the primary branch on my project repo: https://github.com/davefiddes/stm32-sine
I have made a bunch of changes to make sure that the firmware for this project is obviously distinct from johu's stm32-sine releases. Firmware builds (and releases in the fullness of time) are automatically tagged from the status of the git repo. This makes things more traceable to the project:
Code: Select all
$ oic read version
version : M3_DU_v5.39_test-2-ga39941c-dirty-sine
Official releases will be much shorter e.g. "M3_DU_v5.39.0-foc".
I've updated the README and made the "M3_DU" the primary branch on my project repo: https://github.com/davefiddes/stm32-sine
- Jack Bauer
- Posts: 3831
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 75 times
- Been thanked: 696 times
- Contact:
Re: Tesla Model 3 Rear Drive Unit Hacking
Thanks Dave. Thats amazing work. With a bit of luck will have boards next week.
I'm going to need a hacksaw
- Jack Bauer
- Posts: 3831
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 75 times
- Been thanked: 696 times
- Contact:
Re: Tesla Model 3 Rear Drive Unit Hacking
Just to keep folks informed , Irish customs have seized the V3 boards for an "inspection". AFTER making me pay the import fees of course. If this follows previous precedent I'll have to prove I'm the importer , prove payment etc etc. Its a bit like the movies where the cop doing the ransom drop is ran around all the phone boxes in the city...Could be a few days or a few weeks 
I'm going to need a hacksaw
- johu
- Site Admin
- Posts: 6968
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 454 times
- Been thanked: 1771 times
- Contact:
Re: Tesla Model 3 Rear Drive Unit Hacking
Which carrier did you choose? Found UPS to be the least troublesome in that regard. But that is Germany after all...
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- Jack Bauer
- Posts: 3831
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 75 times
- Been thanked: 696 times
- Contact:
Re: Tesla Model 3 Rear Drive Unit Hacking
Yep. UPS. Previous experiences had been with DHL. Quickest customs turn around ever.
I'm going to need a hacksaw
- Jack Bauer
- Posts: 3831
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 75 times
- Been thanked: 696 times
- Contact:
Re: Tesla Model 3 Rear Drive Unit Hacking
Looks good. A request please. IF you are not posting about this project or another open source option then please start a new thread.
I'm going to need a hacksaw
- Bigpie
- Posts: 1845
- Joined: Wed Apr 10, 2019 8:11 pm
- Location: South Yorkshire, UK
- Has thanked: 89 times
- Been thanked: 481 times
Re: Tesla Model 3 Rear Drive Unit Hacking
Post moved.
BMW E91 2006
ZombieVerter
GS450h
Outlander Charger DC/DC
Outlander Compressor
Renault Kangoo 36kWh battery
FOCCCI CCS
ZombieVerter
GS450h
Outlander Charger DC/DC
Outlander Compressor
Renault Kangoo 36kWh battery
FOCCCI CCS
- Jack Bauer
- Posts: 3831
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 75 times
- Been thanked: 696 times
- Contact:
- Jack Bauer
- Posts: 3831
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 75 times
- Been thanked: 696 times
- Contact:
- Jack Bauer
- Posts: 3831
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 75 times
- Been thanked: 696 times
- Contact:
Re: Tesla Model 3 Rear Drive Unit Hacking
Getting boards ready for beta testers.
I'm going to need a hacksaw
- Jack Bauer
- Posts: 3831
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 75 times
- Been thanked: 696 times
- Contact:
Re: Tesla Model 3 Rear Drive Unit Hacking
Well, here it is folks. The beta release : https://www.evbmw.com/index.php/evbmw-w ... -3-du-beta
Now five of you unlucky persons can own a piece of history and fund my early retirement to Lanzarote......uhhh...cough...I mean fund further development and opensource releases. Video will be up soon showing the fitting procedure etc. Do note this is a beta board, not a finished product and DO NOT buy this if you do not understand the risks and are willing to provide feedback and work through problems here on the forum.
Now five of you unlucky persons can own a piece of history and fund my early retirement to Lanzarote......uhhh...cough...I mean fund further development and opensource releases. Video will be up soon showing the fitting procedure etc. Do note this is a beta board, not a finished product and DO NOT buy this if you do not understand the risks and are willing to provide feedback and work through problems here on the forum.
I'm going to need a hacksaw
- Jack Bauer
- Posts: 3831
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 75 times
- Been thanked: 696 times
- Contact:
Re: Tesla Model 3 Rear Drive Unit Hacking
Working on the installation video.
I'm going to need a hacksaw
-
davefiddes
- Posts: 375
- Joined: Mon Jan 18, 2021 12:39 pm
- Location: Edinburgh, Scotland, UK
- Has thanked: 149 times
- Been thanked: 195 times
Re: Tesla Model 3 Rear Drive Unit Hacking
To support the M3_DU Beta PCB I've made a first release of the firmware which can be found here: https://github.com/davefiddes/stm32-sin ... DU_v5.39.0
This is the code that Damien has been testing with so basically this is what everyone should be using as well.
This is the code that Damien has been testing with so basically this is what everyone should be using as well.
- Jack Bauer
- Posts: 3831
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 75 times
- Been thanked: 696 times
- Contact:
Re: Tesla Model 3 Rear Drive Unit Hacking
Thanks Dave. Could you add a line to turn off pin PE12 at startup? This will disable the big active discharge resistor bank in the middle of the board. Gets a bit toasty at 400v 
I'm going to need a hacksaw
-
davefiddes
- Posts: 375
- Joined: Mon Jan 18, 2021 12:39 pm
- Location: Edinburgh, Scotland, UK
- Has thanked: 149 times
- Been thanked: 195 times