GithubHelp home page GithubHelp logo

willburk97 / esp-12e-bms-balancer Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 3.55 MB

li-ion BMS / Balancer made of multiple NodeMCU ESP-12E (one per cell) using Adafruit io to store/track/trend each cell's voltage.

C++ 100.00%
bms li-ion arduino esp12e esp8266 esp12 balance battery adafruit-io mosfet

esp-12e-bms-balancer's Introduction

ESP-12E-BMS-Balancer

li-ion BMS / Balancer made of multiple NodeMCU ESP-12E (one per cell) using Adafruit io to store/track/trend each cell's voltage.

I used an LM3671 from adafruit to power the 3.3v in of the ESP-12E directly because my NodeMCU version uses an LDO regulator which drops half a volt or so. I wanted my ESP-12E to be able to continue monitoring the cell all the way down to 2.4 volts or so. The LDO wouldn't allow that.

I used an IRFZ44 mosfet (driven by D1 through a resistor) to connect a 16 ohm / 3W resistor to the batery input. At a ~4VDC input this'd be 250mA and 1W worth of drain.
The code leads to a battery drain (mosfet) duty cycle of about 80%, so technically about 800mW of drain. While draining, the resistor can be touched momentarily but is hot enough to burn you. It was not hot enough to melt my temporary breadboard or the wires/components nearby.

As mentioned in the code, A0 on the NodeMCU has a built in voltage divider of 100k:220k ohms. This enables you to simply jumper from A0 to the battery in with a 220k resistor (for li-ion) which creates a 100k:440k voltage divider, which is a ratio of 1:5.4

In case the search function checks the readme for codewords, here're some: NodeMCU, ESP12, ESP-12, ESP12E, ESP-12E, ESP8266, Battery Management System, Balance, lithium, pack

I added the code from an ESP32 I was testing as well. I coded it to monitor battery4 (and the code would have to be adjusted to match the battery it is connected to.) This code was used before I added the staleData code you'll see in the ESP12 code. The side effect of not having the staleData code is that if a battery is low and then disconnected from the internet, this ESP will attempt to drain it's battery down to that last known voltage...ignoring the fact that the last known voltage could be very very old. This is handy for testing and/or forcing a single cell to a certain voltage but not ideal for regular use or as a reliable BMS. (Basically, I think the staleData code is important, I just never implemented it in the ESP32 code.)

Added Schematic and Board layouts for two different ESP-12E BMS styles. One with the LM3671 from Adafruit and one without. It can be used without the Adafruit board, but somewhere around 3.0v the ESP-12E will turn off because of the inherent voltage drop across the LDO voltage regulator. The 'Low Voltage' version uses the Adafruit buck converter, the other does not.

I haven NOT double checked the schematic for accuracy nor have I printed the PCB to test it out. Please sanity check them both before use. I used Autodesk Eagle for the schematic and board layout.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.