Very cool Johannes... think i'll try this on a spare Tesla module we have in the workshop
4-channel BMS with daisychain bus
- Kevin Sharpe
- Posts: 1345
- Joined: Fri Dec 14, 2018 9:24 pm
- Location: Ireland and US
- Been thanked: 4 times
Re: 4-channel BMS with daisychain bus
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.
- Kevin Sharpe
- Posts: 1345
- Joined: Fri Dec 14, 2018 9:24 pm
- Location: Ireland and US
- Been thanked: 4 times
Re: 4-channel BMS with daisychain bus
No, it's just CAN if you use the Tesla ECU (here).
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.
- johu
- Site Admin
- Posts: 5874
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 172 times
- Been thanked: 1089 times
- Contact:
Re: 4-channel BMS with daisychain bus
Yes I looked at the ChaDeMo spec that mysteriously spawned on my hard drive and it seems simple enough to implement.
Is the CAN protocol of the Tesla CCS controller hacked yet? Couldn't quite figure from the thread
Is the CAN protocol of the Tesla CCS controller hacked yet? Couldn't quite figure from the thread
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Re: 4-channel BMS with daisychain bus
Thanks for that information. I will have a look at that thread.
For some reason I prefer the idea of incorporating CCS and/or Chademo into scratch build hardware/software rather than using proprietary gear.
Not sure why. I think I like to understand it fully and know that I have full control of hardware and software.
The Chademo CAN protocol seems a lot more straight forward. Pity the CCS standard moved away from that.
The CCS protocol is based on Ethernet over power (HomePlug GreenPHY) and seems a lot more complex, but I guess it's just a TCP stack in the micro and a bit of hardware. Sounds simple but I know it's not...
Some more hardware required to drive the charging contactors as well... and it seems the Chademo input socket (with DC) is not too cheap either.
I'd really like to build an off board charger that works on the Chademo protocol for the garage too. Then we could use the one input plug for everything.
Mike
- Kevin Sharpe
- Posts: 1345
- Joined: Fri Dec 14, 2018 9:24 pm
- Location: Ireland and US
- Been thanked: 4 times
Re: 4-channel BMS with daisychain bus
It's in the development que and will shift to high priority once Damien's BEXUS is on the road (should be at the end of this month).
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.
- Kevin Sharpe
- Posts: 1345
- Joined: Fri Dec 14, 2018 9:24 pm
- Location: Ireland and US
- Been thanked: 4 times
Re: 4-channel BMS with daisychain bus
I don't think anyone will stop you from doing that but I seriously doubt you'll get anywhere near the 80 euros we typically pay for the Tesla Charge Port ECU. It's a bit like the Tesla PCS, once that has been reverse engineered why would anyone use a different charger or DCDC given Tesla will have produced 500,000 of them in a few months time and we can buy them for 300 euros.
It's also important to start thinking about tightening regulations for conversions. I understand the UK is implementing a new approvals regime (not a bad thing given some of the shocking modifications that are currently on the road) and I suspect the European model will move closer to that used in The Netherlands where the whole system must be tested for EMC.
Happy to discuss this further but lets not use this thread
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.
Re: 4-channel BMS with daisychain bus
Hi Guys,
This is great work. How can I get my hands on a couple of boards for testing?
This is great work. How can I get my hands on a couple of boards for testing?
- johu
- Site Admin
- Posts: 5874
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 172 times
- Been thanked: 1089 times
- Contact:
Re: 4-channel BMS with daisychain bus
Sent you a message
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- johu
- Site Admin
- Posts: 5874
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 172 times
- Been thanked: 1089 times
- Contact:
Re: 4-channel BMS with daisychain bus
We're moving forward. I sent 24 modules to Damien for testing and sent out Emails to everyone else who was interested.
Andy has done an SMT version of the isolator as we now have JLCPCB (who are not working right now because of Corona). We will add a second CAN bus to support ChaDeMo natively and CCS via the Tesla controller later.
The isolator firmware basically just queries the slave modules and displays the values via the well known web interface. I will add the Outlander protocol for CAN communication.
Damien has sent me an Isabellenhütte shunt that will also be supported by the firmware.
Andy has done an SMT version of the isolator as we now have JLCPCB (who are not working right now because of Corona). We will add a second CAN bus to support ChaDeMo natively and CCS via the Tesla controller later.
The isolator firmware basically just queries the slave modules and displays the values via the well known web interface. I will add the Outlander protocol for CAN communication.
Damien has sent me an Isabellenhütte shunt that will also be supported by the firmware.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 1345
- Joined: Fri Mar 01, 2019 9:15 pm
- Location: Bristol
- Has thanked: 107 times
- Been thanked: 231 times
Re: 4-channel BMS with daisychain bus
What do you mean by this? Are you going to be sending out the same messages as Outlander slaves, even though all the BMS 'Master' functions will now go into this unit? Or are you going to start supporting other OEM slaves with your unit?
For Chademo you will need a few other I/O pins for it to work properly and safely.
- johu
- Site Admin
- Posts: 5874
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 172 times
- Been thanked: 1089 times
- Contact:
Re: 4-channel BMS with daisychain bus
No I won't support OEM slaves, not planning to enter SimpBMS territory here. Still it's a good question why to export individual voltages when processing takes place internally.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- Kevin Sharpe
- Posts: 1345
- Joined: Fri Dec 14, 2018 9:24 pm
- Location: Ireland and US
- Been thanked: 4 times
Re: 4-channel BMS with daisychain bus
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.
- johu
- Site Admin
- Posts: 5874
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 172 times
- Been thanked: 1089 times
- Contact:
Re: 4-channel BMS with daisychain bus
The new BMS master boards are ready, thanks to Andy (=sonachan1) He did layout and assembly.
I'm getting 10 more from JLC, hopefully they arrive before I go on holiday this Thursday.
2 lessons learned:
- BOOT0 needs to be grounded, otherwise reset doesn't work (processor ends up in factory boot loader)
- The STM32F105RBT6 has a flash page size of 2kb as opposed to 1kb in the STM32F103RBT6 -> need to change boot loader, parameter saving and wifi module update function
I'm getting 10 more from JLC, hopefully they arrive before I go on holiday this Thursday.
2 lessons learned:
- BOOT0 needs to be grounded, otherwise reset doesn't work (processor ends up in factory boot loader)
- The STM32F105RBT6 has a flash page size of 2kb as opposed to 1kb in the STM32F103RBT6 -> need to change boot loader, parameter saving and wifi module update function
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 760
- Joined: Tue Oct 29, 2019 2:48 pm
- Location: France
- Has thanked: 361 times
- Been thanked: 44 times
- Contact:
Re: 4-channel BMS with daisychain bus
I heard a lot about you from Damien ja! You're from another planet! Great stuff on balancing and charging. Will be my next subject I study before throwing a curve ball at French legislation authorities. Wunderbar!
- johu
- Site Admin
- Posts: 5874
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 172 times
- Been thanked: 1089 times
- Contact:
Re: 4-channel BMS with daisychain bus
Finally I got to work on the BMS again. I connected it to the 99 cells in the back and also connected fuel gauge, charger (inverter) and a current sensor. All works a treat.
I will build the system up fully with another master unit in the front that acts as a slave to the master unit in the back. Communication is via CAN. With that done I will extend the software to execute more BMS functions.
The BMS presents a challenge when it comes to selling it. The quantity of boards is higher and they are fully build, so not kits. That has a couple of legal implications. Therefor I'm currently working with a distribution partner who will ship out the hardware while I will just sell the master units software.
Slave boards will certainly cost less than 10€, so less than 2.50€ per cell.
Also there is demand for modules with more channels. Damien considers building a centralized unit that would basically unite a couple of slave boards and a master board on a single PCB.
I will build the system up fully with another master unit in the front that acts as a slave to the master unit in the back. Communication is via CAN. With that done I will extend the software to execute more BMS functions.
The BMS presents a challenge when it comes to selling it. The quantity of boards is higher and they are fully build, so not kits. That has a couple of legal implications. Therefor I'm currently working with a distribution partner who will ship out the hardware while I will just sell the master units software.
Slave boards will certainly cost less than 10€, so less than 2.50€ per cell.
Also there is demand for modules with more channels. Damien considers building a centralized unit that would basically unite a couple of slave boards and a master board on a single PCB.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- Bassmobile
- Posts: 94
- Joined: Sat Apr 25, 2020 5:51 am
- Location: USA
- Has thanked: 7 times
- Been thanked: 1 time
Re: 4-channel BMS with daisychain bus
Cool to see progress!
Q: With the BMS connected to the CAN system along with the inverter, –and the inverter utilizing it's own WiFi for communication with monitoring and diagnostic software. What is the rational behind building the BMS master with a ESP8266 wifi module as well? Assume the WiFi is just for configuration. Example might be to set voltages to accommodate different chemistries. Such as if it is used with an LFP (as it appears to be in your photo), or LTO, NMC, etc.
- johu
- Site Admin
- Posts: 5874
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 172 times
- Been thanked: 1089 times
- Contact:
Re: 4-channel BMS with daisychain bus
Yes the wifi is just for configuration and firmware upgrade. Also you can see individual cell voltages and other things that wouldn't make much sense to constantly put on the CAN bus
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- Bassmobile
- Posts: 94
- Joined: Sat Apr 25, 2020 5:51 am
- Location: USA
- Has thanked: 7 times
- Been thanked: 1 time
Re: 4-channel BMS with daisychain bus
That's cool! Will make a good BMS to those who might want to use it for 'Power-Wall' or possibly dual purpose, like in an EV Campervan.
Made some V5.1 Isolator and Slave boards while waiting for this to develop, but have not programmed them successfully using the normal process with avrdude and usbtinyisp.
Was able to get it working on updated toolchain. Turns out Mac OS Catalina update had caused some issues with the environment because of permissions. Reinstalling some of the tools solved this.
- Bassmobile
- Posts: 94
- Joined: Sat Apr 25, 2020 5:51 am
- Location: USA
- Has thanked: 7 times
- Been thanked: 1 time
Re: 4-channel BMS with daisychain bus
Found mini ModICE enclosure STL for 3D SLA printing. https://www.thingiverse.com/thing:4280286
- Bassmobile
- Posts: 94
- Joined: Sat Apr 25, 2020 5:51 am
- Location: USA
- Has thanked: 7 times
- Been thanked: 1 time
Re: 4-channel BMS with daisychain bus
@Johu, I missed sonachan1's update quoted above by a few days, and consequently built 10x RS485 Isolators with incorrect crystal, also with incorrect AVR; ATMEGA8 Re-working the crystals was easy job, however the AVR IC is another story. And so it comes to mind that it may be easier to change source-code, than to re-work SMT error? ATMEGA8 vs 88p appear to be pin compatible. Although, presently have access to SMT rework station, but not access to the source code.
Thoughts?
- johu
- Site Admin
- Posts: 5874
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 172 times
- Been thanked: 1089 times
- Contact:
Re: 4-channel BMS with daisychain bus
Attached the RS485 modules firmware source code.
Also the scripts for remote updating the firmware and that of the cell modules. Have fun figuring it out
Also the scripts for remote updating the firmware and that of the cell modules. Have fun figuring it out
- Attachments
-
- firmware.zip
- (162.35 KiB) Downloaded 176 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- Bassmobile
- Posts: 94
- Joined: Sat Apr 25, 2020 5:51 am
- Location: USA
- Has thanked: 7 times
- Been thanked: 1 time
Re: 4-channel BMS with daisychain bus
Awesome!
Yes, it will be loads of fun for sure. Love performing a little data forensics.
Thanks again!
- johu
- Site Admin
- Posts: 5874
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 172 times
- Been thanked: 1089 times
- Contact:
Re: 4-channel BMS with daisychain bus
Worked on the integration a bit more today. I botched the master board to be able to turn itself off by pulling the enable pin of the 5V regulator low. So now the BMS can do its thing like long term SoC estimation and balancing and then turn itself off after a couple of hours. Current draw should be in the uA range but I haven't measured.
Initially it is enabled by the ignition input and never turns off while that is high.
In Polo I use the front BMS unit to control the brake vacuum pump - there is an ADC input, there is a relay output, so why not, I thought
Since the questions keeps spawning: I am not ready for selling yet. The master software is still at an early stage but most of all I'm reluctant to sell non-kit electronics. Still working towards having the system sold by a distribution partner, but that also takes time to set up.
I will tune up the JLCPCB BOM a bit so that you will be able to just buy the boards yourself. Issue here is that the cell boards need quite a lot of calibration done as they won't measure accurately otherwise. So quite a lot of ground work to be done here. I have to ask for patience, still.
Initially it is enabled by the ignition input and never turns off while that is high.
In Polo I use the front BMS unit to control the brake vacuum pump - there is an ADC input, there is a relay output, so why not, I thought
Since the questions keeps spawning: I am not ready for selling yet. The master software is still at an early stage but most of all I'm reluctant to sell non-kit electronics. Still working towards having the system sold by a distribution partner, but that also takes time to set up.
I will tune up the JLCPCB BOM a bit so that you will be able to just buy the boards yourself. Issue here is that the cell boards need quite a lot of calibration done as they won't measure accurately otherwise. So quite a lot of ground work to be done here. I have to ask for patience, still.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- johu
- Site Admin
- Posts: 5874
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 172 times
- Been thanked: 1089 times
- Contact:
Re: 4-channel BMS with daisychain bus
I decided to push things forward by publishing some stuff. So:
JLCPCB does not fit any of the connectors so you need to find them somewhere else and solder them yourself.
As always, use the forum. Don't dare privately messaging me if you run into issues but do please post here (or in a dedicated build thread)
The posted binary version of the master firmware is preliminary but good enough for testing.
- Get your cell modules made at JLCPCB from these files: https://github.com/jsphuebner/bms-hardw ... ng%20Files
- Get the master module made from these files (read below!): https://github.com/jsphuebner/bms-hardw ... ng%20Files
- Get the software here: https://github.com/jsphuebner/bms-software
JLCPCB does not fit any of the connectors so you need to find them somewhere else and solder them yourself.
As always, use the forum. Don't dare privately messaging me if you run into issues but do please post here (or in a dedicated build thread)
The posted binary version of the master firmware is preliminary but good enough for testing.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Re: 4-channel BMS with daisychain bus
So, I hooked up some cells for testing. Firmware 0.22B, slaveboard led:s are looping, opmode WaitAddr and that's about it. No voltages shows up. I have a strong feeling I forgot something. Is there supposed to be a jumper on the first slave?
Edit: R12 moved to R5 on the first board and connected to J6 on the master board.
Edit: R12 moved to R5 on the first board and connected to J6 on the master board.