On-Screen Battery Monitor Options

General GBZ-related chat goes here. Share ideas, tips and tricks, or ask questions that don't fit into the hardware/software help forums.
cainkirisgai
Posts: 34
Joined: Tue Jan 16, 2018 4:26 pm
Has thanked: 9 times
Been thanked: 6 times

Re: On-Screen Battery Monitor Options

Post by cainkirisgai » Thu Jan 18, 2018 8:38 am

im looking to do this with out the usb controller or Helders AIO or KITES AIO boards, so is it necessary to use the 6 pin DPDT switch or can i use a 3 pin DPDT switch instead? basically all im using right now is a PB1000, Raspberry Pi 3, and the ADS1115
Here is my little RP3 build still working on a name
https://sudomod.com/forum/viewtopic.php?f=13&t=5042

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

Post by VeteranGamer » Thu Jan 18, 2018 9:57 am

cainkirisgai wrote:
Thu Jan 18, 2018 8:38 am
im looking to do this with out the usb controller or Helders AIO or KITES AIO boards, so is it necessary to use the 6 pin DPDT switch or can i use a 3 pin DPDT switch instead? basically all im using right now is a PB1000, Raspberry Pi 3, and the ADS1115
the reason why the DPDT switch is recommended......

Image
(any style of DPDT switch can be used, this is just for reference)
(a switch with one row of pins, is refereed to as single pole SP)
(a switch with two rows of pins, is refereed to as double pole DP.... as in the image above)


is that you can control two different circuits with the same switch.....

the first circuit, will obviously be whatever your build is Game Boy Zero or any other project is (your on/off)......
the second circuit in this case being the connection from the ADS1015/1115 A0 pin to the battery + (which carries the signal)
which means when its On, both circuits are On/open
and when its off, both circuits are off/closed


if you cant use/or make use of a DPDT switch
(in my case its because of a Camble Safe Shutdown board, but for anyone else it could also be some kind of retrofit issue or they just dont have a DPDT switch)


HoolyHoo has given a work around for this with the use a of 10k ohm resistor (hopefully to avoid any issues)
HoolyHoo wrote:
Thu Jan 18, 2018 5:23 am
The purpose of the resistor is to limit the current. As you guys may know, it is not recommended to apply voltage to an analog input to an arduino chip that is not powered. The result could lead to it being back fed through the analog pin and destroying the ic. At least this is true for arduinos. That being said, the way it’s in that diagram, that is exactly what happens, the power is cut off but the analog pin is still being fed. Now it may be OK but it doesn’t hurt to have the resistor and may protect the ic by limiting current, thus preventing the backfeed. 😉

.

cainkirisgai
Posts: 34
Joined: Tue Jan 16, 2018 4:26 pm
Has thanked: 9 times
Been thanked: 6 times

Re: On-Screen Battery Monitor Options

Post by cainkirisgai » Thu Jan 18, 2018 4:45 pm

hmm not sure where i have gone wrong when i plug in the usb cable to the pi3 the pb1000 just shuts off and the pi doesnt power up
Here is my little RP3 build still working on a name
https://sudomod.com/forum/viewtopic.php?f=13&t=5042

User avatar
144TECH
Posts: 325
Joined: Fri Jan 06, 2017 7:30 am
Location: Amsterdam
Has thanked: 256 times
Been thanked: 71 times

Re: On-Screen Battery Monitor Options

Post by 144TECH » Sat Jan 20, 2018 3:38 pm

Just bought a 3 bucks teensy with a 32u4, hexed it with HoolyHoo's hex, soldered 1 wire with a resistor hooked up to the dpdt and PB, and voila we're done. :roll: :roll: :lol:
On screen battery Monitor. Took me 15 minutes from scratch.
(for the reference, yes there's a(nother) teensy used).
Don't understand all this work because this is all you have to do, so good luck guys.
cainkirisgai wrote:
Thu Jan 18, 2018 4:45 pm
You're sure the polarity is righteous right ? + -
HoolyHoo wrote:
Thu Jan 18, 2018 5:23 am
The purpose of the resistor is to limit the current. As you guys may know, it is not recommended to apply voltage to an analog input to an arduino chip that is not powered. The result could lead to it being back fed through the analog pin and destroying the ic. At least this is true for arduinos. That being said, the way it’s in that diagram, that is exactly what happens, the power is cut off but the analog pin is still being fed. Now it may be OK but it doesn’t hurt to have the resistor and may protect the ic by limiting current, thus preventing the backfeed. 😉
That's why i used a second switch (in the 640x480 build) :lol: (i have it mounted with camble's SSD in combination with yours, using a npn as switch was not done because of the ingoing resistance versus the outgoing resistance, just didn't work because of the resistor used between adc, relay was not done because of power consumption, just a second switch connected to the existing switch, slide it and it slides both on off.
I'm glad it works, and does work ;-)
VeteranGamer wrote:
Thu Jan 18, 2018 9:57 am
if you cant use/or make use of a DPDT switch
(in my case its because of a Camble Safe Shutdown board, but for anyone else it could also be some kind of retrofit issue or they just dont have a DPDT switch)


***
You (still) can.., totally no issue or problem at ALL. even with a Safe-ShutDown Switch. See my build and how it's done, it's very easy. (only if you want to)
Last edited by 144TECH on Sat Jan 20, 2018 3:41 pm, edited 1 time in total.
* Very Rare * GBZ 640x480 v3 Stock Looks 6000MAH
http://www.sudomod.com/forum/viewtopic.php?f=43&t=4863

cainkirisgai
Posts: 34
Joined: Tue Jan 16, 2018 4:26 pm
Has thanked: 9 times
Been thanked: 6 times

Re: On-Screen Battery Monitor Options

Post by cainkirisgai » Sat Jan 20, 2018 4:04 pm

i believe it was correct i undid everything and it powered back on so no harm there. Im still having a bit of trouble translating the layout that was given to what i have here. Im only using the ADS1115 board a raspberry pi3 and a powerboost 1000c or powerboost 1000. I think i might have it this time,been working and not sleeping so i think i was over thinking the layout that veteran posted for me and now im just waiting for the switch to come in along with some 22AWG wire.
Here is my little RP3 build still working on a name
https://sudomod.com/forum/viewtopic.php?f=13&t=5042

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

Post by VeteranGamer » Sat Jan 20, 2018 11:51 pm

Just so that there's no confusion....

This method requires no USB connection....
If your using a Pi3 that might not be an issue, but most will use a Pi Zero and the least USB the better (IMHO)

Also this method is what is similarly used in the mintyPi (and used well)....
As the mintyPi has the ADS built in to Helder pcb, this is a kind of Retrofit alternative that can be used in your GBZ build or other projects....

I personally think this method is a lot better for build that use GPIO for button controls....
it's pointless just adding a USB teency/micro controller just for a battery monitor (might as well also use it for the controls)....

Each to there own, and pick what ever method make you feel more comfortable....


.

cainkirisgai
Posts: 34
Joined: Tue Jan 16, 2018 4:26 pm
Has thanked: 9 times
Been thanked: 6 times

Re: On-Screen Battery Monitor Options

Post by cainkirisgai » Sun Jan 21, 2018 1:53 am

This is the monster I'm building it's my first build of a retropie. The battery monitor isnt needed but will make it easier/safer for shutdown and prolonged use to prevent random shutdowns and possible corruptions.
Attachments
received_2229406553752153.jpeg
received_2229406553752153.jpeg (86.12 KiB) Viewed 5997 times
Here is my little RP3 build still working on a name
https://sudomod.com/forum/viewtopic.php?f=13&t=5042

User avatar
144TECH
Posts: 325
Joined: Fri Jan 06, 2017 7:30 am
Location: Amsterdam
Has thanked: 256 times
Been thanked: 71 times

Re: On-Screen Battery Monitor Options

Post by 144TECH » Sun Jan 21, 2018 10:38 am

VeteranGamer wrote:
Sat Jan 20, 2018 11:51 pm
Just so that there's no confusion....

This method requires no USB connection....
If your using a Pi3 that might not be an issue, but most will use a Pi Zero and the least USB the better (IMHO)
.
Yeah, but i wasn't specifically referring to a minty pi build, more for a GBZ.
And the majority of gbz builds with a Pi-Zero uses a hub already.
So often, 3 ports are available and you use one for that 32u4.
So there will be two remaining ports, wich can be used for all purposes, so in this particular case i say this is the best and easyest way, no denial.

And about the Minty Pi battery monitor board, havent used this method but it should be easy to get it working, i meight give it a shot. (just to figure it out how)
Meanwhile there's some other solution to get it done over GPIO, and if there isn't enough pins left it could still be done with a GPIO expander.
Gotta improvise sometimes.
But i'm curious when and how you are gonna fix it.
(p.s just checked the first post, and it's just as easy like rodocop did. i have seen a similar board/chip wich does the same, i really can't find a reason why it should NOT work. it should..)

Greets
* Very Rare * GBZ 640x480 v3 Stock Looks 6000MAH
http://www.sudomod.com/forum/viewtopic.php?f=43&t=4863

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

Post by VeteranGamer » Sun Jan 21, 2018 10:53 am

cainkirisgai wrote:
Sun Jan 21, 2018 1:53 am
This is the monster I'm building it's my first build of a retropie. The battery monitor isnt needed but will make it easier/safer for shutdown and prolonged use to prevent random shutdowns and possible corruptions.
Nice.....
looks like it could be a really cool build.....

theres been a couple of members that have talked about doing something like this....

so it will be nice to see one completed....

cainkirisgai
Posts: 34
Joined: Tue Jan 16, 2018 4:26 pm
Has thanked: 9 times
Been thanked: 6 times

Re: On-Screen Battery Monitor Options

Post by cainkirisgai » Sun Jan 21, 2018 11:34 am

It's all functional using a Bluetooth controller, I mounted 2 8ohm 3 Watt speakers on the back and installed a small fan on the bottom to keep it cool as it was giving me the overheat warning. Installed a push button on the side for quick on/off along with 2 push buttons on top for volume controls wired to the adafruit audio bonnet. And using a pb1000c and pb1000b to connect a 3800mAh battery to it. Again this battery mod isn't vital but I feel it would complete the build as then I can tell when to charge it. Only thing I feel I need to do after getting this to work would be to make my own case to slim/flatten out the back, it still feels pretty light but I've been contemplating removing the USB inputs along with the Ethernet port to slim it down more to allow me to put the boards and battery inside it. So again thanks for all the help and advice, I'm hoping now that I got some sleep and time I can look at the layout u provided with a clearer mind and not over think it heh heh.
Here is my little RP3 build still working on a name
https://sudomod.com/forum/viewtopic.php?f=13&t=5042

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest