Black Lives Matter - Action and Equality. ... Adafruit joins the Stop Hate for Profit campaign.
0

INA260 battery status overlay on the Pi screen? Fro Retropie
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

INA260 battery status overlay on the Pi screen? Fro Retropie

by jabulonboaz on Sun Mar 08, 2020 12:40 am

Has anyone played with the Adafruit INA260 module and is there any steer on how to integrate its I2C output values to a battery status overlay on the screen?
I made a protable battery powered retropie build, i am exploring ways to read the battery level status and display it via an overlay icon on the corner of the screen (just like a battery status icon on a phone). The best option so far i believe is by using the INA260 board.
These are my overlay sources so far but none of them are using the INA260 :
1:
https://github.com/d-rez/gbz_overlay/bl ... /README.md
2:
https://github.com/HoolyHoo/Mintybatterymonitor

And this is the info and code for using the INA260 but there is nothing on overlay SW
https://learn.adafruit.com/adafruit-ina ... cuitpython
Attachments
20200308_044811_resized_1.jpg
20200308_044811_resized_1.jpg (724.06 KiB) Viewed 55 times
4226_kit_ORIG_2019_04.jpg
4226_kit_ORIG_2019_04.jpg (61.37 KiB) Viewed 55 times
20200308_041315.png
20200308_041315.png (19.31 KiB) Viewed 55 times

jabulonboaz
 
Posts: 4
Joined: Thu Mar 08, 2018 8:10 am

Re: INA260 battery status overlay on the Pi screen? Fro Retr

by tannewt on Mon Mar 09, 2020 6:29 pm

Unfortunately, I don't think the INA260 is what you want. Usually a battery monitor is based on the voltage of a battery. The INA260 measures current.

The first link uses an ADS1x15 such as this: https://www.adafruit.com/product/1083 An ADC is typically used to measure the voltage in a voltage divider as explained here: https://en.wikipedia.org/wiki/Voltage_divider It allows you to measure a voltage higher than what the ADC can handle.

tannewt
 
Posts: 1680
Joined: Thu Oct 06, 2016 8:48 pm

Re: INA260 battery status overlay on the Pi screen? Fro Retr

by siddacious on Mon Mar 16, 2020 4:57 pm

The INA260 can and does measure voltage; it's how it calculates the current! An addition benefit to using a current monitor is that it will allow you to guesstimate how long your battery will last since you'll be able to tell how fast you're using it.

However! That said, both of the overlay examples you shared do use the ADC that tannewt recommended, so using that part will be the easiest way to get something working.

To use the INA260, you'll have to modify one of the overlay examples to use the INA260 to measure the voltage in places that the ADS1x15 is used

siddacious
 
Posts: 271
Joined: Fri Apr 21, 2017 3:09 pm

Please be positive and constructive with your questions and comments.