GithubHelp home page GithubHelp logo

popcorncomputer / chip Goto Github PK

View Code? Open in Web Editor NEW

This project forked from photonicsguy/chip

0.0 1.0 0.0 7 KB

Shell script to read the AXP209 power IC registers

Home Page: http://photonicsguy.ca/projects/chip

License: MIT License

Shell 100.00%

chip's Introduction

CHIP

Shell script for reading voltage & current from the AXP209 Power Management IC for the CHIP $9 computer

  • Battery charge %
  • Battery voltage & current
  • USB voltage & current
  • "ACIN" (Pin 2 of U13) voltage & current
  • and more...

Example

root@chip:~# axp209.sh 
Battery: 92%
ACIN:	0V
VBUS:	4.8892V   899.625mA
VBAT:	4.2075 V  Charging at 633.0mA
Vout:	4.3876 V

with -a switch

root@chip:~# axp209.sh  -a
              ACIN: 0	Avail: 0
              VBUS: 1	Avail: 1
             VHOLD: 1 (Whether VBUS is above 4.4V before being used)
  Shutdown voltage: 2.9V
VBUS current limit: 900mA
Boot source isn't ACIN/VBUS
Battery charging
Battery connected: 1
Temperature:	56.8°C (I've seen as high as 65°C)
Battery: 92%
ACIN:	0V
VBUS:	4.8858V   899.625mA
VBAT:	4.2119 V  Charging at 633.0mA
Vout:	4.5962 V

100mA USB current limit (Causing the AXP209 to power the CHIP from both USB and the battery)

root@chip:~# axp209.sh -a
              ACIN: 0	Avail: 0
              VBUS: 1	Avail: 1
             VHOLD: 1 (Whether VBUS is above 4.4V before being used)
  Shutdown voltage: 2.9V
VBUS current limit: 100mA
Boot source isn't ACIN/VBUS
Battery charging
Battery connected: 1
Temperature:	45.0°C (I've seen as high as 65°C)
Battery: 99%
ACIN:	0V
VBUS:	5.1442V   100.500mA
VBAT:	4.1371 V  Discharging at 68.5mA
Vout:	4.1006 V

WARNING:

Some of the voltage outputs are programmable via registers, so it appears to be possible to damage your CHIP computer by writing the wrong data to certain registers on this chip.
This script only uses one write command to enable ADC registers, everything else is only reading registers.

References:

* http://docs.getchip.com/ - CHIP Documentation * http://linux-sunxi.org/AXP209 - Information on chip registers

chip's People

Contributors

photonicsguy avatar

Watchers

 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.