Close
0%
0%

Monitoring Battery Quality and reduce waste

Handheld Readout Device(HRD) for Battery Management Systems. Measure rechargeable batteries.

Public Chat
Similar projects worth following
Rechargeable batteries are more and more dominating our modern life. We find them in our smartphones and notebooks, in e-bikes and e-cars but also in many toys and basically everywhere where wired power supply is absent. The charge state of these batteries is usually reported by highlighting a certain portion of a bar, representing full charge. But is this indication always correct and how can I check whether the full capacity of my battery is still available?

The efficient use of batteries is especially important, as batteries are difficult to recycle and thus constitute a burden for the environment. Unfortunately, common BMSs do not display the stored data by default.

continuing description....

https://github.com/peterloes/HRD

Programmed (bit mask) for Battery Controller Types with 8-bit command.

Creation and expansion of different (Li-ion) battery pack manager | battery fuel (gas) gauge
with Communication interface SMBus! Do your part. :-)

Tested Firmware Version

  • TEXAS INSTRUMENTS bq40z50
  • ATMEL ATmega32HVB

Battery controller probing requests. 0x0A=Atmel, 0x16=TI

Actual Current is signed.

Power management for the LC-Display.

Display will be scrolled (11 digits).

HRD can be connected to external devices like personal computers to transfer and store the extracted technical data.

https://github.com/peterloes/HRD/blob/master/Getting_Started_Tutorial/1_poster_overview.pdf

The standalone HRD features EFM32 ...the world´s most energy friendly microcontrollers

ARM Cortex-M3 EFM32G230F128

Code Snippets

Make quick changes to the Source Code.

https://github.com/peterloes/HRD/blob/master/Software/main.c

   /*! List of items which can be displayed
     *
     * This array contains a list of items that can be displayed on the LCD.
     * Element 0 is a special case, it shows the name, version, and date of
     * the firmware image.  Usually up/down push buttons are used to select
     * the item to be displayed.
     *
     * The order of these items may be rearranged by the user.  Single or
     * groups of entries can be de-activated by commenting them out.
     */

static const ITEM l_Item[] =
{  // [1234567890123456]    Cmd                Frmt
    { ">>> HRDevice <<<",   SBS_NONE,            FRMT_FW_VERSION    },
    { "Battery at SMBus",   SBS_NONE,            FRMT_BAT_CTRL    },
    { "Supply Battery",     SBS_NONE,            FRMT_CR2032_BAT    },
    { "Manufacturer",       SBS_ManufacturerName,    FRMT_STRING    },
    { "Device Name",        SBS_DeviceName,        FRMT_STRING    },
    { "Device Type",        SBS_DeviceChemistry,    FRMT_STRING    },
    { "Serial Number",      SBS_SerialNumber,        FRMT_HEX    },
    { "Production Date",    SBS_ManufactureDate,    FRMT_DATE    },

https://github.com/peterloes/HRD/blob/master/Software/drivers/BatteryMon.c

    /*!@brief Probe List of supported Battery Controllers */
 

  static const BC_INFO l_ProbeList[] =
   {  //  addr    type        name (maximum 10 characters!)
   {  0x0A,    BCT_ATMEL,    "ATMEL"        },
   {  0x16,    BCT_TI,        "TI bq40z50",    },
   {  0x00,    BCT_UNKNOWN,    ""        }    // End of the list
   };

https://github.com/peterloes/HRD/blob/master/Software/drivers/BatteryMon.h

/*!@brief SBS Commands
 *
 * These are the defines for the registers of the battery controller.  Each
 * define contains the following bit fields:
 * - Bit 17:15 specify the controller type where the define belongs to.  Bit 16
 *   (0x10000) represents the Atmel controller, while bit 17 (0x20000) specifies
 *   the TI controller. If both bits are set (0x30000), the register exists in
 *  ...

Read more »

plain - 11.06 kB - 10/22/2021 at 11:17

Download

Adobe Portable Document Format - 65.39 kB - 10/11/2021 at 07:04

Preview
Download

Adobe Portable Document Format - 56.62 kB - 10/11/2021 at 07:04

Preview
Download

sch - 693.26 kB - 10/11/2021 at 07:04

Download

brd - 189.61 kB - 10/11/2021 at 07:04

Download

View all 7 files

  • 1 × Housing TEKO Mod.10008
  • 3 × 5GSH935+1SS09-12.0 (Button)
  • 24 × Pin Header, vertical to increase display height. manufacturer number: MK01/50 Z.
  • 1 × Phoenix Contact MC 1.5/ 3-G-3.81 manufacturer number: 1803280
  • 1 × PTR Socket housing-cable AK(Z)1550 manufacturer number: 51550030025F

View all 6 components

  • Discussion

    Peter Loës10/11/2021 at 07:35 0 comments

    Probe for different Controller Types

    g_BatteryCtrlAddr: 0x00 - 0xFF

    This routine probes the type of battery controller.  This is done by checking
    dedicated I2C-bus addresses on the SMBus.  The following addresses and their
    corresponding controller type are supported:
    - 0x0A in case of Atmel, and
    - 0x16 for the TI bq40z50.

    Abstract SBS_Commands for different Manufacturer Registers

    SBS_DesignCapacity,           //!< 0x18 Word: in [mAh / 10mWh]

    SBS_DesignVoltage,             //!< 0x19 Word: in [mV]
    SBS_SpecificationInfo,         //!< 0x1A Word: Version and Revision
    SBS_ManufactureDate,        //!< 0x1B Word: [Year-1980:7|Month:4|Day:5]

    Expansion of item data

    This routine returns a formatted data string of the specified item data.
    It uses BatteryRegReadWord() and BatteryRegReadBlock() to read the data
    directly from the battery controller.

    case FRMT_MILLIAMP:    // Current in [±mA], +:charging, -:discharging
            sprintf (strBuf, "%5dmA", (int16_t)data);
            break;

    https://github.com/peterloes/HRD/blob/master/Software/drivers/Display.c

View project log

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates