Open Source BMS Project

flangefrog

1 kW
Joined
Jun 26, 2013
Messages
379
Location
Auckland, New Zealand
I've been researching this for quite a long time. I intend to develop and produce these myself but I do want community input. The PCB will be designed so that most non-essential components are optional. Even essential components like the ADC can be swapped with different parts (e.g. 12 bit with internal reference). Several external devices like LED or display modules will be developed. The BMS will only support 16S/65V max (15S Li-ion cells) but it is possible I could add a connector for another 16S module. The open source PCB could also be modified to allow 32S. Uses the MAX14921 AFE. Configuration as shown with 16 bit MAX11163 and 4.5V MAX6194 should give approximately ±500uV accuracy. FETs can be arranged for separate or combined charge/discharge ports. Can communicate with charger or controller instead of having on board FETs. Many I/O lines 12 bit ADC and internal temp sensor available on the Rigado BMD-300 NRF52832 module. Also auxiliary inputs available on the MAX14921 that feed into the high accuracy ADC. Possible to add 16 way switch for lots more high accuracy ADC inputs (temp etc). NRF52832 supports Bluetooth LE, ANT+, nRF24L, nRF24AP protocols. NFC support so you can tap your phone to the battery and instantly see the charge status. Extremely low power consumption. Doesn't even need a regulator to power ADC, reference and BMD-300. NRF52832 can be programmed with Keil, IAR, GCC and even has an open source Arduino firmware available. My software will probably be in GCC.

Lots of features and specifications I haven't listed. I'm rather slow at developing my projects so don't expect this to be finished within a year. I'll be asking your opinions and advice on some of the component selection before I start with the schematic. Cost price for quantity of 100 will be at least $70 USD for the full featured base module. Edit: I'm thinking it may actually be quite a bit cheaper than that (without assembly).

Incomplete BOM: https://octopart.com/bom-lookup/Zd9nAmFM

 
flangefrog said:
I've been researching this for quite a long time. I intend to develop and produce these myself but I do want community input. The PCB will be designed so that most non-essential components are optional. Even essential components like the ADC can be swapped with different parts (e.g. 12 bit with internal reference). Several external devices like LED or display modules will be developed. The BMS will only support 16S/60V max (14S Li-ion cells) but it is possible I could add a connector for another 16S module. The open source PCB could also be modified to allow 32S. Uses the MAX14921 AFE. Configuration as shown with 16 bit MAX11163 and 4.5V MAX6194 should give approximately ±500uV accuracy. FETs can be arranged for separate or combined charge/discharge ports. Can communicate with charger or controller instead of having on board FETs. Many I/O lines 12 bit ADC and internal temp sensor available on the Rigado BMD-300 NRF52832 module. Also auxiliary inputs available on the MAX14921 that feed into the high accuracy ADC. Possible to add 16 way switch for lots more high accuracy ADC inputs (temp etc). NRF52832 supports Bluetooth LE, ANT+, nRF24L, nRF24AP protocols. NFC support so you can tap your phone to the battery and instantly see the charge status. Extremely low power consumption. Doesn't even need a regulator to power ADC, reference and BMD-300.

Lots of features and specifications I haven't listed. I'm rather slow at developing my projects so don't expect this to be finished within a year. I'll be asking your opinions and advice on some of the component selection before I start with the schematic. Cost price for quantity of 100 will be at least $70 USD for the full featured base module.

Incomplete BOM: https://octopart.com/bom-lookup/Zd9nAmFM



Looks great, but spend some time learning what has halted all similar ambitions in the past.
Get a usable diy bms product out first. you can revise it later with extra features.
 
okashira said:
Looks great, but spend some time learning what has halted all similar ambitions in the past.
Get a usable diy bms product out first. you can revise it later with extra features.

I've read most the threads here on DIY BMSs. That was a couple months ago though, as far as I remember most of the threads just ended up with the OP not posting anymore :| Care to give an example of the problems or share a link? Of course during first basic prototyping (before completing the schematic) I will be starting small with just the MAX14921 and an Arduino with the minimum of supporting circuitry.

Looks like a similar BMS to what I envision was released recently:
https://endless-sphere.com/forums/viewtopic.php?f=31&t=78552
https://endless-sphere.com/forums/viewtopic.php?f=14&t=76011
 
I'll share some my experience as one of the people who has done this in the past...

Developing a digital BMS, regardless of the specific architecture, is orders of magnitude more complicated than an analog one. Most of the AFEs out there are designed to be used in a single configuration (ie 4S, 16S, etc) and aren't well suited to a design that will be configured after build. My suggestion would be to figure out what you need for your own use first, and then if you want to, offer it to the outside world. I'll warn you that while there's often a lot of initial enthusiasm for something like this, once you figure out what the price has to be the enthusiasm dies down quite a bit. I suspect that's why a lot of the threads just kind of disappear. It's a great learning experience, and I'd completely recommend you go ahead with it, but just be ready for it to get complicated quickly. ES user circuit has a bms for sale, and if you ask me was wise in that he just made something that would work for many people, but didn't try to make it applicable to 100% of people.

I'm not trying to dissuade you from doing this, just want you to know why some of the other projects seem inactive. My thread may be quiet, but the design is still ongoing. I've been fortunate enough to get connected with several companies doing commercial systems, and got to design several different BMS products for them that I wouldn't have been able to had I not done it on my own first. It's fun work, but a lot of work. I'll be happy to give any advice I can to help with your project as well.
 
dmwahl said:
I'll share some my experience as one of the people who has done this in the past...

Developing a digital BMS, regardless of the specific architecture, is orders of magnitude more complicated than an analog one. Most of the AFEs out there are designed to be used in a single configuration (ie 4S, 16S, etc) and aren't well suited to a design that will be configured after build. My suggestion would be to figure out what you need for your own use first, and then if you want to, offer it to the outside world. I'll warn you that while there's often a lot of initial enthusiasm for something like this, once you figure out what the price has to be the enthusiasm dies down quite a bit. I suspect that's why a lot of the threads just kind of disappear. It's a great learning experience, and I'd completely recommend you go ahead with it, but just be ready for it to get complicated quickly. ES user circuit has a bms for sale, and if you ask me was wise in that he just made something that would work for many people, but didn't try to make it applicable to 100% of people.

I'm not trying to dissuade you from doing this, just want you to know why some of the other projects seem inactive. My thread may be quiet, but the design is still ongoing. I've been fortunate enough to get connected with several companies doing commercial systems, and got to design several different BMS products for them that I wouldn't have been able to had I not done it on my own first. It's fun work, but a lot of work. I'll be happy to give any advice I can to help with your project as well.
Thanks for your comments.

I have read through the MAX14921 datasheet lots of times and it appears it will work with anything from 3S to 16S and all that needs to change is the unused inputs should be shorted together (which can be done via switches or solder bridges). I looked at pretty much all the AFEs available before settling on the MAX14921. The reason I want to use the MAX14921 is for for availability, price and simplicity. The communication is pretty simple, no programming required. It's 16S so I only need one AFE, one ADC etc. It allows me to use a single more expensive and accurate ADC/reference. The Maxim documentation is as always very easy to follow and there are good white papers and evaluation kit datasheets available. It has integrated FET drivers for balancing, a 5V LDO which may be able to power the logic and low power consumption.

You make a good point about designing for my own use first - trouble is I have lots of ebikes and want a very flexible BMS :D I am designing this mainly for myself as I'm unlikely to make much money from selling it. There will probably be (almost?) no circuitry on board for features others may want such as an external LCD. It will just have some I/O lines and power broken out which things like that could be attached to.

All the expensive components can be had for free through sampling programs so the bigger development costs are going to be the PCB prototypes (~$100 NZD each for a 4 layer board). There's a very good PCB manufacturer near me in Auckland where I will be getting those done.

I'm certainly susceptible to losing interest in projects after a while. Usually it's because I overthink things and try to get everything exactly right before starting. I tend to work much better just diving in and getting to work. That's why I'll be doing the first prototypes on a breadboard. I already have the Maxim components mounted on breakouts although I need to redo the MAX14921 on a breadboard compatible inline breakout.

I'm planning to use the same PCB layout and very similar components to what Maxim use for the AFE portion of their evaluation kit which should make the circuit and PCB design much easier. The Rigado BMD-300 module has practically all supporting components needed for the nRF52832 on board which will also help.

My current BMS (one of them anyway) is a 14S model from Greentime. It seems to work fine but it has no feedback so I would have no idea if it failed. The important features I want over this are:
  • High accuracy state of charge estimation (coulomb counting)
  • Charge time estimation
  • Ability to see battery/power stats on my phone while riding via Bluetooth/easy pairing and launching of app via NFC
  • Self tests/feedback to check it's working properly.
  • Audible alarm for certain events
  • High efficiency FETs (paralleled) or none at all and disable controller.
  • Use controller shunt for higher efficiency?
  • Easily adjust max/min cell voltage and balance voltage for long life. Based on accurate voltage measurement.
  • Battery history/statistics
  • Communication with charger
  • Battery temperature monitoring. My battery occasionally gets pretty hot when charging outside in the sun.
  • Reasonably splashproof (will often be used in the rain but will usually be inside a battery case)

I actually linked to circuit's BMS in my post above. It looks good and it's very similar to what I want to create. It has 10mv accuracy which is the minimum I would like (I'm interested in which AFE/ADC/reference combination he's using to achieve that). The main difference is that I want to use the nRF52832 with it's BLE/NFC capabilities and low power consumption. I'm not sure if the software is open source - I really want to be be able to change it. It would probably work just fine for me but I like to do things myself - that's why I have DIY ebikes rather than a store bought one.

I'll post some questions up here soon. The areas which I haven't specced out yet are the current monitoring - I'm thinking LTC2050 so I can make use of the high accuracy MAX11163 - and how that will work with differing ground potentials under load. The other main thing is the charge/discharge control FETs and drivers. I haven't looked at how much power they require but I'd like to make the whole board run off the 10mA MAX14921 LDO if possible.
 
One other suggestion is to make the BMS board (with associated "must have" features like charge/discharge FETs, etc) on one board with an external board for the controlling cpu. I used an Arduino pro mini since they're easy to use and cheap, but anything would work. It also helps to separate the analog and digital grounds out since your high speed digital stuff is on the external board. Then when you want to add things like bluetooth, logging, etc, you don't have to redo the entire BMS portion of the project.
 
Alan B said:
Best of luck, it takes a lot of energy to complete these projects.

I have quite a few started myself.

Keep it simple, have fun, and let us know how it is working out. Getting some feedback can help keep the project interesting for you.
Thanks. I'll try to post regular updates anytime I make some progress on it.

dmwahl said:
One other suggestion is to make the BMS board (with associated "must have" features like charge/discharge FETs, etc) on one board with an external board for the controlling cpu. I used an Arduino pro mini since they're easy to use and cheap, but anything would work. It also helps to separate the analog and digital grounds out since your high speed digital stuff is on the external board. Then when you want to add things like bluetooth, logging, etc, you don't have to redo the entire BMS portion of the project.
Yes, I actually was originally considering to have the whole board split up into modular pieces but it got too big and complicated. The nRF52832 is already so capable the only thing I can think to add would be some extra flash (it has 512kB). It would be nice to mount it on a removable board though because it would allow me or anybody else to use an Arduino or any other micro in it's place. It's hard to find good low profile connectors that don't cost too much.

I think if I were to completely separate the analog and digital grounds I would need to use a separate linear regulator but that's not too big of a deal. Edit: or maybe not. I'm tired right now and can't think :)
 
dmwahl said:
Separate analog/digital ground doesn't mean totally isolated, just that they're arranged to avoid coupling between the two. Regardless, you can do it just as well on a single board with a single regulator.
Ok, so I would just keep the AFE AGND connected to the low side of the ADC differential input and then couple that at a single place with a capacitor to DGND? Do you think GND from the MAX6194 reference should be connected to AGND?
 
I'll return to the AGnd/DGnd discussion before I build the schematic.

For the last week or so I've been researching all the shunt monitoring products available. Are there any reasons you can think of to go with high side current sensing (and fets)?

The downsides to high side monitoring are the very slightly reduced accuracy and the introduction of a voltage limit. The voltage limit isn't too much of a problem as there are many current sense monitors available with a 60V limit but it does mean some better products with a lower limit can't be used.

I'm thinking I'll probably go with a dedicated current sense monitor rather than an operational, differential or instrumentation amplifier as it will probably be a lower cost and simpler circuit for the same accuracy. Probably also a smaller package size. I would like to get better than 0.1% accuracy current monitoring when calibrated so it can measure lights and controller current. I also want to use a small shunt from 10mV to 30mV.
 
Alan B said:
One thing to keep in mind is that some users will series up these BMS'ed packs externally, I didn't go back and review whether that was already in your requirements. For example running two 36V packs (each with its own separate BMS) in series in a 72V system.

I didn't mention it, but it is a requirement. Can you give an example of a situation in which low/high side current sensing or fets would affect this?
 
I haven't thought about that, but it depends on the topology of the switches and the current sense. I see no reason do to a high side sense, the P FETs are more costly last time I checked and are harder to drive on the high rail, so most BMS designs I have looked at use the low side switching and current sensing.
 
Alan B said:
I haven't thought about that, but it depends on the topology of the switches and the current sense. I see no reason do to a high side sense, the P FETs are more costly last time I checked and are harder to drive on the high rail, so most BMS designs I have looked at use the low side switching and current sensing.
I did come across this while looking at some reference designs: BQ76200 High-Side N-Channel FET Driver. A bit expensive but would simplify the high side switching. If there's no need to do high side switching and sensing I agree it will be best just to do it on the low side.

One of the (many) parts on my shortlist for current sensing is the INA226 36-V, Bi-Directional, Ultra-High Accuracy, Low-/High-Side, I2C Out Current/Power Monitor w/ Alert. It has a full range shunt voltage of ±81.92mV but should still get good accuracy and precision with a lower resistance shunt with it's 16 bit ADC, ±2.5uV typical shunt offset voltage and 0.02% typical gain error.

I was going to use a current sensor with a single ended voltage output going into the aux input of the MAX14921 for the current sensing but the INA226 is really not that expensive and I'm not sure if I'd actually be able to achieve better accuracy that way. If I used the former option I would also not be able to measure so often as the ADC needs to spend most it's time reading each of the <=16 cells and other aux sensors. With the INA226 it's possible to set the sample time and oversampling number separately so even if reading at 1Hz it would be more accurate. It may also be possible to synchronize the current and voltage measurements for slightly more accurate power measurements.
 
Alan B said:
Are you planning for short circuit overcurrent protection? What time window do you have to shut off the FETs before the current rises to a damaging level?
I am planning for overcurrent protection of course, but personally I think fuses are a better option for short circuit protection as mosfets often fail closed. I don't have a lot of experience though so would be interested in hearing some other views. I really don't know anything about the time windows yet. I'm guessing you're asking this because of the sampling/oversampling time of the current sense monitor. I didn't really think about the implications of this in regards to short circuit protection.

The INA226 does have an alert output which can be set to an over current alert. The alerts are processed after every shunt voltage conversion so even if it had 1000x oversampling for a very slow readout the alert would be processed after a single sample. The single sample could take 140μs to 8.244ms depending on the settings. The bus voltage conversions will likely be disabled (if possible) or unused.
 
A good circuit can sense overcurrent and shut down before the FETs are damaged as stray inductance limits the rate of rise, but then you have microseconds to react. I don't know if that's a design goal you have or not. Fuses are problematic at these voltages. Solar DC breakers are perhaps the easiest and lowest cost solution.
 
Alan B said:
A good circuit can sense overcurrent and shut down before the FETs are damaged as stray inductance limits the rate of rise, but then you have microseconds to react. I don't know if that's a design goal you have or not. Fuses are problematic at these voltages. Solar DC breakers are perhaps the easiest and lowest cost solution.
Short circuit proection is not really a big issue for myself, but it would be nice to have. It's definitely worth putting some time into to see if it can be done without too much compromise. If the sampling time of the INA226 is too long I wonder if using something like the INA301 Overcurrent protection high-speed, precision current sense amplifier with integrated comparator (1µs response time) in parallel would be good. It's a bit expensive but depending on the current shunt layout an el-cheapo op-amp and comparator could be used instead. The outputs would go directly to the fet drivers as well as alerting the nRF52832.

I'll still keep looking at using an analog output current shunt amp as they (in combination with a comparator) would probably solve the problem.

Is the fuse trip time the problem with low voltages?
 
Fast acting high voltage DC fuses are expensive and bulky. They need to be rated for the total voltage, not just the half-pack. They need to be designed to extinguish a DC arc. Quite often the cheap ones fail to break the arc and the holder melts and makes a mess. A brief short is a non-event with FETs that shut off, but with a fuse it is probably a long walk home and a repair. Finding a 100V 100A fuse is not easy. A circuit breaker is not so hard to find these days with all the solar system markets creating a good demand for them. The 60 amp breakers are particularly inexpensive. But even with a good DC breaker there may be a lot of energy dissipated in a short before it blows.

I've used fuses but am moving toward breakers. Carrying a spare fuse is not likely to happen, and a big hill might pop the fuse. I popped a 63 amp breaker on a big hill, I sure was glad it was just a moment to fix.

Now I upgraded to a 100A breaker. :)
 
Alan B said:
Fast acting high voltage DC fuses are expensive and bulky. They need to be rated for the total voltage, not just the half-pack. They need to be designed to extinguish a DC arc. Quite often the cheap ones fail to break the arc and the holder melts and makes a mess. A brief short is a non-event with FETs that shut off, but with a fuse it is probably a long walk home and a repair. Finding a 100V 100A fuse is not easy. A circuit breaker is not so hard to find these days with all the solar system markets creating a good demand for them. The 60 amp breakers are particularly inexpensive. But even with a good DC breaker there may be a lot of energy dissipated in a short before it blows.

I've used fuses but am moving toward breakers. Carrying a spare fuse is not likely to happen, and a big hill might pop the fuse. I popped a 63 amp breaker on a big hill, I sure was glad it was just a moment to fix.

Now I upgraded to a 100A breaker. :)
Thanks for the insight. The breakers sound like a good compliment (backup) for FET protection but they are rather large - not something I'd want on a lightweight stealthy bike.

Do the BMS fets have to be over rated (voltage wise) the same amount as controller fets? I imagine that it's possible the BMS could be exposed to the motor's inductance.

The best mosfets available at the moment appear to be TI (balancing both swithing time and RdsOn) so one of these is probably what I'll use (as the highest end option): http://www.ti.com/lsds/ti/power-management/n-channel-mosfet-transistor-products.page#p267=60;100&p2749=0.59;2.3
Edit: or Infinion OptiMOS™ 5
 
Back
Top