DIY 6S to 12S BMS with CAN - DieBieMS

Spent the last 2hrs watching my battery pack being balanced by this BMS :joy:

Ok, so I did manage to do something productive in that time…

The above figure should be pretty straight forward, but use at own risk. Please let me know if you see anything wrong with it.

I wired up the power button first, and wasn’t sure how it should behave. In my playing around I may have held it down a little long and reset its settings. I then left it on charge for a little while. After wiring up the OLED display it was showing that my battery was flat, whereas the multimeter was saying otherwise. Checked out the settings in the VESC tool, and found it was setup for LiIon (and not LiFePO4). High cell was only charged to 3.61v, so no damage done. After you wire it up I’d definitely suggest either confirming settings via VESC tool, or watch with a multimeter before leaving alone for a while.

Took all of 2min to reconfigure the BMS in the VESC Tool (needs to be v0.82), and now it’s been chipping away at the cell imbalance for the last couple hours. It’s really kind of cool. The watt meter I have on my charger shows the BMS switching between discharging the high cells, then bulk charging the pack. At the same you can check out how the balancing is going in the VESC tool on a cell-by-cell basis.

@JTAG and @fedestanco thanks again for all the effort you’ve put into this, it shows :raised_hands:

5 Likes

Thanks for the diagram! I was like 100% sure to have uploaded your custom firmware to your bms. If you found the wrong firmware maybe now somebody else has your Lifepo4 firmware on his bms :frowning: . What values (max cell voltage…) did the vesc tool show before you changed them?

Yeah, good point. This is what it was set to before.

---   BMS Configuration   ---
NoOfCells                  : 12
batteryCapacity            : 10.00Ah
cellHardUnderVoltage       : 1.800V
cellHardOverVoltage        : 3.950V
cellSoftUnderVoltage       : 2.100V
cellSoftOverVoltage        : 3.700V
cellBalanceStart           : 3.800V
cellBalanceDiffThreshold   : 0.010V
CAN ID                     : 10
--- End BMS Configuration ---

So there are two wires attached to pack negative thanks for heads up @fedestanco

This values aren’t even appropriate for liions… Maybe the custom firmware was defective by itself. I will try to double check the 12s-lifepo firmware again and see whats written on it.

Been looking at communication with the DieBieMS via a command line app over the last few days. Started off as something really hack’ish, and now it’s a little cleaner and better documented so figure it may be of use to others. Could do with some more error checking, unit tests, etc.

It’s a command line app written in Python that will run DieBieMS terminal commands. No need for the VESC Tool, although it’s possibly still the preferred option for those who like a GUI.

Install and usage details can be found over on the repo. Hopefully once up and running it should be easy enough to use.

To list available serial ports run: python dbmscmdterminal.py -l

To run a DieBieMS command run something like (will print DieBieMS command help), you will need to replace <MY_SERIAL_PORT> with a serial port found by the above command: python dbmscmdterminal.py -sp <MY_SERIAL_PORT> -c help

You’ll need quotation marks around space separated commands. For example; python dbmscmdterminal.py -sp <MY_SERIAL_PORT> -c "config_set_cells 12"

There’s a record mode that runs continuously polling the BMS and writing out cell voltages, percent charge (and all other available params) to a set of CSV files. python dbmscmdterminal.py -sp <MY_SERIAL_PORT> -r

The only thing it won’t do is upload a new firmware (yet), but on the upside you don’t need to track down a special version of the VESC Tool to setup your DieBieMS.

@jtag please don’t feel you need to maintain any level of backwards compatibility for this. I’ve invested very little time in it so far so if it gets broken, and is never used, then I really don’t mind. However, I am interested in what your thoughts are going forward. Is the client side/desktop stuff something that you’d like to focus on, and should we hold off on investing more time and doing anything ‘prettier’?

4 Likes

Hi there,

I’ve also been starting to make the “perfect BMS” and looking at your design raised me with some questions:

  1. Why didn’t you use this IC? bq76pl455a

it can balance AND monitor up to 16 cells

  1. why did you go south the standard JSP XH connector? most battaries use that already.

  2. I see you use the DF13 connectors which are realy great worked with them alot as a drone engineer I think you should be following the pichawk hardware format when pinning them.

  3. is the charge port isolated when no voltage applied at the input? If there is voltage at all times the physical port may short sins it’s usually exposed and live so consider addind an isolation along with some reverse polarity protection.

Thanks for paying attention keep me updated if you want to work together on this project.

Also I don’t know what about you guys but I’ve found the 3P GX-16 to be the ideal connector for charging sins it’s small and can carry just enough current for everything and it also have that locking nut feature which it great!

I already featured it in my swap able battery pack(Yes I know it’s 4P instead of 3P was too lazy to model the 3P one):

2 Likes

1, Bacause: “Monitors and Balances 6-to-16 Cells per Device” and I want to go lower (although the title says 6 to 12S I can do 4S(havent tested lower yet) to 12S). But having a system that can do up to 14S is on my desires list, TI has quite a broad choice but nothing 4 to 14S as far as I know.

2, because they suck balls(mechanically), are to wide for 12S + sensors, existing batteries rarely go to >6S in a single pack, they don’t have temp sensors and most dedicated skateboard builders will build their own packs.

3, They are Molex Picoblade / wurth WR-WTB 1.5mm. What do you mean with that I should follow their wiring / hardware format? Does a FC have the same type of interfaces that I do?

4, Read the schematic or the thread to find out :grimacing:.

No thanks.

GX-16 is what old people use on CB radios :roll_eyes: also mechanically crap, modern people go for mini XLR, XLR, neutrix power con, BINDER, PoPD rosenberger or regular DC jacks, one might even go for the modern industrial M12.

1 Like
  1. 4S is a whole other category can’t imagine people even go under 10S with their built sins it’s just not efficient in terms of current handling in relation to power.

2)You could fit it there easily along the width on the PCB just look around most batteries use that connector. just make a separate connector that will go in parallel to the balance one (Should use some 2.54mm spaced one) sins most people don’t have a temp sens installed on their pack yet if they might even want it.

  1. NVM thought that was a DF13

  2. to save some time from learning about the more that million ic’s available it’d be nice to get a summery on the system overall features.

Right XLR might be suitable but it’s used alot in the music industry unlike GX16 which I could hardly find any product use for expect some soldering iron handles that use the 5P ones.

Feel free to change anything you like and implement it any way you want. I don’t see any of your motivations as a reason for me to change anything, but it’s opensource so you are free to do so :innocent:.

1 Like

Just offering a few suggestions and asking a few questions to expand my knowledge that’s all.

You see Mike I am always open to consider any suggestion regarding the production, IF it’s reported in a polite and constructive format. “why don’t you go for X brand for the diodes? they are just as good and cheaper” -this is constructive.

“I am not going to pay this much for this stuff, how about half price?”- this is, you know…,retarded

2 Likes

anyone thinking of printing an enclosure head over to @lock’s design posted in his build thread, better design and should fit together properly unlike my abomination

Are we reading two different posts? All of his posts appear very polite and friendly to me.

Maybe its just because of the language barrier (english is not my first language) but this comment [quote=“Mike_Lemon, post:386, topic:20947”] 90 euro?! How did it get so expensive?

I’d be comfortable to pay 50Euro for one piece and 40 for bulk, [/quote] felt a bit arrogant. I may be wrong though, for this reason I answered in detail to his question.

I had the same Feeling when reading his sentence. I think it is very rude of him!

I am just happy that he has published it so anybody can make it on their own.

2 Likes

Ah. That was on a different thread. Not here.

@JTAG have you had any thoughts about controlling charging current on BMS itself? I am thinking what is a possibility for this, as I do not want to get another module to limit the current power supply for charging.

Any option to transform an external constant voltage supply either by implementing a buck or boosting converter to the BMS will limit its functionally/universality for the type of battery pack ( voltage ), charge power ( DC DC current ) and increase cost.

Or where you suggesting something else?

1 Like