Skip to content

ProfFan/battmon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Monitor batteries for Aibo

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 100.0%