Page 5 of 12

Re: OSD Battery Monitoring for Helder's AIO Boards

Posted: Mon May 29, 2017 2:49 am
by jermzz
HoolyHoo wrote:
Sun May 28, 2017 8:03 pm
jermzz wrote:
Sun May 28, 2017 6:53 pm
HoolyHoo wrote:
Sun May 28, 2017 12:45 pm


Well, that's good. Glad you got it sorted out. Battery steps are in 25% increments. So right now you are showing 75%. When its gets to 25%, battery indicator will go yellow and low battery warning video will play once. If you don't recharge and its gets to the last step in battery meter, then shutdown video will play and auto shutdown will begin. ;)

How hard would this be to port over to use on a teensey or audrino Leonardo. Hard even though they're still atmega32u4 based?
Not hard at all and not much different. Make sure to use same pin out.
So if i load your hex files to a teensey LC, they will work without modification? Sorry, I'm really new to this.

looks like on the teensey, I need pins 10 (CS or any pin I read) , 11(MOSI), 12(MISO), and 13(SCK) for the usbasp. ADC0 is just Analog pin 0 right (pin 14)?

and lastly, is there a way I can tell which pins helder used as to which pins I need to use on the teensey to make sure Im using the correct pins for control input?

Thanks for your help HH :)

Re: OSD Battery Monitoring for Helder's AIO Boards

Posted: Mon May 29, 2017 6:52 am
by HoolyHoo
The pinouts would need to be adjusted on the hex file. These are the pinouts Helder uses on his board.
image.jpeg
image.jpeg (59.41 KiB) Viewed 15079 times
And this is the pinout of a Leonardo pro micro
image.jpeg
image.jpeg (275.13 KiB) Viewed 15079 times
As you can see the there is no 11, 12, or 13 on the micro broken out. So that would need to be adjusted as well as ADC0 for the battery monitoring. I test on the Leonardo all the time. It's not an issue. Just adjust as necessary.

Re: OSD Battery Monitoring for Helder's AIO Boards

Posted: Mon May 29, 2017 1:40 pm
by uke
Hi there! one question:
Does the battery icon remain at the top of the screen all the time? Can you hide it?
Thanks!

Re: OSD Battery Monitoring for Helder's AIO Boards

Posted: Mon May 29, 2017 1:56 pm
by HoolyHoo
uke wrote:
Mon May 29, 2017 1:40 pm
Hi there! one question:
Does the battery icon remain at the top of the screen all the time? Can you hide it?
Thanks!
Yes, on all the time but can be coded to turn off. Wouldn't be too hard if you are using the shutdown button to serve dual purpose.

Re: OSD Battery Monitoring for Helder's AIO Boards

Posted: Tue May 30, 2017 12:32 pm
by uke
Thanks for your reply!

You say it is possible to do it with the original GB switch? I'm in Argentina and I'm having a hard time finding a dpdt swith that is small enough.

Re: OSD Battery Monitoring for Helder's AIO Boards

Posted: Tue May 30, 2017 12:54 pm
by HoolyHoo
uke wrote:
Tue May 30, 2017 12:32 pm
Thanks for your reply!

You say it is possible to do it with the original GB switch? I'm in Argentina and I'm having a hard time finding a dpdt swith that is small enough.
Yes. The original GB switch will work With the adafruit powerboost but not with the banggood edition.

Re: OSD Battery Monitoring for Helder's AIO Boards

Posted: Tue Jun 06, 2017 10:12 am
by Monti55
Is there a way to do this without having the AIO board? Could I just use a adruino pro mini to read the battery voltage?

Re: OSD Battery Monitoring for Helder's AIO Boards

Posted: Tue Jun 06, 2017 10:18 am
by HoolyHoo
Monti55 wrote:
Tue Jun 06, 2017 10:12 am
Is there a way to do this without having the AIO board? Could I just use a adruino pro mini to read the battery voltage?
Yes it's possible as long as you have an analog pin available from the arduino ic.

Re: OSD Battery Monitoring for Helder's AIO Boards

Posted: Tue Jun 06, 2017 11:15 am
by Monti55
Ok I was looking at the code and what needs to happen on the arduino side? Just send the battery voltage over serial when the pi requests data?

Re: OSD Battery Monitoring for Helder's AIO Boards

Posted: Tue Jun 06, 2017 11:21 am
by HoolyHoo
Monti55 wrote:
Tue Jun 06, 2017 11:15 am
Ok I was looking at the code and what needs to happen on the arduino side? Just send the battery voltage over serial when the pi requests data?
You got it. Uses pin A5 on the atmega32u4.