**A Detailed Guide to Building a DIY BMS**
I recently embarked on a project to build a DIY Battery Management System (BMS) and I'm excited to share my experience with you. The goal was to create a system that could monitor and balance the battery cells in a 12V lead-acid battery pack, while also providing online monitoring capabilities.
**Designing the BMS**
I started by designing the circuitry for the BMS using a microcontroller (ESP8266) and an AT Tiny IC. The ESP8266 would be responsible for monitoring the battery voltage and temperature, while the AT Tiny would handle the balancing process. I also added a MOSFET to connect a power resistor to lower the battery voltage if needed.
**Sourcing Components**
I sourced the required components from Mouser and eBay. I was able to find most of the components at a reasonable price, but a few were either too expensive or special ones that I had to source from eBay.
**Soldering the SMD Components**
Once all the components arrived, it was time for soldering. I used tons of flux, a microscope, and a fine soldering tip to solder all the SMD components to the PCBs. According to the schematic, this was a pretty straightforward process.
**Adding Power Resistors and JST Terminals**
Next, I added the big power resistors, as well as the female header for programming and the JST terminals for battery and I2C lines.
**Programming the ESP8266**
To program the ESP8266, I hooked it up to my computer and uploaded the given code. The code was pretty simple to understand and follow.
**Programming the AT Tiny Boards**
For the AT Tiny boards, I connected an Arduino UNO to my computer and uploaded the arduino ISP Sketch. Then, I connected the Arduino UNO to the ICSP pins and continued with burning the bootloader and uploading the code through the programmer.
**Assembly and Testing**
Once all four boards were programmed, it was time for assembly. I hooked up each battery cell pair to one PCB using a JST wire that I prepared beforehand. After connecting the ESP8266 to power, I connected to it with my computer and entered its IP address in a browser to properly connect the ESP to my router.
**Online Monitoring and Balancing**
I then checked my router to determine the new IP address of the ESP and typed it into the browser. On the page, we couldn't see much yet, but by clicking on "modules," we could 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.
**Calibrating Battery Cell Voltages**
I repeated this process three more times until all the modules were recognized by the software. I then set the maximum allowed voltage to 4.1 volts and started charging the battery pack with my lab bench power supply.
**DIY BMS Advantages**
The DIY BMS seems to work fine, offering online monitoring and balance charge functions that commercial BMS do not offer. However, 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.
**Conclusion**
In conclusion, while the DIY BMS offers its own advantages, such as online monitoring and balancing, it may not be suitable for regular battery packs that sit around most of the time. However, when used for the right application, like a DIY power wall charged up through solar power, it can be a great option.
**Final Thoughts**
I hope this article has provided you with a detailed guide to building a DIY BMS and its advantages and disadvantages. If you have any questions or comments, please feel free to share them below.