DIY Electric Car Forums banner
1 - 20 of 108 Posts

· Registered
Joined
·
953 Posts
Discussion Starter · #1 · (Edited)
As some of you might have been aware there has been some projects out there that have gotten the Tesla BMS slaves to work.

I have participated in a few. Currently I am working on getting software written to do all the basics like:
-Overvoltage monitoring
-Temperature monitoring
-Undervoltage monitoring
-Balancing during charge
-Current measurement
-AH counter

Outputs
-Contactors/relays or other 12V signals
-PWM 'gas/fuel' gauge control
-Serial interface for Victron VE direct, a special request from Boekel.

The BMS controller/master is based around a teensy 3.2 and code is written in arduino. I will look at uploading my files to github so other can have a look and use it as inspiration.


https://www.youtube.com/watch?v=zmT5o5vDoH8

GITHUB

https://github.com/tomdebree/TeslaBMS
 

· Registered
Joined
·
953 Posts
Discussion Starter · #7 · (Edited)
Itchyback: That is all done in software.

First iteration of this design will just do 12V signalling to turn on and off a charger. But got a canbus on the board for later use.

https://github.com/tomdebree/TeslaBMS

Remember use at your own risk.

Github has all my files, arduino code and schematics for the board
 

Attachments

· Registered
Joined
·
953 Posts
Discussion Starter · #10 ·
Here is a quick and dirty schematic.

It runs a Uno which reads a pot and changes the pwm duty cycle for the fet driver.

Mosfet is VS-FB190SA10
Used Driver is mcp1407

It will get a tempsensor on the heat sink so it does not overheat during testing.
 

Attachments

· Registered
Joined
·
953 Posts
Discussion Starter · #20 ·
RAV4 6s modules should work with the Telsa software/communication that is open source. As it uses the same layout as the Tesla model S.

Smart Car BMS looks different, what does the back side look like? It would be wierd if they would not use the Texas Instruments bms cell.
 

· Registered
Joined
·
953 Posts
Discussion Starter · #24 ·
So the Tesla BMS used in the Smart car will be hard to crack, as you most likely need a working pack to decode it.

However any bmses derived from what i believe the roadster architecture is, so Rav4 Merc B cell and Tesla Model s/x is relatively straight forward.
 

· Registered
Joined
·
953 Posts
Discussion Starter · #28 · (Edited)
Currently running the pack attached to victron charger/inverter to cycle it.

Looks like she is balancing out pretty nicely.

As the pack is a 12S conversion, the temperature sensors are only on one of the two slaves. Need to remove Collins pack status or correct it so it does not fault out.

Okay so my pack overshot on the SOC calc, reason:
On boot up it uses a simple look up to roughly guess the SOC

4.2V is 100% 3.1V is 0%, so that lower value needs moving down. However the slave boards are keeping the cells nice and balanced during the charge of 35Amps and during the absorption phase allowing the slightly lower ones to catch up.
 

Attachments

· Registered
Joined
·
953 Posts
Discussion Starter · #30 ·
Turns out I was just balancing with a inferior algorithm.

Balance cell if above balance setpoint.

This ofcourse wont do, should have changed it. But who looks at the full charge performance when there are other issues to address first.

Will become : Balance cell if above Lowest cell voltage.

Kevin, I got a sneaking suspicion it will talk very nicely. :rolleyes:
 

· Registered
Joined
·
953 Posts
Discussion Starter · #37 ·
I have now gotten the Simple BMS (running Tesla BMS code) to talk to Victron system.

This will allow me to do cycle testing through using one of their Multiplus charger inverter modules.

Implemented features in the code:
-Balancing now happens to the lowest cell voltage instead of voltage setpoint
-SOC calculation has been cleaned up and tuned
-When starting the SOC is estimated at resting cell voltage
-CAN communication, to a format excepted by the VEcan system, will probally work with other solar inverters chargers out there

Upcoming features:
-SOC correction based on a full and empty battery
-Working on the Setup Menu so all necessary parameters can be changed on the fly.
-Looking to possible have add on modules for CAN based charger control (Lear Charger, Tesla Open Source and any that I can find online)

https://github.com/tomdebree/TeslaBMS
 

· Registered
Joined
·
953 Posts
Discussion Starter · #38 ·
Update 16/02/18

Work on the BMS system specifically has stood a bit still, however been plugging away on the code. Ofcourse thank you to everyone who has contributed so far, Ckidder and Jarrod.

Github

https://github.com/tomdebree/TeslaBMS

New features:
-Canbus now running at 500 kbps (Verified to still work with Victron, Boekel request)
-CAB300 working (reason the canbus went to 500kbps)
-Switching between sensor types, CAN or Analogue

Does anyone have any other CANbus sensors for the more power hungry users? As 300 amps is quite small for some of us (Damien :D )

And ofcourse, open source it all. I take no responsibility if you wreck you things or others property due to your lack of knowledge or mistakes in the freely available code.
 

· Registered
Joined
·
953 Posts
Discussion Starter · #40 ·
Ran a full - 4.1V average
to empty - As the inverter cut out at roughly 3.1V

This was a total drain of 92Ah, resulting in a remaining 8% SOC as i set the capcity to 100Ah. (12S tesla module)

I would say so far so good. Now just to get a more variable load to test the bms with.
 

· Registered
Joined
·
953 Posts
Discussion Starter · #44 ·
thanks to a recent update to the Victron firmware now the BMS can control the current and voltage limits in all modes.

This means that now the implementation of a true dynamic current limit will be essential to safe guard thermals.
What I have in mind is as follows:
1. Minimal temperature below which nothing is allow, no charge or discharge.
Above this full discharge allowed.
2.Charged tapered from minimal to T2.
3.Discharge tapers off above T3
4. Max temperature allows no further currents in or out of the battery.

With this as a base it should maintain better control over thermals.

Besides the work on 'stationary' applications, I have been working on formulating the communication with the opensource tesla charger controller. This will follow soon, as functions proven for the 'stationary' application will directly translate into the charger control functionality.

As always latest code available on github, also have added a quick overview of the setup menu on my version of the code.
 

· Registered
Joined
·
953 Posts
Discussion Starter · #46 · (Edited)
Turns out that after running a couple of endurance tests (weeks hence why the long time no updates) the can bus kept going dead.

Cannot have that on a stationary battery (currently first application), reworked the canbus control direct to the teensy and updated the pcb with more IO.

New pcb designed and ordered. Will be ammending the code to work with the new design. Should be a simple renumbering of pins vs outputs.

Need to get a setup to test the BMS interacting with the Tesla Charger.

Might then also look at getting a IVT-mod current sensor working for those higher amps.
https://www.isabellenhuette.de/fileadmin/Daten/Praezisionsmesstechnik/IVT_Modular_datasheet_1.20.pdf
 

Attachments

· Registered
Joined
·
953 Posts
Discussion Starter · #49 ·
1 - 20 of 108 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top