OSD Battery Monitoring for Helder's AIO Boards
OSD Battery Monitoring for Helder's AIO Boards
I've been working on an on screen battery solution for builds using Helder's AIO boards. As some may know, his board uses the Atmega32u4 chip which has analog pins that can be used for an assortment of things such as analog joysticks and stuff. On his latest board he broke out four of the unused analog pins which I was able to use to read battery voltage. My solution is pretty simple and only requires on the hardware side a DPDT switch, a resistor and a simple wire connection to one of the extra analog pins. Then after that its just a matter of following the instructions for software setup on my github page and flashing Helder's board with the new hex. I have tested this with an PowerBoost 1000C and Helder has with a Banggood power supply. I have included two schematics on the github page.
The scripts I wrote will monitor the battery voltage and give you on screen feedback with an icon. Also will give you a low battery warning video and then will show a different video when it reaches critical level to let you know it will automatically gracefully shutdown. As a bonus in the script, I have included the option to add a shutdown button (location is up to you but the hole where original power outlet connects is ideal) that will graceful shutdown the gbz without having to go through the menu. Much easier, just push the button, hold for two seconds, and it will shutdown. Then just flip the on/off switch to off.
Also, remember that the boards will need to be reflashed with the new hex. I have included one for analog joystick users and one for non users. The hex also fixes the responsiveness and double button presses. Analog joystick is also much better. Also was able to fix and add the ability to scroll through and select in the DOS style menus. These hex can be used to fix these things even if you opt not to use the battery monitoring solution. The hex will monitor ADC 0 on Helder's latest board but if you do not use the analog joystick it can be modified to use one of those analog pins on his older boards that do not have pins broken out. If anyone needs this let me know.
I have tested these in my latest build but I welcome all testers for feedback.
Here is a photo of the battery monitor in my build.
And a photo of the video in the process of shutting down after reaching battery critical level.
You can go to my github page for the files needed.
HoolyHoo's Github
The scripts I wrote will monitor the battery voltage and give you on screen feedback with an icon. Also will give you a low battery warning video and then will show a different video when it reaches critical level to let you know it will automatically gracefully shutdown. As a bonus in the script, I have included the option to add a shutdown button (location is up to you but the hole where original power outlet connects is ideal) that will graceful shutdown the gbz without having to go through the menu. Much easier, just push the button, hold for two seconds, and it will shutdown. Then just flip the on/off switch to off.
Also, remember that the boards will need to be reflashed with the new hex. I have included one for analog joystick users and one for non users. The hex also fixes the responsiveness and double button presses. Analog joystick is also much better. Also was able to fix and add the ability to scroll through and select in the DOS style menus. These hex can be used to fix these things even if you opt not to use the battery monitoring solution. The hex will monitor ADC 0 on Helder's latest board but if you do not use the analog joystick it can be modified to use one of those analog pins on his older boards that do not have pins broken out. If anyone needs this let me know.
I have tested these in my latest build but I welcome all testers for feedback.
Here is a photo of the battery monitor in my build.
And a photo of the video in the process of shutting down after reaching battery critical level.
You can go to my github page for the files needed.
HoolyHoo's Github
- AAMinistry
- Posts: 16
- Joined: Thu Apr 20, 2017 2:09 am
- Has thanked: 1 time
- Been thanked: 1 time
Re: OSD Battery Monitoring for Helder's AIO Boards
Awesome work. I am still waiting on a few parts for my first GBZ build but I will be able to put this to use with Helder's 2.2a board straight away
Re: OSD Battery Monitoring for Helder's AIO Boards
Wow! Great work! I have a question for you, I'm using Camble Safe Shutdown v1.0 for powerboost.. It is possible to have your script running only fot the battery icon and not for the shutdown part? In my case the dpdt swich is required?
Re: OSD Battery Monitoring for Helder's AIO Boards
The shutdown button is independent from the the battery monitoring so the shutdown button is not required. The battery monitoring script incorporates the battery icons along with shutdown when going battery level critically low but can be disabled to never initiate the shutdown within the script if you wanted it to. The DPDT switch is required to keep the battery from powering the Atmega chip while the unit is turned off. The good news is Cambles circuit includes a DPDT switch. The bad news, as far as I can tell the ON rails are occupied, at least on the bang good edition. You'll have to check with him about the PB edition. Maybe if you find out you can get back to us.
- Lphillimore
- Posts: 993
- Joined: Sat Jan 07, 2017 7:03 pm
- Location: Perth, WA
- Has thanked: 796 times
- Been thanked: 527 times
Re: OSD Battery Monitoring for Helder's AIO Boards
This is awesome. Cant wait to set this up on the two builds i have that utilise the AIO 2.2!
One question and apologies if obvious.... I'm assuming most people are already using DPDT switches as per Wermys parts guide? I certainly am.
I have spare wire and resistors so i think im set
One question and apologies if obvious.... I'm assuming most people are already using DPDT switches as per Wermys parts guide? I certainly am.
I have spare wire and resistors so i think im set
mintyPi Giveaway [CLOSED]:
http://www.sudomod.com/forum/viewtopic.php?f=38&t=3456
Builds:
GBZ
http://www.sudomod.com/forum/viewtopic.php?f=9&t=2838
mintyPi
http://www.sudomod.com/forum/viewtopic.php?f=32&t=3468
Kite SAIO
http://www.sudomod.com/forum/viewtopic.php?f=9&t=3075
Dreamcast VMU
https://sudomod.com/forum/viewtopic.php ... 133#p62133
http://www.sudomod.com/forum/viewtopic.php?f=38&t=3456
Builds:
GBZ
http://www.sudomod.com/forum/viewtopic.php?f=9&t=2838
mintyPi
http://www.sudomod.com/forum/viewtopic.php?f=32&t=3468
Kite SAIO
http://www.sudomod.com/forum/viewtopic.php?f=9&t=3075
Dreamcast VMU
https://sudomod.com/forum/viewtopic.php ... 133#p62133
Re: OSD Battery Monitoring for Helder's AIO Boards
I think they are common in builds now but not 100% used so it's the reason it's mentioned. Let me know how it works out or you.Lphillimore wrote: ↑Sun May 07, 2017 6:32 pmThis is awesome. Cant wait to set this up on the two builds i have that utilise the AIO 2.2!
One question and apologies if obvious.... I'm assuming most people are already using DPDT switches as per Wermys parts guide? I certainly am.
I have spare wire and resistors so i think im set
- Lphillimore
- Posts: 993
- Joined: Sat Jan 07, 2017 7:03 pm
- Location: Perth, WA
- Has thanked: 796 times
- Been thanked: 527 times
Re: OSD Battery Monitoring for Helder's AIO Boards
@HoolyHoo Yeah good call. Thanks for confirming. Was hoping I didn't nees more parts for my ever growing collection Will let you know once ive hooked this up and tested.
Thanks for your efforts on this!
Thanks for your efforts on this!
mintyPi Giveaway [CLOSED]:
http://www.sudomod.com/forum/viewtopic.php?f=38&t=3456
Builds:
GBZ
http://www.sudomod.com/forum/viewtopic.php?f=9&t=2838
mintyPi
http://www.sudomod.com/forum/viewtopic.php?f=32&t=3468
Kite SAIO
http://www.sudomod.com/forum/viewtopic.php?f=9&t=3075
Dreamcast VMU
https://sudomod.com/forum/viewtopic.php ... 133#p62133
http://www.sudomod.com/forum/viewtopic.php?f=38&t=3456
Builds:
GBZ
http://www.sudomod.com/forum/viewtopic.php?f=9&t=2838
mintyPi
http://www.sudomod.com/forum/viewtopic.php?f=32&t=3468
Kite SAIO
http://www.sudomod.com/forum/viewtopic.php?f=9&t=3075
Dreamcast VMU
https://sudomod.com/forum/viewtopic.php ... 133#p62133
- 144TECH
- Posts: 325
- Joined: Fri Jan 06, 2017 7:30 am
- Location: Amsterdam
- Has thanked: 256 times
- Been thanked: 71 times
Re: OSD Battery Monitoring for Helder's AIO Boards
@HoolyHoo
So when i use a camble ssd switch, i assume you can hook this up by using a piece of wire with the resistor connected to ''bat'' on the powerboost 1000c and from there to the aio adc0 to make it working right?(offcourse reprogrammed first with usbasp) i have used the ''vs'' pin of the powerboost for camble's ssd. and having the pin ''bat'' unused so from there the idea. (could it make a conflict with camble's battery mp4's ? kinda showing up the same time? so maybe need to remove one set of mp4's?)
Oh and man, thanks for that stormtrooper theme it's really what i wanted
So when i use a camble ssd switch, i assume you can hook this up by using a piece of wire with the resistor connected to ''bat'' on the powerboost 1000c and from there to the aio adc0 to make it working right?(offcourse reprogrammed first with usbasp) i have used the ''vs'' pin of the powerboost for camble's ssd. and having the pin ''bat'' unused so from there the idea. (could it make a conflict with camble's battery mp4's ? kinda showing up the same time? so maybe need to remove one set of mp4's?)
Oh and man, thanks for that stormtrooper theme it's really what i wanted
Last edited by 144TECH on Tue May 09, 2017 8:55 am, edited 1 time in total.
* Very Rare * GBZ 640x480 v3 Stock Looks 6000MAH
http://www.sudomod.com/forum/viewtopic.php?f=43&t=4863
http://www.sudomod.com/forum/viewtopic.php?f=43&t=4863
Who is online
Users browsing this forum: No registered users and 1 guest