OSD Battery Monitoring for Helder's AIO Boards
Posted: 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.
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