4-channel BMS with daisychain bus

Topics concerning OEM and open source BMSes
User avatar
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

Post by Kevin Sharpe »

johu wrote: Tue Feb 04, 2020 2:01 pm Intro video:
Very cool Johannes... think i'll try this on a spare Tesla module we have in the workshop :)
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.
User avatar
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

Post by Kevin Sharpe »

mikejh wrote: Tue Feb 04, 2020 2:42 pm CCS would be great too but this seems a little more difficult and Ethernet based comms?
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.
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: 4-channel BMS with daisychain bus

Post by johu »

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
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
mikejh
Posts: 16
Joined: Tue Feb 04, 2020 1:38 pm
Has thanked: 1 time
Been thanked: 2 times

Re: 4-channel BMS with daisychain bus

Post by mikejh »

Kevin Sharpe wrote: Tue Feb 04, 2020 10:04 pm No, it's just CAN if you use the Tesla ECU (here).
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
User avatar
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

Post by Kevin Sharpe »

johu wrote: Wed Feb 05, 2020 10:10 am Is the CAN protocol of the Tesla CCS controller hacked yet? Couldn't quite figure from the thread
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.
User avatar
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

Post by Kevin Sharpe »

mikejh wrote: Wed Feb 05, 2020 11:08 am For some reason I prefer the idea of incorporating CCS and/or Chademo into scratch build hardware/software rather than using proprietary gear.
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.
User avatar
Jan
Posts: 17
Joined: Tue Jun 18, 2019 6:09 pm
Location: Johannesburg

Re: 4-channel BMS with daisychain bus

Post by Jan »

Hi Guys,

This is great work. How can I get my hands on a couple of boards for testing?
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: 4-channel BMS with daisychain bus

Post by johu »

Sent you a message
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: 4-channel BMS with daisychain bus

Post by johu »

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.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
tom91
Posts: 1272
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 97 times
Been thanked: 201 times

Re: 4-channel BMS with daisychain bus

Post by tom91 »

johu wrote: Tue Feb 11, 2020 10:25 am I will add the Outlander protocol for CAN communication.
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.
Founder Volt Influx https://www.voltinflux.com/
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: 4-channel BMS with daisychain bus

Post by johu »

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
User avatar
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

Post by Kevin Sharpe »

johu wrote: Tue Feb 11, 2020 10:25 am We're moving forward.
This is great news :)
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.
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: 4-channel BMS with daisychain bus

Post by johu »

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
Attachments
IMG_20200309_192651.jpg
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
RetroZero
Posts: 702
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 311 times
Been thanked: 38 times
Contact:

Re: 4-channel BMS with daisychain bus

Post by RetroZero »

johu wrote: Sun Mar 03, 2019 11:38 am Did another test today. As usual shielded cable fixes the problem.
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!
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: 4-channel BMS with daisychain bus

Post by johu »

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.
Attachments
IMG_20200611_202025.jpg
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Bassmobile
Posts: 94
Joined: Sat Apr 25, 2020 5:51 am
Location: USA
Has thanked: 7 times

Re: 4-channel BMS with daisychain bus

Post by Bassmobile »

johu wrote: Thu Jun 11, 2020 7:54 pm Finally I got to work on the BMS again.
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.
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: 4-channel BMS with daisychain bus

Post by johu »

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
User avatar
Bassmobile
Posts: 94
Joined: Sat Apr 25, 2020 5:51 am
Location: USA
Has thanked: 7 times

Re: 4-channel BMS with daisychain bus

Post by Bassmobile »

johu wrote: Wed Jun 17, 2020 7:34 pm 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
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.
User avatar
Bassmobile
Posts: 94
Joined: Sat Apr 25, 2020 5:51 am
Location: USA
Has thanked: 7 times

Re: 4-channel BMS with daisychain bus

Post by Bassmobile »

Found mini ModICE enclosure STL for 3D SLA printing. https://www.thingiverse.com/thing:4280286
581_01_30_090S.png
User avatar
Bassmobile
Posts: 94
Joined: Sat Apr 25, 2020 5:51 am
Location: USA
Has thanked: 7 times

Re: 4-channel BMS with daisychain bus

Post by Bassmobile »

sonachan1 wrote: Tue Oct 29, 2019 7:50 pm For anyone building their own version of the Huebner BMS, I've just corrected a couple of errors in the Isolator BoM (RS485 Version). The crystal should be 11.0592MHz and the processor should be an ATMEGA88P.
@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?
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: 4-channel BMS with daisychain bus

Post by johu »

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 :)
Attachments
firmware.zip
(162.35 KiB) Downloaded 171 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Bassmobile
Posts: 94
Joined: Sat Apr 25, 2020 5:51 am
Location: USA
Has thanked: 7 times

Re: 4-channel BMS with daisychain bus

Post by Bassmobile »

johu wrote: Sat Jul 11, 2020 6:31 am Have fun figuring it out :)
Awesome!

Yes, it will be loads of fun for sure. Love performing a little data forensics.

Thanks again!
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: 4-channel BMS with daisychain bus

Post by johu »

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.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: 4-channel BMS with daisychain bus

Post by johu »

I decided to push things forward by publishing some stuff. So:
The Isolator/Master will see one more iteration. Some component values will be changed and it will get the ability to turn itself off. So see for yourself if you're fine with the current version.

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
Oskar
Posts: 21
Joined: Mon Aug 19, 2019 5:46 pm
Location: Sweden

Re: 4-channel BMS with daisychain bus

Post by Oskar »

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.
IMG_7548.jpeg
Post Reply