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!.