Giter Club home page Giter Club logo

battmon's Introduction

BattMon 2.0

Monitors the charge specifications of your battery equipped with the bq2040 gas gauge.

BattMon 2.0 is a program that works with an Arduino Uno and a 2x16 LCD keypad shield to access parameters from a bq2040 gas gauge such as Voltage, Current, Temperature, State of charge, Remaining capacity or Cycle count. This fuel gauge and other TI products like the bq2060, have been included in Lithium-Ion battery pack, especially for the Sony Aibo ERS-2xx (ERA-201B1), ERS-3xx (ERA-301B1) and ERS-7 (ERA-7B1/ERA-7B2) robot series.

Menu tree

Main menu
├── Setup
│   ├── Test SMBus
│   ├── Scan SMBus
│   ├── Enter address
│   ├── Set command
│   └── Main menu
├── Read info
│   ├── Battery ID
│   ├── Charge data
│   ├── Statistics
│   └── Main menu
└── Control
    ├── Single command
    ├── Write word
    ├── Read word
    ├── Read block
    └── Main menu

Libraries

The program needs for its operation the internal LiquidCrystal library and the following external libraries which must be imported into your Arduino IDE:

Name Link
phi_prompt libraries/phi_prompt.zip
phi_interfaces libraries/phi_interfaces.zip
phi_buttons libraries/phi_buttons.zip
phi_keypads libraries/phi_keypads.zip
i2cmaster libraries/i2cmaster.zip

Connection

Here is an example of connection between a Sony Aibo ERA-201B1 battery pack and the assembly of the Arduino Uno + 2x16 LCD keypad shield. The pin closest to the edge is 1 and the one opposite is 6:

  • Pin 1 = Plus (Pack+)
  • Pin 2 = SMBus Clock
  • Pin 3 = SMBus Data
  • Pin 4 = /EN has to be connected to pin 6 (Pack-) to activate the Arduino Uno
  • Pin 5 = Reserve (Internal temperature thermistor)
  • Pin 6 = Minus (Pack-)

The Arduino Uno is powered by the battery when pin 4 (/EN) is connected to pin 6 (Pack-), using a switch for example.

You can refer to the ERA-201B1 wiring diagram for more details.

For those who are interested, I offer a proposal for an electronic reverse engineering schematic of the PCB inside the ERA-201B1 battery pack.

Documentation

Setting

You may have to modify the keypads values in the battmon main file. Two sets are already available in the code for the values[] array, but if neither of the two works, you can find your own values using the keypad_values_test file.

Wiki

A wiki page is available with images to illustrate the display of the menu and submenus.

Disclaimer

It requires electronics skills. There is no guarantee. Use this tool and associated data at your own risk.

License


MIT

battmon's People

Contributors

lpollier avatar

Watchers

 avatar  avatar

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.