Skip to content

EDrTech/bATtiny-Guard-PMG001

Repository files navigation

Banner

bATtiny Guard Demo Board


Note

"bATtiny Guard" and "PMG001" may be used interchangeably elsewhere in the documentation.


bATtiny Guard Power management module

bATtiny Guard is a highly integrated module designed for efficient management of single-cell Li-Po battery systems. It incorporates various essential ICs to address all aspects of power management, including battery charging, switch/button power on/off behavior, undervoltage and overvoltage protection, flexible voltage measurement, battery current measurement, and temperature monitoring. Additionally, it features a microcontroller for programming custom behaviors, ensuring comprehensive management of single-cell rechargeable battery systems. Furthermore, when paired with the demo kit base PCB, the module serves as a general development board for the ATTINY1616, with all 18 GPIO pins accessible for any application.                    

Features

      Feature overview          

  • 32 PIN 22.22mm *16.51mm package
  • On/off behavior control
  • 2A single cell charger
  • Single li-po cell powered
  • 4+16 ADC channels
  • Battery current measurement
  • Brown-out detection/reset circuit
  • Low on-resistance battery output MOSFET
  • On-module temperature measurement
  • I2C Interface
  • Arduino compatible




Installation and set up

To program this module you will need the following:

  • Arduino IDE (Or other IDE of your choosing)
  • megaTinyCore
  • Demo kit with the module soldered on

       

Demo board and cover board views.

Demo board views

               

There's no need to install any additional libraries as the example code only uses the wire library to handle I2C, the rest is in the example code. Keep in mind that some register values are hardcoded, which is not the best way to handle something like that but is done here for the sake of simplicity. You can use external libraries with this module without issues, you just need to redefine I2C adresses of devices as they don't necessarily match with other libraries.

       

Board settings should be set up like this:

settings

Default code provides basic power management and monitoring - press PWR_SW for >500ms and BAT_OUT will turn on, hold PWR_SW for >3s and BAT_OUT will turn off.

To start, you should have the demo board connected via USB to your computer. Powering over USB only will work most of the time, but it is strongly recommended to have the battery connected to the demo board/module. Switching between USB modes is done with the use of a tactile switch on the demo board; for flashing/programming, set it to 'UPDI', by pressing the button again, the mode is toggled to 'Serial' which will allow for serial communication.

bat connected         usb connected

               

Example output to serial (ADC pins floating):

settings

For more information, please read the datasheet.


Module Schematic

Module schematic


Demo board Schematic

Breakout schematic


bATtiny Series

bATtiny Series


About

Power management module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages