DIY 6S to 12S BMS with CAN - DieBieMS

Would it mean if I get a powerbar with a 3a output instead of 2a, I could charge my board battery?:thinking: maybe even while driving? Just theoretically?

Hahahaha, yes you could :smile:.

Then you could conveniently carry extra storage for your board, and it would even be useful for your other devices.

If I would design a USB PD charger / control board it would be universal, not specific to this BMS (however some features like charge throttle and convenient auto turn off/on would likely be specific to this BMS) and would work with 80% of the existing boards (will depend on battery voltage but covering the 6S to 10S batteries is doable, 12S might be a challenge).

5 Likes

This is exactly what I started to work on; if Iā€™m carrying around a several hundred watt hour battery, surely I can use it charge my phone and laptop, and USB C makes it even better. Very exciting!

2 Likes

What program is are you using for the project? Kicad, eagle or something else?

For the hardware; Altium designer.

1 Like

Ok guys, the first version of the DieBieMSTool is finally available!

There is still a really long todo list (like adding the realtime data for analysis and having more stuff configurable like custom logos :slight_smile: ) but the first step is made!

You can find the project here:

I am a Qt novice so I didnā€™t yet figure out on how to make a static build (with only an .exe output without the need for all de dllā€™s), so for now you need to download the complete zip and extract it and run the exe from that folder.

I assume a windows user and that you have the BMS with a firmware that states 3.38 (if I am correct this is the firmware that was delivered with the group buyā€™s, the controller should also have the bootloader programmed). In the steps below I first flashed this (ā€˜oldā€™) firmware to match the BMS like it is from the group buy.

Version 3.38 does not support the reading and writing of the config trough the tool (only trough the terminal), that is why you need to update the firmware. Setting the firmware version to 3.38 was done back then to allow you to use the VESCTool to interface trough the terminal, the new version will be 0.18 and only works with the DieBieMS.

Step 1 Download the .zip ( https://github.com/DieBieEngineering/DieBieMS-Tool/tree/master/Builds ) and extract it to a folder. Yeah I know it is stuffed with files, I still need to learn on how to compile it statically :sweat_smile:, teach me @Ackmaniac :smiling_imp: .

Step 2 Connect the USB with the USB cable to the computer and install the drivers for com port (should happen automatically ). Open the .exe go to connections and hit auto connect (or select the correct com port). It should detect the BMS and connect to it: image

Step 3 Go to firmware, select the DieBieMS_default.bin and hit update firmware: image

And wait until the firmware is written.

Step 4 With the 3.38 firmware the bootloader is not automatically triggered (was not yet implemented back then, it is now with 0.18 and forward), so we need to trigger it manually:

image

Go to the terminal, make sure you are still connected and type bootloader_jump followed by Enter. The status LED on the BMS will now go from regular blinking to intermittent fast blinking.

Step 5 If all went OK the main application will start to run and the LED blinks (either slow or normal). The defaults of the main application are set to a 10S pack, if this is the case the BMS will work normally and if not it goes to an error state. But donā€™t be scared! If you are connected trough USB you can still configure it :slight_smile: in the error state.

When the BMS is in the error state it really badly wants to power down, the connection by USB however will force it to stay on.

Optional step: Now go back to the firmware and hit this button: image

Confirm that the FW version now reads 0.18. If not repeat the previous steps. If still not lets discussā€¦

Step 6 Go to cell management and hit read configuration: image

Depending on how the active configuration matches the connected battery pack the BMS could go from normal operation (slow blinking on the bms and showing a battery on the display) to an error state (fast blinking just wanting to turn off ). The BMS wont recover by updating the config, you will need to update the config, store it in flash to the correct version to recover. If you are connected trough USB you will always be able to interface with it.

  • On first startup (after firmware update) the BMS loads the default config and stores that in flash.
  • On every following startup it wil read the config from flash and use that as the active configuration.
  • You can load the default configuration to the DieBieMS tool with the ā€œRead default BMS configurationā€ button.
  • this differs from the VESC You can change the active configuration by changing a value in the DieBieMS tool followed by hitting ā€œWrite BMS configurationā€. This change will be used directly (but as said it wont recover from an error state, only a reboot will do that)! So if you change a voltage limits or cells configuration wrongly it will go to an error state. The active configuration will be lost if you dont store it to flash.
  • this differs from the VESC You can store the active configuration to flash by hitting this button: image

Step 7 Now power cycle the BMS by removing the USB connection and turning it off and on. If you configured and stored it correctly it will now power on and activate its load output.

You are done

You can still check the status the old way: image

Now my focus will be on making a shiney enviroment for the realtime data where you can see cel voltages and currents and stuff. Learn how to statically build the application and build it for linux and mac. Still a lot to be done but this is a good step in the right direction.

27 Likes

:clap:t3::clap:t3:

Good job! I am looking forward to get it up and running!

wow! this really great!

thank you very much for all your effort and sharing it with the community

Wow, nice job, but I have a slight challenge, since I put everything together to and connected the CAN bus via the VESC, and the VESC is accessible via Bluetooth.

If you create a new firmware version in the future (push to start -wink-wink-) can I still program it via vesctool?

Another question, would it be possible to compile for Mac (vesctool has an unofficial Mac release)

Yes I have this same challenge :stuck_out_tongue:.

With this firmware and ui you should still be able do everything over CAN and trough a VESC, you can also still do everything with the terminal.

There is however one big BUT, the current firmwareā€™s default configuration is written for 10S, and will therefore not enable the output after the firmware update if you pack has any other configuration then 10S, trough USB you would be able to change the cells, do a reboot and you would be OK, but trough CAN you cant acces the BMS after the FW update since the VESCā€™s wont turn on anymore. I have 6S in my board and can just like you only acces the BMS trough CAN, so I have the same issue.

Thus one thing on my todo list just became higher in priority: Doing automatic cell count detection!

This will solve 70% of the wrong configuration mistakes, so expect this feature soon :nerd_face:.

11 Likes

Iā€™ll wait for one of the next versions that will add some features :wink:

But if you need beta testers, please let me know :smile:

Oh my gawd, that would be perfect!

2 Likes

Sorry that confused me a bit, lol. Iā€™m gonna be running 12s, so what will I need to avoid doing, or do after an update.

Basically, if youā€™re not running 10s you need to do first time (just first time) configuration via usb.

1 Like

Ahh, got it, thanks! :wink:

19

Text based realtime data works! Soon the graph for current/ voltage, temperatures and a bar graph for the cells will be made and the auto cell count detection will be implemented.

11 Likes

Well done ! I also customized VESC Tool for my own purposes. Vedder did an amazing work, itā€™s so easy to rearrange parameters and pages, even when weā€™re not used to Qt. However, Iā€™m struggling finding how to add telemetry in the dark grey squares as you did. Could you point me the file to change ?

Thanks !

1 Like

Yes I really appreciate all the work vedder has put in and the aids he made to facilitate the development of the tool itself.

The text boxes are filled / changed in a widget: widgets/Sources/rtdatatext.cpp

Good luck!

3 Likes

This is certainly awesome, and I will include it in some of my products for sure, but for Battery voltages>20V, you will need a fairly large boost converter somewhere. Very very unlikely that is going to be inside your board.

Hi Guys,

If you are happy with your unit, please help get me some reference by voting for me below.

Sam

3 Likes