Introduction: PiSwitch
Welcome to the PiSwitch
-----WARNING PLEASE READ!!!-----
This Projects software is no longer compatible it worked with old versions of raspbian and retropie. The power supply for this has also been unstable without very careful grounding and clean low resistance solder joints. I've reworked this project using a power supply by helder game tech https://heldergametech.com/shop/gameboy-zero/retro...
and a larger battery https://heldergametech.com/shop/batteries/megabat...
, I spent a lot of time working on this and then spent about 6 months very sick. I hope to some day soon build an OS image for this that can be easily and cleanly deployed. Before building this project please be very aware that parts of this are no longer functioning and it will require some fussing. If I build an updated version I will post a link to it here.
---------------End Warning----------------
Hello to the wonderful world of instructables. Sometimes this website feels like a second home to me I spend so much time drooling over the projects I wish I had the time and money to make. Alas, It's finally time for me to drop on you amazing people, my second instructable I call it The Pi-Switch. It's a conglomeration of the work of many people but this particular build is, certainly and uniquely my own. I do however want to give credit where credit is due. First off much thanks to Drew Wallace with the Switch Berry I couldn't make his software work but he helped get me started. Thanks to Adafruit they built the PiGrrl2 a while back and if the internals to my pi case seem familiar that's because the charging circuit and audio amplifier are the same circuits used in the PiGrrl 2. Third Thanks to the wonderful developers over at the pi foundation, RetroPie, and last but not least Kodi. My scripts are built around the incredible work you've done developing software to run on the raspberry pi. Finally, thanks to Nintendo for making me want to reverse engineer, poorly might I ad, their Switch Console.
Step 1: Procuring Provisions
You will need:
Tools:
Soldering iron + solder + soldering flux
Hot Glue Gun
A 3D Printer or $20-$40 and 3dhubs.com
A decent micro screwdriver kit
A Dremel Tool with a fine bit or a drill with a 3/16th bit
Patience
Parts:
Pi Foundation 7" Raspberry Pi screen
1/8 inch stereo jack with switch
6600 mah battery of plentiful life
Joy-Con Controllers (reccomend the addition of a charger)
Raspberry Pi 3 (Bluetooth and WiFi built in)
3d Printed Case (Files Are Attached to this step the instructable assumes you've printed the part.)
Optional:
Step 2: Soldering Headphone Jack to the Pi
I have pictures from the various steps above.
Start with the Pi and solder some 26 awg wire to it:
I used red for the left audio to pp26 near the audio jack (thank you pi foundation for labeling the solder pads)
solder black for ground to pp24
right audio is a yellow wire and you solder it to the upper left pin on the audio jack.
UPDATE: 3-26:
Some more testing showed to me that PP24 directly to the metal pad is ground PP25 is right audio and PP26 is left audio. Picture of updated solder pad usage attached.
I recommend leaving the wires long 3-4" you can trim them down or tuck them in later. I leave them long because my projects often get pulled apart and rebuilt/re-purposed. I really like this particular 1/8 in jack. I chose it because the clear top means you can see and understand exactly how it works.
Soldering The Audio Jack (The pinout is in pics above):
Take the red wire from the pi and solder it to pin 2 on the 1/8 in jack.
Take the yellow wire from the pi and solder it to pin 5 on the 1/8 in jack.
take the black wire and twist another 3-4" length of black wire to it then solder to pin 1 on the 1/8 in jack.
solder a 3-4" red wire to pin 3 on the 1/8 in jack.
You should now have an audio jack connected to the pi, if you were to play sound with headphones plugged in you would have music playing clearly on this jack. I reccomend hot gluing the wires on the bottom of the pi and the bottom of the jack in order to secure the thin wires and also to protect them from damage and shorts.
Step 3: Soldering the Power Board & Switch
The PowerBoost 1000C for all your lithium charging needs.
Unfortunately this little deal though fantastic does not output enough power to run the Pi-Switch. It does however do a great job charging the battery which has plenty of amperage to power the pi, screen, and audio simultaneously for about 2-3 hours. I left the power on the pi open so that running out of battery just means you need to plug directly to the pi. I'm working on a better solution still. I may build a switching circuit. I will update this if I find a better way to power this device but 2-3 hours isn't bad.
Power Leads:
Lets start by looking at Picture 1 above you'll notice 3 black circles and 3 red circles.
You Guessed IT !! solder 3 10" black wires and 3 10" red wires to the corrosponding spots marked on the PowerBoost.
The Switch (The Power Switch (Not Nintendo)):
Cut a single right or left leg off your switch and solder on a 2" wire to the remaining center and alternate legs of your amputee power switch.
solder one of the wires from you switch to en on the powerboost and the remaining wire to gnd on your powerboost board.
Hot Glue is cheap, quick, and easy. I reccomend now putting some hot glue over each of the wires connected to the PowerBoost Board
Step 4: Speaker and Audio Board and HeadPhone Jack (A.K.A. Tying It All Together)
This is the step in which we combine our various assets
Solder the Speaker:
Look at the picture above and solder one wire to each of the pads on the speaker as shown above. I'm too cheap for heat shrink so if you're like me HOT GLUE!
Solder the audio board:
grab your PAM8302 look at the writing. On the side where the board says 4-8 ohms solder your speaker wires to the two center pads as pictured above.
Solder the power to the audio:
Take one of you red power leads and one of your grounds from you PowerBoost board and solder the red wire to vin on the PAM8302 and the black wire to gnd on your PAM8302.
Solder headphone to the PAM8302:
Take the red wire from your headphone jack and solder it to A+ on your PAM8302
Take the black wire from your headphone jack and solder it to A- on your PAM8302
Solder the Pi:
There's a picture of the pi above. Take one black wire from your power boost solder it to the black dot on the picture of the pi.
Take one red wire from your power boost solder it to the red dot on the picture of the pi.
Testing:
carefully be sure the remaining black wire from the power boost and red wire from the powerboost aren't touching anything. then attach the battery and flip the switch. if everything is hooked up correctly an led should light on the pi, on the charge board and you may hear a light buzz from the speaker if it's noisy enough to bother you you likely have an issue with you solder joints.
Step 5: Assembly
We should now have everything attached with exception of the LCD and the optional pi camera. in the first few pictures you'll see how to screw in the pi itself. it's quite simple, so pull out your kit of 80 various laptop screws find some screws just a mm or two longer than the thickness of the pi and thread them into the soft printed plastic. PLA is recommended. there should be two lovely pegs to set the pi on, and on the opposite corners there's holes to thread. the same goes for the power board. there's pictures above that shows the assembly of the power boards.
now push the switch through the tiny hole above the power board. grab the switch from the outside with with some tweezers or finger nails. While pulling gently on the switch to keep it from falling back into the case put some hot glue on the backside of the switch as pictured above. once the glue has cooled double check that the switch is in a good position for use. If it's not good peal off the glue and try again.
Drill a 3/16th inch hole between the pi and the powerboost you can also dremel a hole. This should be on the side of the case where the pi's usb ports are located. Slide the headphone jack into the hole and hot glue it in place.
Finally, glue the speaker battery and audio boards in place as pictured above. I put the speaker facing the plastic under the battery which i tucked directly behind the powerboost board. Then I glued the battery up against the sides of the 3d printed case. Ffinally I glued the speaker amplifier the top of the battery.
So if you've done everything right this far you should have the pi, powerboost, the PAM8302, the speaker, the power switch, and the battery all installed and secured in the back of the pi case. There should also be one 10" black wire and one 10" red wire left.
Step 6: Adding the Screen and Finshing Assembly
Pat yourself on the back you're almost done with a rather complex assembly. now take some 6mm long screws and thread the side bars. They should thread into the screw holes on the screen as shown in the pics above. If the screen doesn't line up and fit you probably have it upside down. Look at the pictures and you may notice I have prototyping wires attached to my screen. I actually put pin headers on my powerboost instead of soldering direct. if you followed through step by step without looking ahead then you're soldering the wires on. if not it's your choice. I prefer pin headers for quick easy modification because my creations are always in a state of flux and improvement.
Use the remaining Wires:
Solder the remaining red wire from the powerboost to the vin pin on the screen
Solder the remaining black wire from the powerboost to the gnd pin on the screen
Attaching The Camera (Optional):
plug the camera cable into the camera board
plug the cable in the pi as shown above
flip the camera over the ethernet jack.
bend the cable flat and glue in place.
Attaching the screen ribbon:
Plug the Ribbon cable in to the pi as shown
if you look at picture 5 it shows how I flip the back panel down into place after attaching the ribbon
Finally screw the four screws from the back panel into the brackets on the back of the screen and you're fully assembled.
Step 7: Building the Pi Software Image
Step 1)
plug a keyboard into your pi, and make sure the pi is plugged into a charger.
Go to this website and follow the install: (only setup your keyboard as a temporary controller)
https://github.com/RetroPie/RetroPie-Setup/wiki/Fi...
Step 2)
You may have an annoying buzz sound (It's ok ignore for now, we'll fix it soon)
go through the ReroPie Menu as follows to setup wifi:
retropie / settings > raspi-config > interfacing options > SSH > Yes > Ok > Finish > Retropie Setup > Configuration Tools > wifi > (configure your wifi) > exit >
step 3)
Install Pixel:
raspbiantools > Install Pixel Desktop Environment > yes > (wait a while) > ok (to flash player) > (wait a while longer) > ok > cancel > back >
step 4)
Install Kodi:
Manage Packages > Manage Optional Packages > Kodi > Install from binary > (wait a while) > back > back > back>
step 5)
register and connect your JoyCons:
Configuration /Tools > bluetooth > Register and Connect (while pressing the tiny button between L and R on the right joy-con) > choose Joy-Con (R) > NoInputNoOutput > (wait) > ok > ok
step 6)
repeat step 5 with Joy-Con (L)
step 8)
cancel > back > exit > (start button) > quit > quit emulation station> yes
step 9)
type the following:
sudo apt-get update && sudo apt-get upgrade && sudo rpi-update
sudo reboot
step 10)
type the following:
wget https://raw.githubusercontent.com/cfoote7/PiSwitc...
sudo chmod 777 setup.sh && sudo chmod a+x setup.sh
./setup.sh
Update:
I've added a controller connection menu, where the screen will tell you if both joy-cons are connected. also added a one player two player mode selection menu. on first competed boot you will now connect your controllers with the + and - buttons, click next, click retropie, and choose 1 player mode.
Old:
when the device gets to the touchscreen boot menu tap + and - to activate the two controllers and tap retropie.
Choose retropie hit start > configure controllers > configure your joycons
Tada this is your first boot to the completed device. Now you just need to set it up with your own media and roms.
Check back for updates with automatic controller connecting and parsec for computer to pi game streaming.
Notes:
pywx.py is my touchscreen boot selection menu, it's not actually a boot selection being that all these options exist under one raspbian jessie build. I plan on adding a simpler way of pairing the controllers at boot to this menu. check back for updates, and please let me know if you build this especially if you make any improvements I'd love any co-op on this that's offered. Please check back on my repository I'll be updating it https://github.com/cfoote7/PiSwitch
Thanks for looking if you have any questions about my custom built hardware or software feel free to ask I like to answer questions and find ways to make my instructables clearer :)

Runner Up in the
Epilog Challenge 9

Participated in the
First Time Author Contest 2018
86 Comments
Question 3 years ago
Hi man, thank you for this, i think is pretty awesome anyways. I have the black screen error that everybody has, can yo tell us the specific versions that you used back then, or some pointers o how to make the joycons work? I'm about to try something called Qjoy, i've no idea how haha, but I'm in that point in the proyect that i' dont want to quit. Anyways, thanks man, this is such a cool idea
Answer 3 years ago
I responded to VonHexer's post below from 5 months ago just today. I don't know what version of the Raspberry Pi you are using but maybe the answer will be helpful for you. I am pasting it here so you can find it easily.
I was able to get this working with a Raspberry Pi 4, Model B 8GB. I used the comment here as a starting point, https://github.com/cfoote7/PiSwitch/issues/7#issue... That got me beyond the black screen with a blinking cursor. I believe that is enough to get things working on the Raspberry Pi 3 again. That wasn't enough to get everything working on my Pi 4 though. After making that fix, I was getting a new error,
To fix this, I also had to make some changes to the dtoverlay in my /boot/config.txt file. In order to do this without losing control of my Raspberry Pi, e.g. black screen with blinking cursor, I took the steps below.
1. Follow steps 1- 9 from the "Step 7: Building the Pi Software Image" section.
2. In step 10, run the wget command but no other commands
3. I edit the the setup.sh file that was downloaded with the wget command, you should use whatever text editor you are most comfortable with to do it.
4. I delete line 5 from the setup.sh file, it is the line below
5. I then run the previously deleted line from the setup.sh file as a standalone command
cloned into my home directory under PiSwitch then I modify 2 files before running the modified setup.sh script.
First open /boot/cmdline.txt and copy the part that says, root=PARTUUID=XXXXXXXX-XX, then open /home/pi/PiSwitch/cmdline.txt and replace, root=PARTUUID=5728b712-02, with the previous copied value. I haven't tested this on a Pi 3 but I believe that is all that is needed to fix the issues with the Pi 3.
If on a Pi 4, then second open /boot/config.txt and copy the part under the [pi4] tag
Paste them into the /home/pi/PiSwitch/config.txt file at the very end.
7. Run the rest of the steps in the original tutorial after that point.
After doing this I ran into some issues where the setup script failed to set the proper permissions on the files in the /home/pi/PiSwitch/NewTouchBoot folder. If you run into this you can manually modify the permissions to allow them to be executable again.
Reply 2 years ago
Have you got this to run on retropie 4.7? I saw you got running on pi 4.
I'm am about to try pi 4 edits you said. Will update asap.
Also anyone reading I have a project similar to this project .
Will post on here and github . Portable pi 4 with 7 inch screen, joycons usb outside, hdmi out and more.
3 years ago
Hi there! I have a Raspberry Pi 4, Model B. This one from Amazon to be exact:
https://www.amazon.com/gp/product/B07YRSYR3M/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&psc=1
Does this hardware work with this setup guide by any chance? Would anyone be willing to help me craft a device? I'm willing to pay for their time on it.
Reply 3 years ago
I was able to get this working with a Raspberry Pi 4, Model B 8GB. I used the comment here as a starting point, https://github.com/cfoote7/PiSwitch/issues/7#issue... That got me beyond the black screen with a blinking cursor. I believe that is enough to get things working on the Raspberry Pi 3 again. That wasn't enough to get everything working on my Pi 4 though. After making that fix, I was getting a new error,
To fix this, I also had to make some changes to the dtoverlay in my /boot/config.txt file. In order to do this without losing control of my Raspberry Pi, e.g. black screen with blinking cursor, I took the steps below.
1. Follow steps 1- 9 from the "Step 7: Building the Pi Software Image" section.
2. In step 10, run the wget command but no other commands
3. I edit the the setup.sh file that was downloaded with the wget command, you should use whatever text editor you are most comfortable with to do it.
4. I delete line 5 from the setup.sh file, it is the line below
5. I then run the previously deleted line from the setup.sh file as a standalone command
6. After that has been cloned into my home directory under PiSwitch then I modify 2 files before running the modified setup.sh script.
First open /boot/cmdline.txt and copy the part that says, root=PARTUUID=XXXXXXXX-XX, then open /home/pi/PiSwitch/cmdline.txt and replace, root=PARTUUID=5728b712-02, with the previous copied value. I haven't tested this on a Pi 3 but I believe that is all that is needed to fix the issues with the Pi 3.
If on a Pi 4, then second open /boot/config.txt and copy the part under the [pi4] tag
Paste them into the /home/pi/PiSwitch/config.txt file at the very end.
7. Run the rest of the steps in the original tutorial after that point.
After doing this I ran into some issues where the setup script failed to set the proper permissions on the files in the /home/pi/PiSwitch/NewTouchBoot folder. If you run into this you can manually modify the permissions to allow them to be executable again.
3 years ago
HI there sorry this is an older project but Im getting a blank screen on starting the pi now, can you please tell me how to fix this? I dont want to install the enitre os again. I was just trying to get the joycons working however now on boot I just get a blinking line and no way to access the system. thanks!
3 years ago
Can you update it? I see some people are saying to use Jessie rather than Stretch, and it works fine from there but they are still having issues with low-voltage.
3 years ago on Step 7
Hello, I’m having trouble with step 10, do I type the info in that link in?
Reply 3 years ago
This is where my raspberry crashes, do put it in just like that “piswitc...”?
4 years ago
I would gladly pay someone to build me one of these (I have no technical skills, this is infinitely beyond my level ---- epic and brilliant project though -- infinite props !!
Reply 4 years ago
I could assist you with this build
Question 4 years ago
At the end after ./setup.sh Im getting black screen with blinking line. Any idea what I have done wrong? I did it twice and same problem :(
4 years ago
all i'm getting is a black screen with a blinking line :(
Question 4 years ago
Hey, Chris.
Amazing build. (Sorry I think I posted on your YouTube as well, but I'll post here.) Looking at making this build, but see that there are some questions regarding the Pi3B+ and both power consumption and Jessie vs Stretch. Have you updated your build at all? It seems like the power consumption issue may be tied directly to the touchscreen and not another 7" display. Not sure if the initial modifications have been adapted to a non-touchscreen. While awesome, the touchscreen isn't really used within Retropie itself, so just curious if a controller based selection screen is viable. I suppose that would require some sort of auto-pairing on startup. Meh. Just thinking out loud. It's father's day and I'm allowed to be drunk mid-day today.
Anyway, man, amazing build and I'm hoping to replicate it. All my images are 3B+ builds for the extra GPU output (I know, crazy considering same hardware), so I was hoping to kind of go from there.
Thanks,
Ryan
Question 4 years ago on Step 7
Can you please give me a repository for just getting both the joy-cons to work at the same time I am new to coding and I do not know how it works so sorry if this is noob~ish
4 years ago
I want to start off by saying this is a great and fun project and you have put a ton of work into it, thank you. As I was building my own version I ran into a few roadblocks that I thought I might bring up. For the box that holds the pi, battery, etc. I think it would be convenient to have a cut out for the USB port, just in case the battery is dead, but you have access to an outlet. I personally found the power switch hard to mount as you put it and ended up wiring it outside of the slot, pulling it in, then using a metric buck-ton of hot glue to hold it in place (that could have been user error on my part, but i just want to try and make the project better if I can). The last thing is that I would have personally appreciated a wiring diagram, even a simple, pictograph one made in Word. I ended up wiring the screen incorrectly and had to Jerry-rig something after everything was set. My last observation came when installing the software. I think it might be beneficial to move step 7 before step 1 as I have been having issues with the pi and a difficult time accessing components (so installing software before any of the soldering). I do admit, this is very well my own error and lack of pi knowledge, but I wanted to bring it up. I think your PiSwitch is a really cool and fun project, thank you for putting this guide up for us to use!
Question 4 years ago on Step 7
When I start it up after installing everything I needed too, it just loads to a blank screen with a blinking cursor, I can’t type or anything, can you please help me:)?
Answer 4 years ago
I just built this over the weekend and had the same issue. It doesn't seem to work with Retropie 4.4. I was able to get it to work with Retropie 4.3 https://github.com/RetroPie/RetroPie-Setup/releases/tag/4.3. Haven't fully tested the joy con configuration on different roms but I was able to get past the blank screen issue. Hope this helps.
4 years ago
What a nice project :)
Question 4 years ago on Step 7
Hello how can we have the same os (operating system) lile the switch