Page 5 of 5

Re: Noob Tries to Make a Pii U (Wii U Retropie Gamepad)

Posted: Sat May 23, 2020 4:43 pm
by BlueWeaselBreath
AntFJ, thank you for clarifying that. Is this updated diagram what you meant? I have moved the ground wire too, just to keep things consistent. Image

Re: Noob Tries to Make a Pii U (Wii U Retropie Gamepad)

Posted: Mon May 25, 2020 4:33 am
by AntFJ
why the resistors?

Re: Noob Tries to Make a Pii U (Wii U Retropie Gamepad)

Posted: Mon May 25, 2020 5:18 am
by BlueWeaselBreath
The resistors are why I thought I could run it the way I had it before. To be lazy and paste from my Page 1 description: “you want to be able to monitor how much life is left in your battery so it doesn’t die while you’re playing! If you use a 3.7V battery setup, there are a few possibilities for creating a battery monitor with just the components above, but I’m using a 7.4V battery, which has too high a voltage to connect directly into the 5V Teensy (which can monitor the voltage and show indicators or take action when the voltage is at a certain level). So I will be using two 2.2k Ohm resistors to create a voltage divider — a simple device that takes an input voltage and divides it so the output voltage is smaller. This particular value of resistor results an output voltage of exactly half (3.7V) of the original battery voltage. This is now low enough to run into the Teensy (which, recall, has a 5V capacity), which will read this voltage as the battery charges and discharges. Since the Teensy is reading a voltage half that of the true battery voltage (due to our divider), we’ll know that the true voltage of the battery at any given time is twice the value that the Teensy is seeing.”

This is from craic’s PiPower tutorial. https://github.com/craic/pi_power/blob/master/README.md

Re: Noob Tries to Make a Pii U (Wii U Retropie Gamepad)

Posted: Mon May 25, 2020 5:31 am
by AntFJ
I think you are confusing one of the teensy's analog inputs for its power input. It must receive power from a stable 5V source. Your voltage divider is going to output a voltage that will CHANGE. It may be possible to guess the battery remaining from this voltage. I challenge the need for an 8.4v 2 cell battery. The Switch and every cell phone out there use a standard lipo battery and they run just fine. I would just run one of helder's retro PSU... it will make everything much easier. Your setup is complicated IMO. https://www.heldergametech.com/shop/gam ... /retropsu/

EDIT: Maybe I was confused... it looks like you are supplying 5V to the teensy via the pi and your "reduced" 8.4V to an analog input?

Re: Noob Tries to Make a Pii U (Wii U Retropie Gamepad)

Posted: Mon May 25, 2020 5:39 am
by AntFJ
So your first diagram would be correct for what you are trying to do but after looking at pipower's tutorial it is important to note that he uses an ADC that connects directly to the Pi via SPI. Your teensy connects via usb. This is not a problem if you plan on writing your own arduino code and your own python code. Just realize that none of pipower's code will work with your setup.

Re: Noob Tries to Make a Pii U (Wii U Retropie Gamepad)

Posted: Mon May 25, 2020 5:49 am
by BlueWeaselBreath
Thanks again, AntFJ! I did indeed have in mind adapting his general idea to my hardware set-up using custom code. One of these days! Your help is greatly appreciated. :D

Re: Noob Tries to Make a Pii U (Wii U Retropie Gamepad)

Posted: Fri Jun 05, 2020 10:32 am
by kaiyoti
@BlueWeaselBreath, which protection module do you have? You mentioned that you found ones that only does balancing. I can't seem to find these, it seems that balancing is usually secondary to over/undercharge protection boards.

Re: Noob Tries to Make a Pii U (Wii U Retropie Gamepad)

Posted: Fri Jun 05, 2020 8:53 pm
by BlueWeaselBreath
Hi, here’s the balancing board I used! https://www.ebay.com/itm/2S-3S-4S-Li-i ... %7Ciid%3A1