# DIY Lithium Battery Balancer and monitoring (BMS)

**URL:** <https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594>\
**Category:** Hardware\
**Tags:** powerwall, bms, diybms, battery\
**Created:** [8 November 2017 13:02 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594 "2017-11-08T13:02:53Z")\
**Posts on this page:** 20\
**Page:** 36

<div class="post-metadata">

**Author:** ![aussiegwapo](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/aussiegwapo/32/7845_2.png) [@aussiegwapo](https://community.openenergymonitor.org/u/aussiegwapo)\
**Post date:** [23 November 2018 21:02 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/710 "2018-11-23T21:02:19Z")

</div>

I just used a pear of pliers and a good set of wire strippers

 ![20181124_070122](https://community.openenergymonitor.org/uploads/default/original/2X/7/7c67e4be79d294d122792b33b062f53214f5f7a6.jpeg)

---

<div class="post-metadata">

**Author:** ![TommyBoy](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/t/7feea3/32.png) [@TommyBoy](https://community.openenergymonitor.org/u/TommyBoy)\
**Post date:** [25 November 2018 15:52 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/711 "2018-11-25T15:52:21Z")

</div>

Hi Oliver, I’d also like to use the diyBMS on a boat, your solution looks good! Have you managed to get things running well?  
Happy boating!  
Tom

---

<div class="post-metadata">

**Author:** ![Dirk\_Walde](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/dirk_walde/32/15134_2.png) [@Dirk\_Walde](https://community.openenergymonitor.org/u/Dirk_Walde)\
**Post date:** [26 November 2018 18:28 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/712 "2018-11-26T18:28:24Z")

</div>

Update:  
It will be more stable with me.

- 14 modules bus 20 cm between all modules + 20 cm ESP + 20 cm additional power supply 3,3v.
- ESP with 5V power supply + 0.5k ohms / 500 ohm resistor
- Additional power supply 3,3v at the end of the module also with + 0,5k Ohm / 500 Ohm resistance  
~~ 320 cm bus / 14 modules  
and run just under load when loading or unloading just quite stable.

had synonymous tested 2.2k and 1K was best with me 500 ohms will still test 680 ohms when I have time.!

Update: I have made aluminum foil around the data lines for shielding.

\*\*  
Question: Does anyone have any idea about programming with Arduino and can help me with the problem with the balance times?  
\*\*

- Load test with 60W \*

 ![IMG_20181126_192909](https://community.openenergymonitor.org/uploads/default/original/2X/a/a4aff271c73b58a25fb9f59e0ad7154d3dc52a93.jpeg)

 ![IMG_20181121_131938](https://community.openenergymonitor.org/uploads/default/original/2X/a/ad1e9013ee5d311bb88121d2a051faa47614624a.jpeg)

 ![IMG_20181126_192922](https://community.openenergymonitor.org/uploads/default/original/2X/9/9ab1017c713e68dbe0f7c74ca9ebf4332a67c02b.jpeg)

 ![IMG_20181126_193320](https://community.openenergymonitor.org/uploads/default/original/2X/0/08ff563936ee2af01b6d596c7b549730b1c04c9c.jpeg)

 ![IMG_20181126_193315](https://community.openenergymonitor.org/uploads/default/original/2X/3/3f60b71bb212d071a0504b4a28ecd838202daad4.jpeg)

---

<div class="post-metadata">

**Author:** ![Vela\_Nautica](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/vela_nautica/32/19361_2.png) [@Vela\_Nautica](https://community.openenergymonitor.org/u/Vela_Nautica)\
**Post date:** [27 November 2018 00:18 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/713 "2018-11-27T00:18:34Z")

</div>

Hi Tommy,

Yes it looks promising at this time, I set a 24V600Ah 6P8S batterie pack up and BMS is working flawless.  
as I described above I added lots of funcionality and use an ESP32. I just designed a shiel for it @ JLCPCB to switch away from my development shield.

I realised that one cellpack 6P is always a bit early charged or early low, maybe that has less capacity than the others. I will perform a bottom balancing after using the batterie for a while.

I do not have any issues with I2C, neither when using the inverter or when charging. I use a Victron Multi charger inverter.  
I added some more safty checks on values coming from I2C so the software will not let unreasonable values pass.

all the best Oliver

---

<div class="post-metadata">

**Author:** ![Bob\_Brundage](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/b/3ec8ea/32.png) [@Bob\_Brundage](https://community.openenergymonitor.org/u/Bob_Brundage)\
**Post date:** [29 November 2018 03:19 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/714 "2018-11-29T03:19:08Z")

</div>

See picture for my status  
When I got to the 7th pack, I could not get the wemos to provision. I wrapped all of the 4 pin buses with tin foil. Then the 7th pack provisioned. But the readings are unstable (65V, 4.0V,0.0V).

I am using 1.0KOhm resisitors on the wemos… Any ideas on how to stablize?  
Bob

![IMG_0375](https://community.openenergymonitor.org/uploads/default/original/2X/2/2824d6f48293ca1706025bf9c20e1122d58544f6.jpeg)

---

<div class="post-metadata">

**Author:** ![aussiegwapo](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/aussiegwapo/32/7845_2.png) [@aussiegwapo](https://community.openenergymonitor.org/u/aussiegwapo)\
**Post date:** [29 November 2018 09:39 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/715 "2018-11-29T09:39:17Z")

</div>

Hi mate the easiest way to provision your BMS is the test controller via serial command it work for me with the new V3 bms thanks to Dirk\_Walde game me the info and i tried it worked like a dream.

---

<div class="post-metadata">

**Author:** ![stuart](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/stuart/32/16661_2.png) [@stuart](https://community.openenergymonitor.org/u/stuart)\
**Post date:** [29 November 2018 10:48 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/716 "2018-11-29T10:48:52Z")

</div>

> [@Bob\_Brundage](#):
>
> 1.0KOhm resisitors on the wemos

Thats a very low value to be running on the pull up resistors.

Have you measured the voltage on the module (on the ADUM chip) to see if its still above 3.3v ?

---

<div class="post-metadata">

**Author:** ![Dirk\_Walde](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/dirk_walde/32/15134_2.png) [@Dirk\_Walde](https://community.openenergymonitor.org/u/Dirk_Walde)\
**Post date:** [29 November 2018 11:48 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/717 "2018-11-29T11:48:23Z")

</div>

Test with two Power Supply on ESP and on the bus end 🕶  
!!! Test with 2,2k / 1k on both ends !!!

> [@Dirk\_Walde](#):
>
> - ESP with 5V power supply + 0.5k ohms / 500 ohm resistor
> - Additional power supply 3,3v at the end of the module also with + 0,5k Ohm / 500 Ohm resistance  
> ~~ 320 cm bus / 14 modules

!!!  
I isolated every single data line.  
Not all four lines in the package  
!!!

> [@Dirk\_Walde](#):
>
> I have made aluminum foil around the data lines for shielding.

For Test the Moduls

> [@Dirk\_Walde](#):
>
> ? A question “aussiegwapo” Brett. ?  
> Where did you buy your connection cables? Were they already so finished or did you mount the plugs themselves to the cables.
> 
> to your problem yet:  
> I can only recommend you to delete the Attiny again (Arduino example Attiny EEPROM CLEAN) and rebuild with the Board Script. And then via the ESP BMS test software to check if the controller is visible with “X” in the serial console.
> 
> And you have me in the normal ESP firmware set a loop for the serial console with output of ID, volts and temperature.
> 
> Arduino-ESP8266-BMS-Controller.ino

💾

\*\*  
Question: Does anyone have any idea about programming with Arduino and can help me with the problem with the balance times?  
\*\*  
🖱

---

<div class="post-metadata">

**Author:** ![aussiegwapo](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/aussiegwapo/32/7845_2.png) [@aussiegwapo](https://community.openenergymonitor.org/u/aussiegwapo)\
**Post date:** [29 November 2018 12:10 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/718 "2018-11-29T12:10:47Z")

</div>

Hi dirk

Take a look at Colins coding that may help you [GitHub - chickey/diyBMS: Do it yourself battery management system for Lithium ion battery packs/cells](https://github.com/chickey/diyBMS)

I havent put all 11 modules under full run and charge belance yet as im building the 6p packs for my LIPO Poly packs.

Im running colins coding due to the auto balancing on packs which i like

But i dont have an EPever charge controller has the same charge controller as you do.

---

<div class="post-metadata">

**Author:** ![Dirk\_Walde](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/dirk_walde/32/15134_2.png) [@Dirk\_Walde](https://community.openenergymonitor.org/u/Dirk_Walde)\
**Post date:** [29 November 2018 12:14 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/719 "2018-11-29T12:14:26Z")

</div>

> [@aussiegwapo](#):
>
> Hi dirk
> 
> Take a look at Colins coding that may help you [GitHub - chickey/diyBMS: Do it yourself battery management system for Lithium ion battery packs/cells](https://github.com/chickey/diyBMS)

Which file exactly.  
Just did not find the part for the balance.

or is this in the module itself (Arduino-BMS-Cell-Module.ino)

\*\*  
Already have an EMONCMS on a Pi 3 for data acquisition / tacking. Need therefore the extensions for external data acquisition.  
\*\*  
I Have a  
EASUN POWER 5000W Solar Inverter 80A MPPT Off Grid Inverter 48V 220V Hybrid Inverter Pure Sine Wave Inverter 60A Battery Charger  
and a PCM 60X only Charger  
The MPT-7210A is only for testing

You can see My Project at secondlifestorage . com [New German Powerwall - by Walde … at forest]

 ![IMG_20180529_070225](https://community.openenergymonitor.org/uploads/default/original/2X/c/c1f4a230df7e0e28076c056f2a9a180fc127d534.jpeg)  
 ![IMG_20180822_162125](https://community.openenergymonitor.org/uploads/default/original/2X/0/09bc5310603ccfdc93539d77d6416e2c476f39bb.jpeg)

Update: 01.12.2018

EMONCMS on a Pi 3B with DIY BMS on test run  
With Temp, Balance Display on WiFI Pic 0/1 Identication = If Wifi On / 1 than Working Balance and Volt Meter

 ![IMG_20181129_135246](https://community.openenergymonitor.org/uploads/default/original/2X/5/59ace0cba5ca784aa456074c47ad56736d8ab77d.jpeg)  
 ![IMG_20181129_135310](https://community.openenergymonitor.org/uploads/default/original/2X/0/04bf84bcf3a223d13b66799724ab06a9b2b71cd0.jpeg)  
 ![IMG_20181129_135319](https://community.openenergymonitor.org/uploads/default/original/2X/f/f7d69ed67213d69502953f2362651d757630188b.jpeg)

Update: 01.12.2018

Some of my problems are apparently due to EMC Electromagnetic Field.  
I have the inverter now times in the next room with 10 meters power line to the battery pack.  
And my problems with the I2C are almost gone.  
1-2 errors in 2 hours with 60W load.

🏁 Recommendation:  
Watch everyone and in case of emergency try to set up the charger and the transformer further away.

---

<div class="post-metadata">

**Author:** ![aussiegwapo](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/aussiegwapo/32/7845_2.png) [@aussiegwapo](https://community.openenergymonitor.org/u/aussiegwapo)\
**Post date:** [30 November 2018 05:26 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/720 "2018-11-30T05:26:06Z")

</div>

“Already have an EMONCMS on a Pi 3 for data acquisition / tacking”

Is your Pi3 a model B+ or just a standard Pi 3?  
as i have a pi 3 model B+ been looking at emoncms

Colin has written the coding it influxdb part for voltage and auto balancing a to a set value im looking at his coding now.

Most of the scripting is located in SoftAP.cpp but would have to go through and see what you can us and make out of it and where the references are pulled from and directed to so that can be read on screen

---

<div class="post-metadata">

**Author:** ![aussiegwapo](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/aussiegwapo/32/7845_2.png) [@aussiegwapo](https://community.openenergymonitor.org/u/aussiegwapo)\
**Post date:** [1 December 2018 22:54 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/721 "2018-12-01T22:54:16Z")

</div>

Hi dirk

finally got the pi3 B+ to work with emoncms can view device setup now and about to start creating a dashboard  
are the widgets apart of the dashboard or they your own images you have uploaded to the dashboard

---

<div class="post-metadata">

**Author:** ![Dirk\_Walde](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/dirk_walde/32/15134_2.png) [@Dirk\_Walde](https://community.openenergymonitor.org/u/Dirk_Walde)\
**Post date:** [2 December 2018 09:24 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/722 "2018-12-02T09:24:01Z")

</div>

All parts default by Emon inkl.

image emonSD-30Oct18.zip

---

<div class="post-metadata">

**Author:** ![stuart](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/stuart/32/16661_2.png) [@stuart](https://community.openenergymonitor.org/u/stuart)\
**Post date:** [3 December 2018 12:36 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/723 "2018-12-03T12:36:19Z")

</div>

> [@aussiegwapo](#):
>
> finally got the pi3 B+ to work with emoncms can view device setup now and about to start creating a dashboard  
> are the widgets apart of the dashboard or they your own images you have uploaded to the dashboard

Probably worth creating a new thread about emoncms (or search the existing answers) as its a bit off topic for this thread about the BMS!

---

<div class="post-metadata">

**Author:** ![Dirk\_Walde](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/dirk_walde/32/15134_2.png) [@Dirk\_Walde](https://community.openenergymonitor.org/u/Dirk_Walde)\
**Post date:** [3 December 2018 14:17 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/724 "2018-12-03T14:17:51Z")

</div>

HELP HELP HELP !!!

Still need help with the Diy BMS for the code in terms of balance!

> [@Dirk\_Walde](#):
>
> 💾
> 
> \*\*  
> Question: Does anyone have any idea about programming with Arduino and can help me with the problem with the balance times?  
> \*\*  
> 🖱

It will someone know the code better and can help me with the problem.

---

<div class="post-metadata">

**Author:** ![12ax7](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/12ax7/32/8356_2.png) [@12ax7](https://community.openenergymonitor.org/u/12ax7)\
**Post date:** [4 December 2018 03:16 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/725 "2018-12-04T03:16:12Z")

</div>

![image](https://community.openenergymonitor.org/uploads/default/original/2X/1/10d767ae1dbed75f37b76251f7552f29b6f59d59.jpeg)

Making progress, go easy on me. This project inspired me to learn how to solder. 😋

---

<div class="post-metadata">

**Author:** ![Vela\_Nautica](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/vela_nautica/32/19361_2.png) [@Vela\_Nautica](https://community.openenergymonitor.org/u/Vela_Nautica)\
**Post date:** [4 December 2018 15:00 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/726 "2018-12-04T15:00:14Z")

</div>

Hi,

I changed also the balancing routine in the controller, so I am still a bit in the code with my brain.  
But my cells are a bit powerfull to be balanced only by the cell modules.

What do you need?  
What kind of cells do you plan to use?

As I found out you need to break in the cells with some cycling (as long as they are not compleatly out of line??) after that you may need to bottom balance. I just finshed a bottom balancing project. I use some power resistors controlled by a MOSFET switch and an ACS712 30A current sensor and additional I convert the Voltage with an STM32F103 12 bit ADC and controll also the MOSFET swtich with it.

So tell me where are you now with your progress? how far away from each other are your cell´s? mV??

kind regards Oliver

---

<div class="post-metadata">

**Author:** ![Dirk\_Walde](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/dirk_walde/32/15134_2.png) [@Dirk\_Walde](https://community.openenergymonitor.org/u/Dirk_Walde)\
**Post date:** [4 December 2018 18:24 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/728 "2018-12-04T18:24:22Z")

</div>

The solar system is currently not mounted.  
But the technology that should run with the DiY BMS  
is as follows:  
two chargers with total power of 6000W.  
Removal 1. Rechargeable batteries S14P100 (1400x18650 cells) = 58v  
Expansion 2. 2800x18650  
That’s about 90-100A charge current. And then I just need longer balance times than 12 seconds and then 20-30 seconds nothing until the balance turns back on,  
I have equipped the DiyBMS systems with R1 (2ohm) = 2A balance discharge yes also the fuse is adapted to 2A.

Only I just can not find the timing settings for the balance in the code.  
To set the balance time to 20,30, or 60 seconds.

→ I had already written about the problems in previous news.

\*\*  
Your bottom balancing project sounds interesting, I would also be interested in  
\*\*

---

<div class="post-metadata">

**Author:** ![Vela\_Nautica](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/vela_nautica/32/19361_2.png) [@Vela\_Nautica](https://community.openenergymonitor.org/u/Vela_Nautica)\
**Post date:** [4 December 2018 22:15 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/729 "2018-12-04T22:15:57Z")

</div>

Hi,

I do not remember any timings for balancing, what is done by the cell modules.

The controller calculates the average voltage of the batterie and sends this to the modules. They start to balance the cells that are above this average until its down to average voltage.  
thats how I did understand the code.

My cells behave according to this.  
I build 24V and 600Ah in 6P8S  
My charger is 120A  
My inverter is 5000W plus 24 service loads with peak currents of 500A.

even with a 2 Ohms resistor you will not effectivly balance a high capacity batterie if the cells are heavy out of balance. Thats what I experianced the last weeks.

what voltage and how many Ah does your batterie get in the end?

Did you bottom balance your cells with some kind of equipment?

regards Oliver

---

<div class="post-metadata">

**Author:** ![Dirk\_Walde](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/dirk_walde/32/15134_2.png) [@Dirk\_Walde](https://community.openenergymonitor.org/u/Dirk_Walde)\
**Post date:** [5 December 2018 14:23 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/730 "2018-12-05T14:23:47Z")

</div>

I have resisted every Diy BMS with 2 ohms at the moment which is after calculation 4,2v / 2 ohm = 2,1A resistance to balances.  
The batteries are 1400 cells (18650 4.2V / 2300ma) divided into 14 serial to 100 cells in parallel With a total output of 58.8V max and 202 A which corresponds to 58.8x 202 = 11910 W / 11.91 kwh.

My cell drift is currently not so high but in the summer when loading it could cause a problem and I would like to change that with longer balance times in the code. The loaders are set to 57.4 V max which are 4.1v max per pack.

[Previous page](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594.md?page=35)

[Next page](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594.md?page=37)
