BMS (Battery Management System) || DIY or Buy || Properly protecting Li-Ion/Li-Po Battery Packs
Articles Blog

BMS (Battery Management System) || DIY or Buy || Properly protecting Li-Ion/Li-Po Battery Packs

January 7, 2020

Let’s just say you just created a homemade lithium-ion battery bank And if you have no idea how to do this then check out one of my previous videos Anyway, my pack got 4 cells in series with 2 cells in parallel each Which means it covers a voltage range of 16.8 to 12 volts outputs up to 40 amps continuously Features a capacity of 5 amp-hours and thus a nominal energy of 72 watt-hours That means that after adding wires to the pack and adjusting its output voltage to constant 12V with a suitable converter It is perfect for powering 12 volt devices But such a naked battery pack is not 100% safe to work with For example, if the battery pack got discharged I can charge it up with an appropriate constant-current constant-voltage method But during that process I noticed that not all cells feature the exact same voltage The reason is that not every cell is chemically identical and thus they all feature slightly different capacities and thus charge up faster which can lead to misalignments in the voltage of the cells and ultimately in the destruction due to over voltage Or let’s say the load failed and the battery got shorted, which I will certainly not try out because battery shorts can do a lot of damage To avert such safety problems, you can get yourself a BMS or battery management system from ebay for cheap Those not only offer a balanced charging and short-circuit protection, but also overcharge and discharge protection but since some viewers do not really trust such BMS circuits from eBay and tons of you asked asked for DIY BMS we will have a closer look at a commercial BMS and explain all of its functions and then create a DIY PMS based on Stewart Pittaway’s design in order to find out whether you should go with the commercial version or go the DIY route instead Let’s get started… [2011 Lookalike by Bartlebeats playing] This video is sponsored by JLCPCB where you can now get ten PCB’s in all available colors for the price of only two dollars and new customers also get a shipping discount on their first order To properly understand commercial BMS I got myself a few different ones The one I will have a closer look at will be the biggest one which basically comes with all the protection features you need After removing its top heatsink as well as its bottom paper insulation, I examined these circuit and found out that the PCB is divided in three functional groups So let’s start off with the top side and the components closest to the balanced connector which like the name implies Connects to each cell of the battery pack By having a look at the components under the microscope We can for one see a bunch of passive components like capacitors and resistors But also two transistors for each cell and one DW01A IC This IC protects each cell from overcharge, overdischarge, and overcurrent by simply utilizing 2 transistors Which we had a look at before in order to cut the cells connection to the load By flipping the PCB around, we got more components near the balanced connector Which once again where a couple of complementary passive components and also once again a transistor, but this time in combination with some bigger 200 ohm resistors and a BB3A IC Those markings on the IC are those of an HY2213 IC which is one cell lithium ion lipo balance charge IC as you can see in the example circuit of the data sheets. it’s job is to activate the transistor Which then discharges one battery cell through a resistor as soon as the cell voltage goes above a certain voltage value this way, after the charging process, all cells of the battery pack get charged up to 4.2 volts and we got a balanced pack Last, but not least, on the top side of the PCB right next to the B-, P-, and C- terminal Where you would hook up the main wires of the battery pack, we got 6P75NF75 N-channel power MOSFETs a A couple of passive components with transistors and three bigger resistors which act as a current shunt The way this works is that as soon as the battery draws more than the beam s max current of 35 amps, we got a voltage drop high enough across the current shunt to activate the passive component network and Thus turn of the MOSFETs and therefore the current flow This way the three functional groups of this BMS fulfill all the required battery pack protection features Pretty much all the other BMS followed the same PCB principle The only thing that is different sometimes is that balanced charging is not included And now that we know how a commercial BMS works and how much they cost on average I thought about how to create an improved version but while coming up with my own plan I realized that a viewer recommended me to have a look at Colin Hickey’s or Adam Welsh’s work for reference They have built and created a couple of videos about the DIY BMS (process) Which is a project from Stuart Pittaway that you can find on github After downloading its smaller PCB branch which like the name implies comes with a smaller PCB than its regular version I had a closer look at the schematic of the PCB to find out how it works First off after hooking up a battery cell this REG710NA regulator Creates a stable 3.3 volts for the ADUM1250 I2C isolator and the AT Tiny 85 microcontroller Through a voltage divider, the battery cells raw voltage get sampled and monitored by the AT Tiny 85 Which every few seconds sends over this voltage value through its I2C bus to the I2C isolator Which is on the other side hooked up to an ESP8266 development board which then provides this data for viewing through web browser But not only does the circuits monitor the voltage as well as the temperature of the battery cells through a thermistor But it also got a MOSFET, which if the battery voltage needs to get lowered, connects it to power resistor So online monitoring and balancing is easily possible which were improvements I was looking for That is why I uploaded the Gerber files of the PCB to JLCPCB in order to get ten of them for two dollars plus shipping and afterwards started sourcing the required components. I got the majority of them from Mouser and only a few either too expensive or special ones from eBay So as soon as the components arrived, as well as the PCBs, which looked very nice it was time a for soldering I basically used tons of flux, a microscope and a fine soldering tip to solder all SMD components to the boards According to the schematic which was pretty easy to do The only thing I messed up was that I ordered one component package size too big Which still worked for the resistors but was not the best option for the capacitors but nevertheless after three hours of soldering the SMD components of poor PCBs were soldered on Next I added the big power resistors, as well as the female header for programming and the JST terminals fully battery and the I2C lines to each board For the ESP8266 port, I went with this note MCU Which I soldered onto a small piece of perf. board to which I also edit a 4-pin JST terminal Its pins connect to 3.3 volts, D1, D2, and ground of the ESP8266 Which are mandatory for the I2C communication To program the ESP. I simply hooked it up to my computer Opened the given code for it, selected baud settings like they were described in the code and click upload After successfully uploading the code, it was time for the AT Tiny boards For which we only have an ICSP connector for programming So I connected an Arduino UNO to my computer in order to upload the arduino ISP Sketch to it Afterwards, I connected the Arduino UNO to the ICSP pins like it is shown here and Continued by downloading the proper board library mentioned in the code setting the correct board properties burning the bootloader which only sets the correct fuses of the AT Tiny and finally uploaded the code through the programmer which worked like a charm and As soon as all four boards were programmmed, it was time for the assembly. I Hooked up each battery cell pair to one PCB you through a JST wire that I prepared beforehand Once that was done, I connected the ESP8266 to power and firstly had to connect to it with my computer in order to enter its IP address in a browser to properly connect the ESP to my router I then checked my router to determine the new IP address of the ESP and typed it in to properly connect to it On the page. We cannot see much yet, but by clicking modules we can hit the provision button after connecting the first PCB to the ESP through a four pin JST wire (connector) After a few seconds, we should see the first module with the measured voltage and temperature of the battery cell After then repeating this connection and provision button hitting process three more times, We finally got all the modules recognized by the software which looked pretty awesome so far What I was missing though was a setting to set a maximum allowed voltage Thankfully though Colin Hickey improved the software which on the bad side means I had to reprogram all the boards But on the bright side means we got a maximum voltage setting plus a few more helpful settings Now after properly calibrating the battery cell voltages I set the maximum voltage to 4.1 volts and started charging the battery pack with my lab bench power supply as you can see, near the end of the charging process, the batteries exceeded this 4.1 volt value and Thus the boards balance them out by drawing around one amp of current through the power resistor so all and all the DIY BMS seems to work fine and offers with its online monitoring and balance charge function features that commercial BMS do not offer Only problem is that it is more expensive takes up a bit of time to solder and worst of all draws in quite a lot of current from each battery cell in comparison to commercial BMS So the DIY BMS makes sense to use in combination with, for example, a DIY power wall Which gets charged up through solar power, but not for your regular battery pack which sits around most of the time Because of that I declare that both DIY and BUY are this time the winner Because when used for the right application, they offer their own advantages that the other version does not have But what do you think? Let me know in the comment section below as Always thanks for watching. Don’t forget to Like, share, Subscribe Stay creative and I will see you next time!

Only registered users can comment.

  1. can you use your device with power from the wall during battery charging? Does the bms support usage during charging?
    this is possible in most devices andd im not sure how this can be possible on a diy device.

  2. Could you make a do it yourself battery management system using arduino Nano which can handle 4 lithium ion batteries in series? I would appreciate it if you would make such a circuit. Thank you very much! Please reply.

  3. awesome video! I'm researching batteries so I can rebuild some old Ni-cad power tool batteries. These BMS sound like the obvious solution. Seems some people opt for Li-Po battery packs or not using any protection and relying on voltage meters and custom charging solutions. This should allow accurate charging and protection to keep the voltage from getting too low in use. Thanks!

  4. Sir please help me,i have a question n i searching everywhere there is no answer,so i dicide to ask here, im confused with BMS modul 3S 25A.. May i changed into 2S 25A with that bms? Or i use a special BMS modul 2S 25A? Thanks you sir..

  5. Instead of joining the cells in packs permanently by soldering or welding, I join the cells with strong mini magnets. Then I can take the pack apart easily whenever the cells need charging. This way I can charge a lot, or all the cells at once in parallel, sharing the same 4.2 V voltage. No need for balancing when parallel charging. Each 18650 cell is current protected by a fuse. After charging I can (re)assemble the cells in series/parallel packs with magnets in different configurations, depending on the voltage and current demands for any desired purpose. This is the most cost effective, the safest and most versatile way of using and charging 18650 cells. All you need is a good quality power supply, that can handle a constant current according to the number of cells to be charged in parallel. I charge at 300mA per 18650, so a 10A power supply will charge about 30 cells at once. Obviously, it takes some time to take the pack apart and to reassemble it. But when using magnets this can be done reasonably fast.

  6. Can you advice me one BMS 16 s 60 v. For lityion polymer battery. (3,8 V 5870 mah.) ( ı do one battery back 16 s 60V 40 A.)

  7. any idea on it's quiescent current?
    looking at the use of a regulator and microcontroller, probably wouldn't be in the microamps, possibly a milliamp or two.

  8. How do you clean up the board appropriately after you are done? I can't give away a board that's full of flux to someone, it just looks unprofessional. What do you do to clean the board?

  9. Hi Great Scott! I need your help for DIY 5S BMS to power a cordless drill. What would you recommend for quick set up. Thanks.

  10. good day! first of all i love your videos. secondly i would like to ask you this . lets say i wan to make a battery pack with 10s3p battery pack but i want each of the 5 batteries to be in separate boxes and for the me to be interchangable with a connector type. so the question is this. if a take a 10s3p bms can i run it with less than 3 parallel ? i mean can i have for example only two 5 battery packs in series making the 10s part of the bms. and if i want later i could add an other 2 packs and make it a 10s2p without having any problem and without having to change the bms each time . the long term plan is to take a 10s5p bms and have it run with either 10s or 10s2p and so on until the max capacity of 10s5p. is something like that possible?
    thanks you ! <3

    edit i just figured that there arent any bms that have parallel connections that means i only need 1 bms 10s right? is something like that i ask above possible?
    thanks! again

  11. Scott !! great work. I'd followed this video alone to design an PCB for BMS but I've a doubt ! I've 8 li-ion cells, so do I require 8 DW01A IC'S for each cell or single DW01A IC for all the cells as a single battery pack ?

  12. How come the n-mosfet can be turned on? VGS should be higher than VCC to be on, so in this case the battery pack. Is the passive component circuit some kind of charge pump or bootstrap?

  13. can you explain the power consumption side of diy bms a bit clearer. At what circuit setup, did you measure the current of 12mA flow through DIY bms? For example, did you get this, when battery was connected to load through bms? How much was voltage and what is power consumed by bms?

  14. Can you recommend 14 lead wire harness and where to purchase for the BMS connector? Two routes to go purchase all the parts to make my own wire harness or just buy the pins, tool for removal of pins and crimping tool.

  15. So lets say for a 10s5p pack connected to a bike motor. Is there a case with the BMS where one of the parallel packs is lower then the other so the BMS disables that pack until the others come down to it? And will it affect the motor performance? Thanks

  16. Great video and information, thanks a lot!
    Is there possible to contact you privately for some questions and discussion? 😉

  17. So basically the DIY one only has online monitoring and the other functions are kind of junky. It's about 10 times pricier and it requires pro soldering skills and quite advanced programming skills… As a computer technician, I tell you this right now: DO NOT EVEN BOTHER! Unless you really know your way around Arduinos/ESPs, PCB soldering and you can't live without online monitoring (I think that online monitoring is already available on some pricier commercial BMSes), don't even bother to do this "DIY" project… It's a real pain trying to do something like this one for the first time and oh so many things can go wrong either in the soldering process or the programming steps…
    For me commercial is the total victor between them two, diy has almost nothing to offer. It is way bigger with so many PCBs, pricier, a real pain to make, worse at discharging, barely had an overvoltage protection after finally updating…

  18. I also make a video on bms inspired by him visit my channel to watch the video. in my video you got everything about BMS
    Topic cover in my video is:-
    1) how bms work 2)how to choose the right BMS 3)how to connect a bms 4) how it's work 5) if BMS take care of series what about the cells that are connected in parallel

Leave a Reply

Your email address will not be published. Required fields are marked *