DIY 6S to 12S BMS with CAN - DieBieMS

Fancy!

XLR can be used as a charging plug, a friend of mine did it and it worked fine.

It is unclear to see but the balancing leeds might need some more room to get into a right angle radius, this gets me as well sometimes.

I decided to make 2 holes and n front of the balance lead port, I will split the leads into two silicone tubes running up the ‘spine’ of @agniusm’s packs

The xlr panel was too large, by itself it would raise the enclosure height another 5-10mm so reverted back to a laptop port 5.5mmx2.5mm iirc, the thread for this should be about 10mm so that’s what I’m printing right now HNY!

Ps: all being good once design is acceptable I will publish and link here my feeble attempt :ok_hand::shamrock:

1 Like

Will be delayed prototyping as printer has a bed problem and have to leave for work tomorrow so HNY all will have something by next weekend

If delay is bad I picked up the initial case design on thingiverse

I managed a print of the bottom shell before my printer crapped out…too small, I need to work in scaling and fixing the problems

i.e. Moving the holes for the balance wires closer together

Added can comms port

Changed xlr port to 10mm threaded hole

12mm switch threaded hole

It glows in the dark…crappy iPhone

1 Like

Quick question…

When wiring up do you connect the main battery +/- then the balance cables (or vice versa)?

I know some BMSes are a little sensitive to the order in which this is done.

DO NOT SCREW THE CONNECTION UP!! I did it and had to replace a couple resistors. To be 100% sure, double check with the multimeter: you should see increasing voltage from c1 to c12; this way the diodes can do their job.

6 Likes

Thanks for that figure. I was 90% sure that was the way it was intended, nice to be 100% :+1:. And yes, I’ll definitely go over it with a multimeter first.

BUT, when I’m connecting the wires to the BMS should I first connect the battery main +/-, then the balance connectors? It possibly doesn’t matter with this BMS, but does with some others.

Another question too… I wasn’t planning on using the temperature sensors right now; can I simply leave T1, T2, and the “GND FOR NTC’s” disconnected? Or do I need to hack it and include some conventional resistors I have lying around (ohms?)

1 Like

Heh, it’s a bit of a rabbit hole… Just started looking at the other parts that need to be wired up; power button and the oled display.

I should be able to figure out the oled display, I have 4 labeled pins on the oled PCB (GND, VCC, SCL, SDA) and the schematic for the BMS. I don’t know which pin is number 1, but one end is 3v and the other ground so that should let me figure out which is SDA/SCL.

Power button gets a bit more complicated; showing off my lack of electronics background. Even if I knew which pin was what I still have little idea how it should be wired. eg; when the button is pressed is the circuit completed from the “PushButton” pin to ground pin or 3v pin. Similarly the smart LED; except that gets a little more complicated as polarity matters.

lil help would be much appreciated. :grimacing:

Anyway, it’s Saturday night here and a few beers means it’s time to put the soldering iron away.

Presumably the anti spark facility of the board allows for the balance wires first the the mail battery +/- otherwise you would not be able to have a battery quick disconnect @JTAG

Printing at the minute so please wait for my results, also I was planning on making the top much fancier Edit: removed thing, the scaling is still wrong :frowning:

Update: I’m mid-print on another and looking good so releasing again https://www.thingiverse.com/thing:2748550

Came out ok, could mate be scaled back another mm in length/width

Panel mounts need very small file work to get to fit

Update: Problem with one of the panel mounts interfering with the switch port, need to move panel mount 3mm, will update soon. Also the ‘gasket’ interfact between top and bottom shells is not a perfect watertight fit, going to recut that…for the moment removed the bottom shell design.

On the plus side with a plain top the enclosure will be 30mm tall :wink:

To anyone printing or thinking of please know this is a living doc but is not perfect by any means open to any guru improving it and doing a spinoff on thingiverse

2 Likes

I’ll try and take a picture of my wiring tonight. You can connect the battery in any order as far as I know, first balance then terminals and vice versa.

1 Like

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