Worklog Super PP: RPi Zero 2W SNES

The Next Guy

Sun Dried Cases
.
Joined
Feb 28, 2017
Messages
98
Likes
157
Location
Washington State
Portables
Melted in the Sun
Over the last week, I was bored and decided to make a raspberry pi powered portable. I found some RPi Zero 2Ws for $20 a piece and thought they were perfect since they were small. I also found out that you could use SPI screens.

Using ili9341-fbcp, I was able to connect the screen after some fiddling with the compile parameters. For the buttons, I used GPIONext, which made configuration a breeze. Each button only needed a ground connection, and the connection to the IO pin. Getting sound to output to PWM and having EmulationStation properly output to it was a chore, but I found success with a custom btoverlay file setting the PWM pins. I took the PWM signal, and fed it through a low pass filter, as well as a voltage divider to manually lower the max output volume. The little 1W speakers could not handle all the current so well.

The batteries I used are 2x 1200mAh lithium polymer in parallel. The power module I have can take this and boost it to anything up to 24v with a 8W max. I set it to 5.5v. I found the total run time to be 5 hours and 5 minutes. For the test, I streamed a youtube video and played it at max volume.

To design the case, I used Fusion 360, and cura to slice up the parts. I messed around with the raw components until I had a layout that seemed like it would work well. I came up with 2 designs. One landscape, and one portrait. The Portrait had 1 speaker, and used a 2 inch ST7789 screen. The landscape had 2 speakers, and a 3.2 inch ILI9341 screen. The footprint of the portrait is much smaller, almost as small as the original pi, at 26mm thickness. The footprint of the landscape is much larger, but only 20mm thick, nice and slim in the hand. Both units have fans the pull air inside, and the Pi is placed in such a way that the air routes over it to escape the air vent. Keeping it continuously on, it never gets above warm to the touch. The reported temp doesn't go above 50C.
schematic.png

20240508_192808.jpg

20240508_192238.jpg

20240508_201217.jpg

20240508_201232.jpg

20240508_201301.jpg


If you all are interested in the ROM .img file for the setup that uses the ILI9341, I can provide it and maybe get permission to upload it here. It's compressed to about 1GB with gz.
Attached will be the models that I used in the landscape model so you can slice and print them for yourself if you are interested.
 

Attachments

Last edited:

The Next Guy

Sun Dried Cases
.
Joined
Feb 28, 2017
Messages
98
Likes
157
Location
Washington State
Portables
Melted in the Sun
I found out something about compiling the ili9341 driver. If you use the default DMA channels when compiling for the ili9341 specifically, omxplayer will crash fbcp, and attempting to restart it causes DMA conflict. To avoid this, you can add
Code:
-DDMA_TX_CHANNEL=7 -DDMA_RX_CHANNEL=5
or other channels than the default if you are using these, and omxplayer won't cause issue anymore. This is documented on the github, but the symptoms confused me at first. If you realise that your display is no longer updating after OMX player runs, it's because of this.
 

The Next Guy

Sun Dried Cases
.
Joined
Feb 28, 2017
Messages
98
Likes
157
Location
Washington State
Portables
Melted in the Sun
I finished version 2 yesterday. This one charges with Type-C and using the g_mass_storage module with the raspberry pi, I can plug it into my computer and copy roms directly to the pi. I made a 24gb img file that g_mass_storage is given access to, then gave it a mount point at /mnt/usb_share. I then created soft links from the share to the RetroPie folder. It's mounted as read only.

This version also uses I2S audio, though I couldn't really tell a difference between this and just using pins 18 and 13 for PWM audio. It does add a headphone jack though. The power switch is wired so that you can play off of battery power, or USB power. Not power pathed I know, but still better than just battery power. I also wrote a program in c++ that monitors button presses using SDL, allowing me to add volume adjust by holding select and pressing up and down on the DPad. You can restart the system by holding L+R+Start+Select for 5 seconds, or turn off the system by holding L+R+Select+X.

Currently I'm trying to find out a way to draw on top of the console and X11 if it's open for EmulationStation so that I can indicate volume as it's adjusted, as well as battery life. Once I figure that out, v3 will have a battery monitor, provided by an ATTiny85 running at 3.3v connected to the serial port. Since the console lasts 5 hours already, I didn't make it a priority for the other versions.

20240516_105407.jpg
20240516_105532.jpg
20240516_105548.jpg
 
Top