# DIY Lithium Battery Balancer and monitoring (BMS)

**URL:** <https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594>\
**Category:** Hardware\
**Tags:** bms, powerwall, 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:** 4

<div class="post-metadata">

**Author:** ![BrianD](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/briand/32/5022_2.png) [@BrianD](https://community.openenergymonitor.org/u/BrianD)\
**Post date:** [8 December 2017 16:26 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/61 "2017-12-08T16:26:17Z")

</div>

The graph shows 8 series connected cells discharging at about 0.4C. The tick interval is 10 Seconds

---

<div class="post-metadata">

**Author:** ![BrianD](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/briand/32/5022_2.png) [@BrianD](https://community.openenergymonitor.org/u/BrianD)\
**Post date:** [8 December 2017 17:01 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/62 "2017-12-08T17:01:07Z")

</div>

You guys have more experience using these cells than I do. What level of imbalance should I expect to see? Do you have any empirical data?

---

<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:** [8 December 2017 17:24 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/63 "2017-12-08T17:24:22Z")

</div>

No I dont. You could try charging a single cell to full and let the equaliser do its thing?

---

<div class="post-metadata">

**Author:** ![BrianD](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/briand/32/5022_2.png) [@BrianD](https://community.openenergymonitor.org/u/BrianD)\
**Post date:** [8 December 2017 17:37 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/64 "2017-12-08T17:37:04Z")

</div>

Good idea. I shall try that.

---

<div class="post-metadata">

**Author:** ![BrianD](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/briand/32/5022_2.png) [@BrianD](https://community.openenergymonitor.org/u/BrianD)\
**Post date:** [9 December 2017 13:45 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/65 "2017-12-09T13:45:17Z")

</div>

The attached is the result of running Stuart’s suggested test although I have started with 7 charged cells and one discharged. I used the Opus to discharge one cell. I shall leave it for a while then fully discharge the pack and replace one with a fully charged cell.

 ![single_discharged](https://community.openenergymonitor.org/uploads/default/original/2X/8/81c454309c6ecee58431d2efdac84841f8678500.jpg)

---

<div class="post-metadata">

**Author:** ![BrianD](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/briand/32/5022_2.png) [@BrianD](https://community.openenergymonitor.org/u/BrianD)\
**Post date:** [9 December 2017 13:51 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/66 "2017-12-09T13:51:28Z")

</div>

You will notice that the discharged cell (No 7) is mostly affecting the cells immediately above and below No 7. The impact on cells further from cell 7 is less which is what you would expect.

So, it is clearly working which is pleasing.

---

<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:** [11 December 2017 13:47 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/67 "2017-12-11T13:47:50Z")

</div>

> [@Colin\_Hickey](#):
>
> Mine just arrived today and they included 14 boards as well

Mine arrived and they sent me 20 boards 👍

---

<div class="post-metadata">

**Author:** ![BrianD](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/briand/32/5022_2.png) [@BrianD](https://community.openenergymonitor.org/u/BrianD)\
**Post date:** [13 December 2017 09:00 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/68 "2017-12-13T09:00:09Z")

</div>

I am looking forward to seeing some data from you guys!

Meantime I started a thread on the DIY Powerwall site you may find interesting:

[http://www.diypowerwalls.com/t-18650-equaliser](http://www.diypowerwalls.com/t-18650-equaliser)

---

<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:** [13 December 2017 12:22 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/69 "2017-12-13T12:22:11Z")

</div>

I’ve updated the controller code to upload its voltage and temperature readings for each cell to emonCMS (over network).

Code is over here

> **[diyBMS/Arduino-ESP8266-BMS-Controller at master · stuartpittaway/diyBMS](https://github.com/stuartpittaway/diyBMS/tree/master/Arduino-ESP8266-BMS-Controller)**
>
> master/Arduino-ESP8266-BMS-Controller

I’m going to spend a few hours tonight putting together some of my new PCB circuits and setting up a test rig with some 18650 cells.

---

<div class="post-metadata">

**Author:** ![Colin\_Hickey](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/colin_hickey/32/9434_2.png) [@Colin\_Hickey](https://community.openenergymonitor.org/u/Colin_Hickey)\
**Post date:** [15 December 2017 09:51 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/70 "2017-12-15T09:51:04Z")

</div>

> [@stuart](#):
>
> emonCMS

I signed up for an EmonCMS account but never actually used it. I currently use grafana which looks great although being time based does have issues at times showing eroneous figures.

---

<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:** [15 December 2017 10:33 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/71 "2017-12-15T10:33:21Z")

</div>

I’ve made the code fairly modular in this respect so it can support other data/graphing engines.

I’ve also started on an inbuilt dash board to view the cell voltages and provide some control on the modules. Times slipped past me this week though!

---

<div class="post-metadata">

**Author:** ![Colin\_Hickey](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/colin_hickey/32/9434_2.png) [@Colin\_Hickey](https://community.openenergymonitor.org/u/Colin_Hickey)\
**Post date:** [15 December 2017 10:42 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/72 "2017-12-15T10:42:59Z")

</div>

Brilliant, i’ll merge my grafana code in for ease of continuity and then i can look at EMonCMS in the meantime as it may be better. I’m just back from a business trip but should have a free day on Sunday to have a look, although i do have a new Prusa MK3 sat in the corner waiting to be built as well.

---

<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:** [15 December 2017 11:06 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/73 "2017-12-15T11:06:55Z")

</div>

> [@Colin\_Hickey](#):
>
> new Prusa MK3 sat in the corner waiting to be built as well.

Christmas has come early then! I’ve a MK2 clone which works well after a bit of tweaking. The MK3 looks great though.

---

<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:** [8 January 2018 19:55 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/74 "2018-01-08T19:55:20Z")

</div>

Progress update:

- I’ve built 4 circuit boards all working 😁
- I recommend changing the resistor value on R3 to 68K instead of 20K to give the thermistor a better range
- The ESP code can upload voltage and temperature readings into emoncms
- The ESP code has a web interface for monitoring cell voltages and temperature

The code doesn’t actually balance at the moment, but the ATTINY does have the function written, just not completed yet.

 ![image](https://community.openenergymonitor.org/uploads/default/original/2X/3/36b6ea581310eb4773b316665fc8092aa2cfe642.png)

 ![image](https://community.openenergymonitor.org/uploads/default/original/2X/4/41d6cd6c98247d0fe21fe946590e766e998cdf4f.png)

---

<div class="post-metadata">

**Author:** ![BrianD](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/briand/32/5022_2.png) [@BrianD](https://community.openenergymonitor.org/u/BrianD)\
**Post date:** [8 January 2018 20:07 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/75 "2018-01-08T20:07:53Z")

</div>

Here is an update from me:

I modified the BMS to alternately charge and discharge whilst it recorded the eight cell voltages.  
There are two runs, one without the equaliser and one with:

 ![no_eq_02](https://community.openenergymonitor.org/uploads/default/original/2X/6/68ce78c64f8294803c819d65caa352d98b038c1f.jpg)  
 ![eq_02](https://community.openenergymonitor.org/uploads/default/original/2X/f/f344020c6a5ef6dfd8f397fd0ee3c1b122b92f1d.jpg)  
The second run starts where the first stopped.

---

<div class="post-metadata">

**Author:** ![Colin\_Hickey](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/colin_hickey/32/9434_2.png) [@Colin\_Hickey](https://community.openenergymonitor.org/u/Colin_Hickey)\
**Post date:** [16 January 2018 10:34 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/76 "2018-01-16T10:34:27Z")

</div>

Looking good and i see you’ve been making some modifications. I’m still waiting on a few parts as i took the aliexpress cheap option and i lost my ADUM chips but finally found them last night! I have some 603 sized caps/resistors which may just fit so could try doing a board with those in the interim.

---

<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:** [16 January 2018 12:20 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/77 "2018-01-16T12:20:42Z")

</div>

> [@Colin\_Hickey](#):
>
> 603 sized caps/resistors which may just fit so could try doing a board with those in the interi

There’s lots of space on the board for the resistors and caps so should fit okay. I tried using solder paste for the first time last night on the caps and resistors - worked really well (I heated the board in a frying pan!!)

---

<div class="post-metadata">

**Author:** ![Colin\_Hickey](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/colin_hickey/32/9434_2.png) [@Colin\_Hickey](https://community.openenergymonitor.org/u/Colin_Hickey)\
**Post date:** [16 January 2018 12:23 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/78 "2018-01-16T12:23:51Z")

</div>

haha love the frying pan idea, I’ve seen a lot of people making diy home reflow ovens but seems a lot of work for the amount of boards i make up currently. The 603 sized components are smaller so will definitely fit it’s just a case of if they shall span the gaps sufficiently. I’m really keen to get this up and running and i think i’m going to sell the BMS/Charge controller i got from electrodacus as it won’t work as well for my needs.

---

<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:** [16 January 2018 16:37 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/79 "2018-01-16T16:37:10Z")

</div>

I was surprised how well the frying pan worked - no idea what the temperature was so I’m not going to use it for the chips.

Soldering the FET on it a pain - its tiny and the regulator pins are so close together as well !

---

<div class="post-metadata">

**Author:** ![Colin\_Hickey](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/colin_hickey/32/9434_2.png) [@Colin\_Hickey](https://community.openenergymonitor.org/u/Colin_Hickey)\
**Post date:** [16 January 2018 16:54 UTC](https://community.openenergymonitor.org/t/diy-lithium-battery-balancer-and-monitoring-bms/5594/80 "2018-01-16T16:54:39Z")

</div>

I might get some solder paste and try as i’ve not done that method. Oh i meant to ask was there a reason for the connectors using 2mm pitch rather than 2.54mm as that caught me out as well, i know it’s in your BOM but i just presumed it’d be 2.54mm.

Col

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

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