OSD Battery Monitoring for Helder's AIO Boards

Various user-contributed guides for hardware-related things
Post Reply
User avatar
HoolyHoo
Posts: 766
Joined: Sat Jul 09, 2016 9:34 pm
Has thanked: 206 times
Been thanked: 741 times

OSD Battery Monitoring for Helder's AIO Boards

Post by HoolyHoo » Sat May 06, 2017 12:23 pm

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. :D

Here is a photo of the battery monitor in my build.
StillBat.jpg
StillBat.jpg (368.81 KiB) Viewed 26834 times
And a photo of the video in the process of shutting down after reaching battery critical level.
videoSD.jpeg
videoSD.jpeg (570.81 KiB) Viewed 26834 times
You can go to my github page for the files needed.

HoolyHoo's Github

User avatar
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

Post by AAMinistry » Sat May 06, 2017 3:48 pm

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 :)

dadi4168
Posts: 25
Joined: Wed Feb 08, 2017 8:56 pm
Has thanked: 12 times
Been thanked: 5 times

Re: OSD Battery Monitoring for Helder's AIO Boards

Post by dadi4168 » Sat May 06, 2017 10:09 pm

outstanding....you know, if you good people keep coming up with these fantastic features, I'll never finish my project! :lol:

umbynos95
Posts: 12
Joined: Tue Mar 07, 2017 1:14 am
Has thanked: 12 times

Re: OSD Battery Monitoring for Helder's AIO Boards

Post by umbynos95 » Sun May 07, 2017 12:12 pm

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?

User avatar
HoolyHoo
Posts: 766
Joined: Sat Jul 09, 2016 9:34 pm
Has thanked: 206 times
Been thanked: 741 times

Re: OSD Battery Monitoring for Helder's AIO Boards

Post by HoolyHoo » Sun May 07, 2017 12:51 pm

umbynos95 wrote:
Sun May 07, 2017 12:12 pm
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?
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. ;)

umbynos95
Posts: 12
Joined: Tue Mar 07, 2017 1:14 am
Has thanked: 12 times

Re: OSD Battery Monitoring for Helder's AIO Boards

Post by umbynos95 » Sun May 07, 2017 1:14 pm

Ok thank you! If I have news I'll post here :D

User avatar
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

Post by Lphillimore » Sun May 07, 2017 6:32 pm

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 :mrgreen:

User avatar
HoolyHoo
Posts: 766
Joined: Sat Jul 09, 2016 9:34 pm
Has thanked: 206 times
Been thanked: 741 times

Re: OSD Battery Monitoring for Helder's AIO Boards

Post by HoolyHoo » Sun May 07, 2017 6:46 pm

Lphillimore wrote:
Sun May 07, 2017 6:32 pm
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 :mrgreen:
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. :D

User avatar
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

Post by Lphillimore » Sun May 07, 2017 7:11 pm

@HoolyHoo Yeah good call. Thanks for confirming. Was hoping I didn't nees more parts for my ever growing collection :D Will let you know once ive hooked this up and tested.

Thanks for your efforts on this!

User avatar
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

Post by 144TECH » Tue May 09, 2017 8:46 am

@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 :D
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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest