안녕하세요 버섯돌이 유재성입니다.
국내에도 라즈베리 파이를 이용해서 게임기를 만드시는 분들이 몇 분 보이시는데..
아래 해외 글의 경우 제작과정이 상세하게 나와있어서 퍼다 나릅니다.^^
무엇보다 3D 프린팅용 파일이 제공되어서 퍼오지만 그 만큼 제작과정은 상당히 힘들어 보이는군요.^^
유사 작품을 고민중인 분들은 다른 글들도 구글링하시면서 적절히 참고 하시기 바랍니다.
출처 : https://learn.adafruit.com/pigrrl-raspberry-pi-gameboy?view=all
Overview
Celebrate the 25th anniversary of that classic gaming device by building your own with 3d printing and DIY electronics from adafruit. In this project we'll use a raspberry pi and TFT touch screen to make an epic DIY gamegirl.
The 3d printed enclosure will house all the components and can be printed in your favorite color. We'll hack an SNES gaming controller and reuse the printed circuit board, buttons and elastomers.
The 3d printed enclosure will house all the components and can be printed in your favorite color. We'll hack an SNES gaming controller and reuse the printed circuit board, buttons and elastomers.
Parts
- Raspberry Pi Model B
- PiTFT Mini Kit
- GPIO Pi Cable
- PowerBoost 500
- Micro Lipo Charger
- SNES Controller
- 2200mAh lithium cylindrical battery
Tools & Supplies
3D Printing
NOE RUIZDesigned to Print
This project is just two pieces! They are optimized to print on any FDM 3d printer with a minim build area of 150mm x 150mm x 100mm. Perfect for printing your Printrbot, TAZ4, RepRap or makerbot. Check out info below for recommended slicer settings.piboy-top.stl piboy-bottom.stl | PLA @230 2 shells 10% Infil 0.2 layer height 90/120 speeds | No Raft No Support |
Snap Fit
The two pieces snap together and are secured with philips screws. The Raspberry Pi, PowerBoost 500 and Micro Lipo charger are mounted to the piboy-bottom.stlpart with #6-32 x 1/2' phillips screws.Circuit Diagram
NOE RUIZThe illustration below is a reference of the power circuit and the game controller buttons. The position of the components are not exact and not to scale.
Power Circuitry
We'll be using a large rechargeable battery to power the PiGrrl for a few hours! To keep the battery recharged, use a MicroLipo or MiniLipo board (they're the same basically, just one has a microB jack, the other has a miniB jack)The good thing about this battery is it's fairly small and dense. But it doesn't have 5V output, it only has aboue 3.7V output. And you really need 5V. So we'll use aPowerBoost500 which can boost the 3.7V up to a nice clean 5V which the Pi likes very much.
When the battery dips too low, a red light on the PowerBoost will light up to warn you its time to recharge!
You can recharge and play at the same time
Keypad Circuitry
In order to make the control pad feel just like the original, we'll 'recycle' a SNES controller. By opening it up and cutting out the PCB we can reuse the rubber elastomers and buttons.The way the keypad works is super-simple. Each elastomer has a piece of conductive material on the back. When it presses down onto the PCB, it shorts two golden pads together. One pad is ground, the other pad is the signal. We'll reuse the CupCade GPIO code so that each pad is one RasPi pin. When that pin is shorted to ground, we'll generate a keypress
Your keypad may be slightly different looking! Don't worry! Just trace out the copper to identify the common ground trace for each set of buttons!
Below is a list of Raspberry Pi connections that will be wired to the corresponding buttons. 1-26 are the number of wires in a Pi cable bundle, with 1 being the white (ground) colored wire. We dont connect to the last 6 pins because those are used for the PiTFT display!
- 3v3 - n/c (not connected)
- 5v0 - connect to output of PowerBoost500
- SDA - LEFT BUTTON
- 5v0 - n/c
- SCL - RIGHT BUTTON
- GND - connect to ground of boost
- #4 - DOWN BUTTON
- TXD - n/c
- GND - connect to ground on Dpad
- RXD - n/c
- #17 - UP BUTTON
- #18 - START BUTTON
- #27 - A BUTTON
- GND - Select/start ground pad
- #22 - B BUTTON
- #23 - SELECT BUTTON
- 3v3 - n/c
- #24 - n/c
- MOSI - n/c
- GND - AB BUTTON ground pad
- n/c
- n/c
- n/c
- n/c
- n/c
- n/c
PiTFT Mini Kit
NOE RUIZPower Circuit
NOE RUIZJump 500mAh Mini Lipo
Bridge the 500mAh connection on the micro lipo usb lipoly charger by applying a good amount of solder to the two golden pads.This will make it so you charge the battery at 500mAh for a fast charge rate
Set JST Wire
Grab a set of wires with a JST male connector that's about 60mm in length (you probably have the one that came with the miniLipo charger!) Insert the positive and negative wires through the right mounting hole. Strip the wires and place the exposed wire into the GND and BAT pins.Solder JST to MiniLipo
Flip the charger over and solder the black wire to GND pin and red wire to BATThis cable will let you connect to the PowerBoost easily
Check 5V LED
Plug in the battery with a JST connector to the MiniLipo charger. Plug the JST from the charger to the PowerBoost 500. Check to see if the green LED lights up on the PowerBoost. If it does, it totally works and is Boosting fine!On Off switch
The boost converter has true-disconnect capability so we can just tie the ENable pin low to do a complete power shutdownPowerBoost 500 Switch
Secure the PCB to a third-helping hand and position the two wires from the slide switch wire to GND and EN pins.Solder Switch to PowerBoost 500
Flip the PCB over and bend the exposed wires down to secure them while you solder the EN and GND pins.Enabled Switch
With the switch now soldered to the EN pin, it can safety power on and off! Try flipping the switch to see the green LED turn on and offPower Circuit Setup
With the parts all wired up, you can insert the slide switch into the piboy-bottom.stlpart through the switch hole on the side.Feel free to take a break after completing this section and play some Mario Kart or have a refreshing drink
Pi Cable
NOE RUIZWe'll be recycling a GPIO cable for the Raspberry Pi to get to the many wires necessary!
Before chopping off the connector, check to ensure it's the right end.
Pull-n-Peel
Separate the Pi cable wires and familiarize yourself with the wiring list outlined in the circuit diagram. Use a wire stripper to strip the ends of the individual wires.Pulled Wires
The wires can be pulled all the way but peeling it half way ensures it stay neat and tidy once its connected to the Raspberry Pi.Snip Set of Wires
Remove the last 6 wires from the bundle, we won't be needing them in this build. This is the OPPOSITE end from the one with the white wire!Upcycling the SNES controller
You'll need to gut a SNES gamepad controller and use the buttons, elastomer gaskets and PCBs. Start off by disassembling the controller by removing the screws in the back of the controller.Disassemble Gamepad
With the back plate removed, carefully remove the cable from the enclosure followed by the PCB, elastomer gaskets and buttons.Unsolder main cable
Secure the gamepad PCB to a panavise jr. or third-helping hand. Heat up your soldering iron and unsolder the 5 small wires from the main cable.Separate the PCB
We'll need to separate by PCB into three pieces - DPad, A+B , Pause + Select. You have the option to choose your preferred method. We found using a Dremel resulted in a higher quality than using super scissors.Be extremely careful when using power tools and sharp tools. Wear protective eyewear. Only in an area with proper ventilation. Consider wearing a dust mask. Use a proper vise to secure PCB while cutting.
Etching Traces
Use an xacto knife or razor blade to expose the needed traces that will wire up to the Pi cable. Follow the photo above and the circuit diagram to reference solder points.Tin PCBs
Now that your PCBs are cut and etched, you'll need to tin the pads with a bit of solder. Again, use a panavise jr. or third-helping hand for assisting while you solder. The SNES controllers tend to use phenolic PCBs which do not take extended heat as well as FR4 so work quickly and studiously!Left DPad
Solder wire #3 to the left button on the exposed trace of the DPad PCB. There's a small hole you can thread the wire through.Check your work
Put the soldering iron down and double check all the wires are soldered to the right buttons.Software
NOE RUIZSince we're using the same controller setup at the CupCade we're also going to use the same SD card image! Download this image which has NES support
This is a big file (about 840 megabytes) and will take a while to transfer.
After downloading, the disk image needs to be installed on an SD card (4GB or larger). If you’re new to this, the process is explained in Adafruit’s Raspberry Pi Lesson 1.
After downloading, the disk image needs to be installed on an SD card (4GB or larger). If you’re new to this, the process is explained in Adafruit’s Raspberry Pi Lesson 1.
Configuring Pi
Attach a keyboard to the PiTFT+Pi and insert the new CupCade SD card.The Pi may boot and reboot to finish the configuration (such as expanding the image)
Once you boot the Cupcade you'll notice that the display is vertical. You'll have to rotate the screen!
Press Alt-F3 to drop out of the GAMERA software and to the shell. Log in with pi/raspberry and edit /etc/modprobe.d/adafruit.conf with sudo nano /etc/modprobe.d/adafruit.conf
and change the fbtft line to this:
<ol class="linenums" style="box-sizing: border-box; margin: 0px; padding: 0px;"><li class="L0" style="box-sizing: border-box;">options fbtft_device name=adafruitts frequency=80000000 fps=60 rotate=270</li></ol>
Then sudo reboot to have the new rotation activate!
You can always nicely shutdown with a keyboard attached by typing ESC which will quit the emulator/GAMERA
You can always nicely shutdown with a keyboard attached by typing ESC which will quit the emulator/GAMERA
Upload ROMs
Your PiGrrl can run MAME ROMs as well as NES! We have documenation on how to install ROMs over on the cupcade tutorial pageFor MAME ROMs, you'll only be able to play 'horizontal/landscape' style ones!
First Test
NOE RUIZKeyboard + Power
Test the circuit with a USB micro cable connected to the micro USB port on the Raspberry Pi. Connect a USB keyboard to the side of the Pi for input.Check Boot
The PiTFT should boot up into the Game ROM AggregatorRemember you have to set up the screen rotation to be 270 so check the previous step if you haven't done that yet!
PDad Test
Lay the PDad elastomer gasket over the PCB and place the plastic part on top. Press the PDad up and down to test for a solid connection.Final Assembly
NOE RUIZMounting Raspberry Pi
The Raspberry Pi is mounted to the piboy-bottom.stl part with 2 #6-32 x 1/2' Phillips screws. Position the Pi into the bottom enclosure and hold it in place while you fasten the two screws.The Last Two Wires
Solder wire #2 to the Positive+ pin and #6 to Negative- pin on the PowerBoost 500.Mounting LiPoly Charger
The MiniLipo charger is mounted to the piboy-bottom.stl part with 2 #4 x 3/8' flat Phillips screws. Position the charger near the bottom right of the enclosure with the USB port facing the hole.Mounting PowerBoost 500
PowerBoost 500 is mounted to the piboy-bottom.stl part with 2 #4 x 3/8' flat phillips screws. Lay the PCB in the center of the part, just below the Pi with the JST facing towards the bottom. Hold it place while you fasten the screws.Mounting Battery
Position the 2200mAh lithium battery to the bottom of piboy-bottom.stl with the wires facing up. Press it into the clips to snap it into place.Installing Gamepad PCBs
Grab a chunk of fun-tac or putty and separate it into three pieces. Roll these pieces into strands and carefully tac them to the surface of the three pillars in the center of the piboy-bottom.stl part.Position the three PCB over the corresponding platform and press it down to hold it into place. Lay the piboy-top.stl part over and check to see if the traces line up with the button cut outs. Keep adjusting and checking the position of the races to get consistent alignment.
Trouble Shooting
NOE RUIZButtons too hard to press
Elastomers might have slipped when closing the case. Make sure the wires aren't obstructing any of the pillars.
Takes too long to fully charge battery
Make sure the lipo charger is shorted to charge at .5A
'라즈베리파이(RPI)' 카테고리의 다른 글
[펌] Using Raspberry Pi for CCTV with Zoneminder (0) | 2014.11.21 |
---|---|
[펌] Raspberry Pi as low-cost HD surveillance camera by scavix (0) | 2014.11.21 |
[추천][해외] How to Build a Raspberry Pi Radio Transmitter - FM 트렌스미터 (0) | 2014.11.21 |
[해외] Turn your Raspberry Pi into a live HDTV transmitter (0) | 2014.11.21 |
[추천][해외] LapPi - A Raspberry Pi Netbook by SilverJimny (0) | 2014.11.21 |