Glitch'd Gaming GG AIO User manual

P a g e | 1
GG AIO
Quick Start Guide

P a g e | 2
Table of Contents
Section
Page
Wiring Diagram
Audio
Hardware
Software
USB
Pi Input
External Port
Power
Main Power
Battery Monitor (optional)
Shoulder Buttons (optional)
Analog Stick (optional)
References
3
4
4
6
7
7
8
9
9
9
10
11
12

P a g e | 3
Wiring diagram
(Can also be found on product page)

P a g e | 4
1. Audio:
A.Hardware
Audio on the AIO board is accomplished through i2s. 3 Wires are required to
connect audio from the PI to the AIO, whose pads can be found on the top left of
the AIO board. Each pad is labeled with the corresponding GPIO on the PI: GPIO
21,18, and 19. Solder wires from the pads to their corresponding GPIO pins on the
PI. Pins circled in blue in Figure 1.1, image provided by Pimoroni.
Figure 1.1 –Pi Pinout

P a g e | 5
Next, attach your volume wheel. A mono 3 wheel pot is recommended. Wire
the pins to the pads labeled “1,2,3”, next to the I2S GPIO pads. Wire them to the
3 pin wheel in the same order as the pads: center pad goes to center pin, side pads
go to side pins. Depending on the way you orient your wheel to your case, you may
need to reverse the order of the pins(ie swap the left and right pins, center stays
the same).
You can use a 5 pin wheel, although its not suggested as adding complexity
increases the chance of making a mistake. Figure 1.2 shows how to wire the 5 pin
pot. Here we are only using the right channel, since we have mono audio. The pad
numbers in green correlate to the pad numbers on the AIO board, wire them as
show. Note that unlike the 3 pin wheel, the wiring is NOT reversable. The 5 pin
wheel must be wired as shown.
Figure 1.2 - 5pin Wheel
If you plan to use digital audio controls, and NOT use a wheel, you MUST
solder pads 2 and 3 together with a wire. Otherwise audio will not work. Volume
change via hotkeys provides a much smoother and accurate way to adjust volume, as
the wheel will only have an effective range near the last 10% of the turn (depending
on which volume wheel you use and speaker rating). You can solder a wheel, turn it all
the way up, and then use hotkey volume change if you wish to have both options.
Finally, solder your speaker to the “SP+”and “SP-“pads near the bottom.

P a g e | 6
B.Software
The pi must be set-up to use I2s audio. Luckily, setting up is very trivial as
Adafruit provides exactly what is needed. The following section is taken directly from
Adafruit’s instruction page on their I2s amp, all credit belongs to them and Pimoroni,
who they based their instructions off of. More details and pictures can be found on
Adafruit’s page which can be accessed here. (if unable to use permalink, full link can
be found at end of document)
The simplest way to do this is to connect your pi to the internet via wifi or
ethernet. Then at the command prompt, which can be accessed from retropie by
using f4 key on keyboard, type the following:
curl -sS https://raw.githubusercontent.com/adafruit/Raspberry-Pi-
Installer-Scripts/master/i2samp.sh | bash
Make sure it is entered EXACTLY as shown, every space and character. Then
reset your pi. Upon restart, audio should now be working. If it does not, or if you
can not connect to internet for some reason, you can install everything manually by
following the Adafruit link and following the instructions on the second half, adjusting
the files on the SD card directly.

P a g e | 7
2.USB:
A.Pi Input
First, you will need to solder the pi’s USB input to the AIO board. This will
connect the pi to the built-in USB hub, and in-turn, to the Atmega controller. To do
this, flip your pi over and solder a wire to pad pp22 and another wire to pad pp23,
which can be seen in the image below.
Figure 2.1 –USB Input
The wire soldered to pp22 should be connected to the pinhole “D+”near the
power pads (view wiring diagram), and pp23 should be connected to “D-“. Once this is
done, the hub data lines should now be connected to the pi and the only thing
remaining is the powerlines. As long as a 5v and a gnd are connected from your power
source to the AIO, and your pi is getting its power from the AIO powerstrip or
power pads, this will already be taken care of for you.

P a g e | 8
B.External Port
To add a free USB port to the shell, to plug in other devices, you can use any
of the free USB hub headers located along the top of the AIO board. The figure
below shows the names of each of the pins on the USB socket, match them with the
markings on the AIO board. The Sparkfun board is used as an example to see the
order of the pins, but all female sockets have the exact same order, so match the
orientation of your part with the image to identify your pins. VCC = 5v
Figure 2.2 –USB Socket
*Note: Hub only supports 1 speed, you may have troubles connecting multiple devices
at different speeds (ie Full speed and high speed).

P a g e | 9
3.Power:
A.Main power
Concerning the components on the AIO, everything is already routed for
power. All that is needed from the user is the input supply. This usually comes from
your charger/booster board(such as the powerboost or banggood power supply). Simply
solder your 5v output from your supply board to any 5v and gnd pins on the AIO. Any
of the points on the powerstrip or power pads will work as they are all connected.
Then, power your pi by soldering it to any of the powerstrip pins or power pads as
well. On the pi zero, you can use the test pads on the bottom or the 5v and GND
GPIO to connect to the AIO power.
B.Battery Monitor - - optional
Every AIO comes pre-loaded with HoolyHoo’s battery monitor and controls
sketch. If you don’t want to complicate your build and don’t care for an on-screen
battery monitor, you can skip this section.
To add this feature, you must solder a cable from the positive end of your
battery to the “B+”pad along the right side of the board. Then you will need to
install the proper scripts on your pi. The following instructions are pulled directly
from HoolyHoo’s GitHub page here. All credit for both the AIO sketch and pi script
go to HoolyHoo.
Start by pulling up the command prompt, then type “cd ~”and press enter to
ensure you are in home directory. Make sure you are connected to a network.
Afterwards, type:
wget https://raw.githubusercontent.com/HoolyHoo/gbzbatterymonitor/master/Install.sh
Then type:
sudo chmod 755 Install.sh
And finally type:

P a g e | 10
./Install.sh
Afterwards, do a sudo reboot to reset the pi and script should be running on
boot up if everything was done correctly.
If there are issues, you can install the script manually by following the link provided
to HoolyHoo’s GitHub page and following the manual instruction on the second half of
his instruction.
4. Shoulder buttons -- optional:
Pads to connect your shoulder buttons are located on the back of the AIO
board, along the right side. If using a Glitch’d Gaming shoulder bracket, connecting
the 2 is very trivial. Connect the “R1”pad on the AIO to the “R”pinhole on the
shoulder board, the “L1”to the “L”, and then one “G”on the AIO to one “G”on the
shoulder. Both grounds do not need to be connected, only one ground connection is
necessary.
Figure 4 –Shoulder Board
If you are using tactile switches, then simply connect one side of the switch to
L1 or R1 on the AIO, and the other side to a G pad on the AIO. Then do the same
thing with the other switch. It does not matter which side of the switch you connect
to G and which you connect to the signal pad, as the switch is just opening and closing
the connection. Make sure you know which pins on your switch are connected together
though, as 4 pin tactile switches are connected in pairs.
To connect 4 shoulder buttons, you will notice 2 points labeled “GPIO 10”and
“GPIO 11”around the center of the board. These points are connected to the signals
for the “Z”and “C”buttons on the front. If you aren’t using a 6 button layout for
the front, you can use these signals to connect your extra shoulder buttons. Then
connect the other side of the shoulder buttons to any open ground points on the

P a g e | 11
board. However, you can not do both at the same time, you must choose one or the
other: 6 button layout or 4 shoulder buttons.
5.Analog stick -- optional:
To use an analog stick with the AIO, you must contact me before making the
purchase so that I can install the analog stick sketch on your board as it is not
installed by default. If you have already purchased and wish to add the analog stick
sketch, you will need a USBASP device (very cheap, just a few dollars), and you can
contact me for help in installing it yourself.
To connect the stick, use the image below (provided by Adafruit) which
illustrates the pinout for a basic psp joystick. Then simply connect each pad to the
corresponding analog pinhole on the AIO, located near the powerstrip. VCC = 5v
Figure 5 –PSP Analog Stick

P a g e | 12
References:
1) Adafruit I2S Audio:
https://learn.adafruit.com/adafruit-max98357-i2s-class-d-mono-
amp/raspberry-pi-usage
2) HoolyHoo Battery Monitor Github:
https://github.com/HoolyHoo/gbzbatterymonitor
3) GG AIO Board:
http://glitchdgaming.com/index.php/product/pre-order-gg-aio-controller/
4) GG AIO Shoulder Kit
http://glitchdgaming.com/index.php/product/aio-shoulder-kit/
5) Shoulder Button Set
http://glitchdgaming.com/index.php/product/dmg-shoulder-bracket/
Table of contents