DIY 6S to 12S BMS with CAN - DieBieMS

That balance wire connector is a little off. C0 is below c1, and the last balance wire is c12. There are 13 total balance wires (c0, c1…c12) Edit: i think…

Looking good!

A new project just popped up, and I am crazy exited about it… the USB-C PD standard!!!

And look what I just found on Farnell: 53

A freaking waterproof USB-C connector!

WHAT IF: You could charge your esk8 with ANY USB-C PD that can source power? And if that same esk8board can also act as a power source?

Then you could charge your board with the same power supply as your future notebook, or your notebook from your skateboard or charge your skateboard from your notebook xD.

Oh man I really dig this standard, this will be on any future battery powered device, and this should also become the standard for our skateboards :slight_smile:.

21 Likes

But… 100w max, at 20v? No needs a pretty big boost too?

https://en.wikipedia.org/wiki/USB_(Physical)#PD

Still, pretty awesome!

Well 100W is still impressive, only 2.5Hours to charge a (my) board from completely empty to full, but realistically how often would you like to charge your board to completely full right after you emptied it? I need at leas 2 hours of recovery beer after that :stuck_out_tongue:.

Yeah a boost from any of the USB PD voltages would be preferred, I would like to charge even from a 5V 3A charger :heart_eyes:. Would take 16hours with that phone like charger but is still acceptable.

We could even implement the charge throttling mechanism of this BMS in the boost converter

8 Likes

And I am super excited about you being super excited about that! Hehe :smile:

It is definitaly a good way to go. Less charger standards makes = less charger needed :slight_smile: 100W is also good enough.

I took the balance connector layout from the gerbers, the bottom right pin is connected to GND (through a resistor), in other photos (older gerbers on C0- is labeled GND. The balance terminals are labeled in programmers style, starting from zero :wink:

@JTAG, USB-c for the win! I already own a 75W satechi usb-c PD charger with additional “old-school” charge ports (very handy to charge my macbook and other gadgets and need bring just a single charger)

2 Likes

Well, if USB-C happens, I’ll definitely switch to a (this) BMS…

1 Like

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.