On-Screen Battery Monitor Options
- VeteranGamer
- Posts: 1738
- Joined: Thu Jan 26, 2017 11:12 am
- Location: London, UK
- Has thanked: 528 times
- Been thanked: 909 times
On-Screen Battery Monitor Options
rodocop has recently finished his 7th build (double digits just around the corner)
http://sudomod.com/forum/viewtopic.php?f=43&t=4577
and he used one of the battery monitor add-ons for the mintyPi in his build, which give him a battery status on screen while only having a simple common ground pcb (enabled by HoolyHoo script)
this got me thinking .....
that there must be an option out there for others that would like to do something similar, bearing in mind that Helder battery monitor add-on is not available to buy....
i had a brief look online, and with my basic knowledge on these things came across some items that might or might not be a viable option
(i need some experienced/expertise feedback on this)
Adafruit do a current sensor (Adafruit INA219)
https://learn.adafruit.com/adafruit-ina ... e?view=all
Aliexpress have the same item for a fraction of the cost
https://www.aliexpress.com/item/-/32676 ... 278.i5KQVy
there is also this that i saw another member mention before (not sure again if its a viable option)
available from Sparkfun
https://www.sparkfun.com/products/12918
Aliexpress have the same item for a fraction of the cost
https://www.aliexpress.com/item/MCP4725 ... 285.i5KQVy
now i could be barking up the wrong tree here......
but if i am, i would appriciate it if some input can be given on this (especially from HoolyHoo)
if these are viable options....
1) will they work with HoolyHoo current script or any script (for the mintyPi)
2) if they do work with the script, how will that impact the build if you plan to have one of Cambles Safe Shutdown (as a shutdown function is already written into the script)
if these are not a viable option what would be, or can there be a board made available to the community for Game Boy builds or other similar builds.....
Thank you
.
http://sudomod.com/forum/viewtopic.php?f=43&t=4577
and he used one of the battery monitor add-ons for the mintyPi in his build, which give him a battery status on screen while only having a simple common ground pcb (enabled by HoolyHoo script)
this got me thinking .....
that there must be an option out there for others that would like to do something similar, bearing in mind that Helder battery monitor add-on is not available to buy....
i had a brief look online, and with my basic knowledge on these things came across some items that might or might not be a viable option
(i need some experienced/expertise feedback on this)
Adafruit do a current sensor (Adafruit INA219)
https://learn.adafruit.com/adafruit-ina ... e?view=all
Aliexpress have the same item for a fraction of the cost
https://www.aliexpress.com/item/-/32676 ... 278.i5KQVy
there is also this that i saw another member mention before (not sure again if its a viable option)
available from Sparkfun
https://www.sparkfun.com/products/12918
Aliexpress have the same item for a fraction of the cost
https://www.aliexpress.com/item/MCP4725 ... 285.i5KQVy
now i could be barking up the wrong tree here......
but if i am, i would appriciate it if some input can be given on this (especially from HoolyHoo)
if these are viable options....
1) will they work with HoolyHoo current script or any script (for the mintyPi)
2) if they do work with the script, how will that impact the build if you plan to have one of Cambles Safe Shutdown (as a shutdown function is already written into the script)
if these are not a viable option what would be, or can there be a board made available to the community for Game Boy builds or other similar builds.....
Thank you
.
Re: On-Screen Battery Monitor Options
Ok, let me try to take your questions in order.
Respective to the two boards you linked, the first, as far as I know, doesn’t have a python library to interface with. My script is pure python based, as it makes it easier to communicate with the pi. That being said, perhaps builds with atmega32u4 chips could benefit from this board but a total rewrite of the python interface script would need to be written as well as the Arduino code for your micro controller.
Board number two is not an option. That board is a DAC. What you want is an ADC board to read the battery voltage.
The breakout board you seek is more in line with this one.
https://rover.ebay.com/rover/0/0/0?mpre ... 1983738594
Keep in mind that that the script I wrote for the latest MintyPi image was specifically coded for it since the combos are integrated with the battery monitoring. The Mintypi uses Retrogame for the controls, so if your build uses GPIO’s for button control, then it’s possible as Rodocop did. Otherwise a rewrite of the code is needed with Arduino builds.
As far as using with Camble’s Safe shutdown, I have not dived deep enough into his code to see if conflicts would occur but my guess that it would be possible but merging or rewrites of code would also be necessary.
The short of it is, if using a plain button control setup as rodocop did and using the linked board, you should be able to get it going.
Hope this helps
Respective to the two boards you linked, the first, as far as I know, doesn’t have a python library to interface with. My script is pure python based, as it makes it easier to communicate with the pi. That being said, perhaps builds with atmega32u4 chips could benefit from this board but a total rewrite of the python interface script would need to be written as well as the Arduino code for your micro controller.
Board number two is not an option. That board is a DAC. What you want is an ADC board to read the battery voltage.
The breakout board you seek is more in line with this one.
https://rover.ebay.com/rover/0/0/0?mpre ... 1983738594
Keep in mind that that the script I wrote for the latest MintyPi image was specifically coded for it since the combos are integrated with the battery monitoring. The Mintypi uses Retrogame for the controls, so if your build uses GPIO’s for button control, then it’s possible as Rodocop did. Otherwise a rewrite of the code is needed with Arduino builds.
As far as using with Camble’s Safe shutdown, I have not dived deep enough into his code to see if conflicts would occur but my guess that it would be possible but merging or rewrites of code would also be necessary.
The short of it is, if using a plain button control setup as rodocop did and using the linked board, you should be able to get it going.
Hope this helps
- dryja123
- Posts: 1076
- Joined: Tue May 09, 2017 5:34 pm
- Location: Central NJ
- Has thanked: 239 times
- Been thanked: 553 times
Re: On-Screen Battery Monitor Options
Hey, I linked the sparkfun board in another thread and found that it will not work. You need to find an i2c ADC, not DAC, with SDA and SCL channel pinouts. I did some searching and was not able to find a viable option.
Maybe if we make the pitch to Helder he could stock a few of his battery monitor boards for those who would like to use them for other projects. I know I'm working on a few custom gaming projects right now and would like to have 1 or 2.
Maybe if we make the pitch to Helder he could stock a few of his battery monitor boards for those who would like to use them for other projects. I know I'm working on a few custom gaming projects right now and would like to have 1 or 2.
Guide for troubleshooting mintyPi power problems: http://www.sudomod.com/forum/viewtopic.php?f=34&t=4115
My mintyPi builds: http://www.sudomod.com/forum/viewtopic.php?f=32&t=3985
My mintyPi builds: http://www.sudomod.com/forum/viewtopic.php?f=32&t=3985
-
- Posts: 52
- Joined: Thu Jul 20, 2017 4:08 pm
- Has thanked: 3 times
- Been thanked: 11 times
-
- Posts: 109
- Joined: Wed Nov 23, 2016 10:19 am
- Has thanked: 3 times
- Been thanked: 74 times
Re: On-Screen Battery Monitor Options
You could use this:
https://www.sparkfun.com/products/10617
It has a very similar IC to what I've been using on my SP AIO boards. It has an I2C interface, so in theory all you would need to do is change the I2C address, and change the register read in the script and it should work.
It measures the voltage for you, but it also has a cool option of providing an actual percentage value, rather than just the battery voltage. I've found this to be more accurate than just reading the battery voltage since LiPo voltage curves can be complicated
https://www.sparkfun.com/products/10617
It has a very similar IC to what I've been using on my SP AIO boards. It has an I2C interface, so in theory all you would need to do is change the I2C address, and change the register read in the script and it should work.
It measures the voltage for you, but it also has a cool option of providing an actual percentage value, rather than just the battery voltage. I've found this to be more accurate than just reading the battery voltage since LiPo voltage curves can be complicated
Re: On-Screen Battery Monitor Options
Lets ask Helder to bring back the battery monitor, I would really like to use it in my next GBZ Build, I PM'd helder yesterday to ask if the battery monitor is still available, he said no but with enough interest he might bring it back, so lets show him that we are very interested, I know if he brings them back I will buy 4 to start with, HOW MANY WOULD YOU BUY?
Gus
Re: On-Screen Battery Monitor Options
The battery fuel gauge linked by codeman seems ideal. Im using this coulomb counter in another project that could be made to work although you need to use interrupts so might not be as easy to use as the fuel gauge. https://www.sparkfun.com/products/12052
- VeteranGamer
- Posts: 1738
- Joined: Thu Jan 26, 2017 11:12 am
- Location: London, UK
- Has thanked: 528 times
- Been thanked: 909 times
Re: On-Screen Battery Monitor Options
Really appreciate the reply....HoolyHoo wrote: ↑Fri Nov 10, 2017 4:55 amOk, let me try to take your questions in order.
The breakout board you seek is more in line with this one.
https://rover.ebay.com/rover/0/0/0?mpre ... 1983738594
Keep in mind that that the script I wrote for the latest MintyPi image was specifically coded for it since the combos are integrated with the battery monitoring.
As far as using with Camble’s Safe shutdown, I have not dived deep enough into his code to see if conflicts would occur but my guess that it would be possible but merging or rewrites of code would also be necessary.
The short of it is, if using a plain button control setup as rodocop did and using the linked board, you should be able to get it going.
Hope this helps
providing that my controls are via GPIO (using retrogame)
and for now i dont have one of cambles safe shutdown installed
firstly
the breakout board you suggested....
could that work out of the box with your script (even if its with an older version of the script)...
or is it just an example of the type of board that could be made to work with your script....
secondly
if it does work out of the box, is there a way to edit or mute (turn off) the safe shutdown part of the script or just not have that part of the script installed.....
or something like this
(maybe slightly modified to work, if it doesnt already work out of the box)
https://www.aliexpress.com/item/ADS1015 ... 9f227b67f4
.
Re: On-Screen Battery Monitor Options
Yes, it would work out of the box, just need to make sure you wire it correctly, obviously.Really appreciate the reply....
providing that my controls are via GPIO (using retrogame)
and for now i dont have one of cambles safe shutdown installed
firstly
the breakout board you suggested....
could that work out of the box with your script (even if its with an older version of the script)...
or is it just an example of the type of board that could be made to work with your script....
secondly
if it does work out of the box, is there a way to edit or mute (turn off) the safe shutdown part of the script or just not have that part of the script installed.....
On the second question, if you are referring to my script, then yes, that is totally possible and easy enough to do with a few minor edits to the script.
- rodocop
- Posts: 1723
- Joined: Mon Aug 22, 2016 3:14 pm
- Location: Saskatchewan
- Has thanked: 606 times
- Been thanked: 608 times
Re: On-Screen Battery Monitor Options
Glad my project sparked this thread. I'd be interested to implement battery monitors in upcoming builds as well.
_____________________________________________________
My Minty Pi builds:
http://www.sudomod.com/forum/viewtopic.php?f=32&t=3628
My GBZ builds:
http://www.sudomod.com/forum/viewtopic. ... 813#p50813
My modded DMG-01's:
http://www.sudomod.com/forum/viewtopic.php?f=13&t=2696
My NESpi:
http://www.sudomod.com/forum/viewtopic.php?f=13&t=2941
My Gaboze Pocaio's
https://sudomod.com/forum/viewtopic.php?f=13&t=6063
My Minty Pi builds:
http://www.sudomod.com/forum/viewtopic.php?f=32&t=3628
My GBZ builds:
http://www.sudomod.com/forum/viewtopic. ... 813#p50813
My modded DMG-01's:
http://www.sudomod.com/forum/viewtopic.php?f=13&t=2696
My NESpi:
http://www.sudomod.com/forum/viewtopic.php?f=13&t=2941
My Gaboze Pocaio's
https://sudomod.com/forum/viewtopic.php?f=13&t=6063
Who is online
Users browsing this forum: No registered users and 1 guest