Tesla Model 3 Battery Hacking

Topics concerning the Tesla front and rear drive unit drop-in board
retrEVnoc
Posts: 33
Joined: Sun Aug 11, 2019 8:22 pm
Location: CA & OR, USA
Been thanked: 1 time

Re: Tesla Model 3 Battery Hacking

Post by retrEVnoc »

Nice work! You mention intent to add in other BMS functionality to the board.. Would it still work in conjunction with SimpBMS as mentioned before, or be standalone, or work with Arduino?
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 Battery Hacking

Post by Jack Bauer »

As of now its a simple interface between the Tesla form of ISO-SPI and normal 3v3 level spi. You decide what/how to communicate.
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 Battery Hacking

Post by Jack Bauer »

In the hopes of encouraging colaboration and furthering the effort, I have released the full sources for an FPGA based Model 3 Iso-Spi decoder. At this time it works in receive only and does have some glitches. FPGA used is a Xilinx Spartan 6 at 50MHz. Design done using Xilinx ISE.

To Do : Clean up receive and implement transmit and debug.
I would think it needs to go to 100MHz to work more stably but thats probaly due to my crappy Verilog:)

https://github.com/damienmaguire/Tesla- ... attery-BMS

To tide things over and provide a "today" solution, the prototypes of a Batman based controller have arrived for testing.
Attachments
2020-10-14 15.00.35.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 Battery Hacking

Post by Jack Bauer »

Internet : Wow! Thanks for sharing all that info Damien.
Me : Shucks ma'am was nothing.
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 Battery Hacking

Post by JaniK »

Really appreciate your time and efforts spent in these projects. On few years they will be widely taken in to use I think.
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
celeron55
Posts: 774
Joined: Thu Jul 04, 2019 3:04 pm
Location: Finland
Has thanked: 27 times
Been thanked: 110 times
Contact:

Re: Tesla Model 3 Battery Hacking

Post by celeron55 »

muehlpower wrote: Wed Aug 26, 2020 2:24 pm If you google for "Modified pulse shaping for echo control in isoSPI bus applications" you will find an article that describes how to increase the pulse duration of the LTC6820 by replacing the terminator with a capacitor! have you tried that?
I just read through the article and looked at the LTC6820 datasheet. It looks like there is no way to extend the timing and that's also not what the article is about, so the LTC6820 cannot be used.

It does describe a way of doing HV isolation using cheap transformers with capacitors taking the DC portion of isolation voltage. That can be used in the model 3 master board if needed.
collin80
Posts: 110
Joined: Sun Aug 30, 2020 3:28 pm
Location: United States, Michigan
Been thanked: 4 times
Contact:

Re: Tesla Model 3 Battery Hacking

Post by collin80 »

celeron55 wrote: Tue Oct 20, 2020 7:18 am I just read through the article and looked at the LTC6820 datasheet. It looks like there is no way to extend the timing and that's also not what the article is about, so the LTC6820 cannot be used.

It does describe a way of doing HV isolation using cheap transformers with capacitors taking the DC portion of isolation voltage. That can be used in the model 3 master board if needed.
I agree. I can't give all the details but I tried for a long time to make the LTC6820 work with the Model 3 BMS. It simply is not up to the task. The pulses are the wrong duration by a significant margin. It's like that in both directions so simply extending the output pulses won't work. You'd have to somehow reduce the duration of the incoming pulses back from the BMS so that the LTC6820 could understand them. Then there's the fact that the BMS sends pulses differently from an LTC6820 - that is, it sends both 0 and 1 replies. It'd be a nightmare and really there is no way to enlarge some pulses while shrinking others. That'd be a total clown show to try to pull off. No, they changed too many things to make this possible. However, someone once told me that they were able to successfully use LTC6813 code on their Model 3 modules. I didn't believe them at the time. However, recently I got some evidence to suggest that early on in the Model 3 process Tesla might have used LTC6813 chips instead of their current custom chips. This could have happened during prototyping or maybe some extremely early modules used LTC6813 chips. But, if this is true (and I don't know if it is) then it was extremely uncommon and none of us are likely to ever see modules that use LTC6813 BMS chips.
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 Battery Hacking

Post by Jack Bauer »

annnnd I still get people telling me to just use an LTC6820 :)
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 Battery Hacking

Post by collin80 »

Jack Bauer wrote: Thu Oct 22, 2020 7:20 am annnnd I still get people telling me to just use an LTC6820 :)
But... if you just try hard enough I'm sure it will work!
chevS10
Posts: 2
Joined: Sat Oct 17, 2020 4:08 pm

Re: Tesla Model 3 Battery Hacking

Post by chevS10 »

OK, has anyone else tried to install the Xillinx ISE? This is a total mess! The virtual machine installation is a real mystery so far. I'm looking at the Xilinx help and community forums and will eventually figure it out, but it isn't an easy project just to be able to recompile the current FPGA code. Not anything like my past Synopsis experience.
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 Battery Hacking

Post by Jack Bauer »

I don't recall having to use a vm. Just a basic ise install and free webpack license should do the trick.
https://www.xilinx.com/products/design- ... bpack.html
I'm going to need a hacksaw
chevS10
Posts: 2
Joined: Sat Oct 17, 2020 4:08 pm

Re: Tesla Model 3 Battery Hacking

Post by chevS10 »

I think I know why you didn't need the VM. You are probably running a Linux system and the tool runs native in Linux. I'm trying to install on a Windows 10 system, but there is probably not a native UWP or similar ISE for Windows so part of the installation is to load a VM for Linux and then the Windows install simply launches the tool in the VM. The install script acts like it includes installing the VM, but it doesn't appear to happen as you might think. I see lots of questions on the support page for how to get this working. The documentation is not very clear. There is only one install package for the ISE 14.7. From the replies to install questions, it sounds like the Webpack option is exposed once the ISE install is underway.
Johannes.l
Posts: 32
Joined: Thu Sep 24, 2020 12:26 pm
Been thanked: 1 time

Re: Tesla Model 3 Battery Hacking

Post by Johannes.l »

Don't know if anyone have any use of these but I have the main BMS board and the small boards on the modules which I dissembled from the small Model 3 battery pack. 24 cells in series.
/Johannes
Attachments
IMG_20210312_221625.jpg
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 Battery Hacking

Post by Jack Bauer »

I'll take them if no one else is interested. Send me a pm.
I'm going to need a hacksaw
nkiernan
Posts: 505
Joined: Mon Feb 24, 2020 8:59 pm
Location: Ireland
Has thanked: 276 times
Been thanked: 64 times

Re: Tesla Model 3 Battery Hacking

Post by nkiernan »

Wanted to check in on this thread. My Tesla Model 3 batteries should be getting housed in new battery boxes shortly, so planning out the next steps. Have Damien's new PCS controller so the BMS is next on the list.

@ChevS10, did you have any joy with the FPGA work in the end? I've never worked with FPGA, so realistically would it be a little too ambitious for someone who's about comfortable with arduino programming to try anything here!?

Would the Batman stepping stone route be the way to go for now (have the high voltage controller but ideally didn't want to remove the chip here in case the complete controller could be usable in the future), or is the FPGA route something that's close...ish?
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 Battery Hacking

Post by Jack Bauer »

So considering that it seems I'm the only one working on this then I'll get back around to it as soon as I can. I opensourced the fpga design in the hope it would inspire others to get involved and contribute but as usual that didn't happen. No doubt its up and running somewhere and not fed back into the open.
I'm going to need a hacksaw
nkiernan
Posts: 505
Joined: Mon Feb 24, 2020 8:59 pm
Location: Ireland
Has thanked: 276 times
Been thanked: 64 times

Re: Tesla Model 3 Battery Hacking

Post by nkiernan »

Jack Bauer wrote: Mon May 17, 2021 5:28 pm So considering that it seems I'm the only one working on this then I'll get back around to it as soon as I can. I opensourced the fpga design in the hope it would inspire others to get involved and contribute but as usual that didn't happen. No doubt its up and running somewhere and not fed back into the open.
Thanks for reply. Its the FPGA design and debug that's the big hurdle or is there anything else that would help the project? Downloading the ISE to take a look.

Question out to the forum, has anyone done any work on Damien's TM3 BMS FPGA opensource design?
collin80
Posts: 110
Joined: Sun Aug 30, 2020 3:28 pm
Location: United States, Michigan
Been thanked: 4 times
Contact:

Re: Tesla Model 3 Battery Hacking

Post by collin80 »

nkiernan wrote: Mon May 17, 2021 7:41 pm
Jack Bauer wrote: Mon May 17, 2021 5:28 pm So considering that it seems I'm the only one working on this then I'll get back around to it as soon as I can. I opensourced the fpga design in the hope it would inspire others to get involved and contribute but as usual that didn't happen. No doubt its up and running somewhere and not fed back into the open.
Thanks for reply. Its the FPGA design and debug that's the big hurdle or is there anything else that would help the project? Downloading the ISE to take a look.

Question out to the forum, has anyone done any work on Damien's TM3 BMS FPGA opensource design?
First of all, I think Damien is wrong. (Though he could have been joking or saying it non-seriously. I have a hard time telling) I doubt anyone has taken his FPGA work and gotten it work behind the scenes. Other than him I'm probably about the most knowledgeable person outside of Tesla about how the Model 3 intra-pack comm works. I've loaded his FPGA code and looked at it. I don't have the proper hardware to test it. Full disclosure, I've been working on a closed source design for a long time but like Damien I keep having to work on other projects. Some day... But, I know a lot about the comm and really I don't think what he's posted so far is really enough to push a "green" person over the edge and allow them to get things working. The level of difficulty in getting this all going is seemingly higher than people think. So, the previous statement is NOTHING negative against him or anyone else for that matter. Where things currently sit is not really nearly there yet. It's fairly easy to get started down the path but I've found that one quickly becomes bogged down with corner cases and little data bugs that screw up the reading/writing process. So far his FPGA code is read only. For a variety of reasons, once you start doing transmission as well things just get bananas and it's even tougher to keep the data stream straight and glitch free. No, I really don't think anyone has done all that and not said anything. So far I've heard about zero people successfully making their own Model 3 BMS master. And, that includes me. I'm pretty sure if anyone had done it they'd be swinging from the rafters giving themselves a parade. There have been no parades.

If you have retained a whole Model 3 battery and merely reconfigured the physical location of the modules then the original BMS should still work. It spits out traffic on the CAN bus that you could read. Obviously it'd be somewhat limited for some things but it will try to work all by itself. The biggest draw for a different solution is to be able to use 1,2,3 modules or go higher to 5,6,7, etc. If you have all four you can just use the master BMS. It even tries to work with 1 module installed. At least, it'll read that one module and parse the replies. So, you can start by trying the existing master board and look at the CAN traffic to see if that's good enough for your needs. It should (though I can't confirm) still try to do balancing. You'll just need to wire up the two wire interface to each module.
nkiernan
Posts: 505
Joined: Mon Feb 24, 2020 8:59 pm
Location: Ireland
Has thanked: 276 times
Been thanked: 64 times

Re: Tesla Model 3 Battery Hacking

Post by nkiernan »

collin80 wrote: Mon May 17, 2021 11:28 pm
If you have retained a whole Model 3 battery and merely reconfigured the physical location of the modules then the original BMS should still work. It spits out traffic on the CAN bus that you could read. Obviously it'd be somewhat limited for some things but it will try to work all by itself. The biggest draw for a different solution is to be able to use 1,2,3 modules or go higher to 5,6,7, etc. If you have all four you can just use the master BMS. It even tries to work with 1 module installed. At least, it'll read that one module and parse the replies. So, you can start by trying the existing master board and look at the CAN traffic to see if that's good enough for your needs. It should (though I can't confirm) still try to do balancing. You'll just need to wire up the two wire interface to each module.
Collin80, thanks for the detailed reply. That makes good sense and gives me something to look at. I do have the contents of a complete battery pack and will be using all four modules, so will re-look at the standard BMS
User avatar
fredd90
Posts: 87
Joined: Tue Oct 20, 2020 7:36 pm
Been thanked: 1 time

Re: Tesla Model 3 Battery Hacking

Post by fredd90 »

I also have the full LR package, my current direction points at Orion 2 with new "bms" adapter boards.
I have not seen any pictures yet but evshop.eu sell bms replacement boards, 30eur each if i buy orion system.... Then I only need to cut out the pentry bottom they said and replace current boards.

I am not qualified enough to start with FPGA... To get my project through Swedish technical inspection I need to have a lot of stuff like, insulation test, real-time soc calculation.

I don't know if there are any active balancing going on, when I bought the battery it was 397vdc now 7 months later 395vdc.
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 Battery Hacking

Post by Jack Bauer »

My sense in the short term is the easiest solution is to pull the LT chip off the bms boards and use it with our own micro. Given the amount of boards being pulled off battery modules and the fact that each board has two devices there should be no shortage. I do have a design done for such a board and a few prototypes here that I never got around to using. If anyone wants to do this and contribute some code ...
I'm going to need a hacksaw
User avatar
tollerteppich
Posts: 34
Joined: Sun Feb 07, 2021 10:39 am
Location: Hannover/Germany
Contact:

Re: Tesla Model 3 Battery Hacking

Post by tollerteppich »

Hello Moin

has any of you ever read a battery from the 2019 model y with the batman chip? I have a Batman chip on a model 3 25s 160Ah battery element.

I have an offer for a 75kwh battery for 9,000 € with ~ 6,000km. that would be 120 € / kWh.

the question is whether you can read the Model Y battery with it.

Data I have are:
1493127-00-D
ASY, HVBAT E3, AWD
400VDC 1PH, M3
SN: TG120194002RYK
Made in USA

The M3 makes me wonder "Model 3"?

Best regards, Liebe Grüße

Alex
When accelerating, the tears of emotion must flow horizontally towards the ear.
Walter Röhrl
User avatar
fredd90
Posts: 87
Joined: Tue Oct 20, 2020 7:36 pm
Been thanked: 1 time

Re: Tesla Model 3 Battery Hacking

Post by fredd90 »

tollerteppich wrote: Thu Sep 09, 2021 9:09 am Hello Moin

has any of you ever read a battery from the 2019 model y with the batman chip? I have a Batman chip on a model 3 25s 160Ah battery element.

I have an offer for a 75kwh battery for 9,000 € with ~ 6,000km. that would be 120 € / kWh.

the question is whether you can read the Model Y battery with it.

Data I have are:
1493127-00-D
ASY, HVBAT E3, AWD
400VDC 1PH, M3
SN: TG120194002RYK
Made in USA

The M3 makes me wonder "Model 3"?

Best regards, Liebe Grüße

Alex
Hello there, this wont answer all your questions but here are some info from my battery, tesla model 3 2018 eu 3 phase.
Screenshot_20210913-003351_Office.jpg
User avatar
tollerteppich
Posts: 34
Joined: Sun Feb 07, 2021 10:39 am
Location: Hannover/Germany
Contact:

Re: Tesla Model 3 Battery Hacking

Post by tollerteppich »

Many thanks for your response. I have now researched so much information that I know that it is a 78KWh pack.

I will probably have to wait a little longer for an 82 KWh pack. But until then I still have a lot to build: D

https://uploads.tff-forum.de/original/3 ... 0a17b.jpeg

https://docs.google.com/spreadsheets/d/ ... edit#gid=0

https://teslatap.com/vin-decoder/

Many greetings
Alex
When accelerating, the tears of emotion must flow horizontally towards the ear.
Walter Röhrl
amzoo
Posts: 28
Joined: Tue Jan 19, 2021 8:04 pm
Location: Northern CA, USA
Been thanked: 2 times

Re: Tesla Model 3 Battery Hacking

Post by amzoo »

edit: moving my questioning over to the Model 3 High Voltage Controller thread
Attachments
Screen Shot 2021-09-18 at 3.46.10 PM.png
IMG_3905.jpeg
IMG_3906.jpeg
Post Reply