Wooden LED Gaming Display Powered by Raspberry Pi Zero : 11 Steps (with Pictures) - woodsgreaughts
Introduction: Wooden LED Gaming Display Steam-powered away Raspberry Pi Zilch
This picture realizes a 20x10 pixel WS2812 settled LED expose with a size of 78x35 cm which can make up easily installed in the aliveness room to play retroactive games. The first interpretation of this matrix was collective in 2022 and rebuilt by many other citizenry. This experience was used to add together ahead all improvements to build a raw version of the matrix and convey this now to instructables.com. Chief new features are the update to a Raspberry Pi Zero instead using and PI A plus an Arduino and replacement the early jumbo controller with a Bluetooth gamepad. Also the software was improved including the simulator, which allows you to develop the code on a computer flat if you have no access to the intercellular substance hardware.
Indefinite special feature of this LED matrix is the primary wood veneer, which is accustomed cover the LED and to cover them, when LEDs are disabled. This highly addition the acceptance cistron of non-tech people ;-) Of trend, if this limited veneer is non addressable in your land, you can also use some otherwise diffuse crucial like acrylic to hide the LEDs. It is also planned to render many key parts in the future to make information technology easier to rebuild the project.
Supplies
- Raspberry Pi Zero W (with some adaption, wholly other models volition also work)
- 200 LED/s s (WS2812B Light-emitting diode stripes with 30 Light-emitting diode/m)
- 4x SPI LED matrix expose with MAX7219
- Cables
- Bluetooth gamepad (e.g. this from Pimoroni)
- Power Supply 5V with at least 5A
- MDF wood for laser cutting
- Wooden veneer or diffusion acrylic plate
- Capacitor, Resistor
- Some screws
Step 1: Laser Cutting
Base complex body part of the matrix is made of MDF wood with a thickness of 3mm and cut by a laser cutter. If you do not own a laser cutter, you can use an online service like ponoko.com or formulor.de operating theatre meet the succeeding fablab/makerspace in your environment. It is also possible to use artificial or other light materials but the attached files are blueprint for 3mm thickness, so thinner or thicker materials need a redesign of the files. Design was through with in Fusion 360.
Most of the parts hold together just by sliding them in situ, only some of the parts like the outer borders should be glued together using wood glue. Control that your matrix is fully working earlier applying any glue! Also the wood veneer has to be glued on, merely this is the cobbler's last step after ensuring that everything works.
At the right (lower) side of the backplane, there is a cut off segment to bonded the physical science components to the matrix and static have access to this components when the facing is affixed along.
Tread 2: Install LEDs
The LED chevron are canonic 30 LED/m WS2812 stripes, which are available at Amazon, eBay or other online stores every last over the world. This is ordinarily likewise the cheapest addressable LED stripe uncommitted. If you want to use other LEDs, you have to ensure the 30 LED/m distance to set to the matrix pattern. The lasercutted segments have dinky cut come out regions to fit to the Light-emitting diode breadth of 10 cm. This LED chevron have double-sided tape happening their back, so you can just glue them directly to the MDF afterward exact positioning. Check the correct orientation of all stripe before using the record (DIN-DOUT direction).
Wiring pattern is a zig-zig so at the remnant, there is only nonpareil stimulus pin to the matrix and cable lengths are atomic number 3 short every bit possible. To proper distribute the power and trim back the cabeling at the tip of the matrix, every LED stripe is connected to 5V and GND at the bottom of the matrix. You can use either bingle wires or prototyping PCBs to parcel out the 5V and GND line.
Step 3: Assembly
The explosion view helps to identify the correct pieces for the assembly. Just follow the in small stages installation pictures. The backplane has cross structures to sustain the long side walls and some of the short walls. If you possess problems to install the pieces, use sand paper to fix it.
Step 4: Bonding
Thither are different shipway to solder on that point power lines for the different stripes together. Either you can habituate individualistic wires or some kind of common railing out of copper to solder the different wires. In this caseful, pieces of prototype PCBs were used to pass over the powerfulness rails to the stripes. WS2812B stripes already have discrete tycoo cables which you can use to connect the power rail to the first stripe input (left side on the picture).
Gradation 5: Install SPI Expose
To display game scores and text, a Light-emitting diode ground substance exhibit supported the LED driver MAX7219 is in use. It is related to via SPI (Serial Peripheral Interface) to the Raspberry Pi. Four 8x8 displays are combined to a 32x8 pixel dot ground substance display. You tin buy out this 8x8 pixel displays for e.g. at eBay, at that place are also combined 32x8 pel displays available. Also you have different color options; in this case red ink displays were used. Because SPI whole kit and boodle similar a shift register, the displays are conterminous together in serial by connecting data unsuccessful of the first intercellular substance to data in of the second one and so forth start from the right side of the display.
This exhibit is only legible from outside, if it is placed directly posterior the veneering stratum. If not, there is only a red blur visible. So you have to mountain it happening top of the backplane cut-out section with a distance of 30mm between the surface of the backplane and the control surface of the ground substance. I give birth used some left terminated awkward pieces and screws to accommodate the lost 19 mm between the backplane and the PCBs, merely you can also any outer type of spacers.
Wiring of the showing is shown in step 7.
Step 6: Install Pi
In this installation, a Raspberry Shamus Zero is used. You can also use any other Razz Protease inhibitor pattern, but newer ones with structured WiFi and Bluetooth leave you to easily connect to radiocommunication gamepads and simplify the programming.
You fundament secure the Pi by using at least two screws and teensy spacers to screw it to the backplane.
For the Raspberry Pi Nada W, the following pins are used:
- PIN 2: 5V
- PIN 6: GND
- GPIO18 -> LED stripes
- GPIO11: SPI CLK -> MAX7219 matrix CLK
- GPIO10: SPI MOSI -> MAX7219 matrix DIN
- GPIO8:SPI CS -> MAX7219 matrix CS
Some people reported issues with using GPIO18 for the LEDs. Please use of goods and services GPIO21 in this case. If so, you have to change the code eligible 21 to pixel_pin = board.D21.
The WS2812B strip is used here outside its spec. Normally it requires a 5V logical system level on DIN, but the Pi only provides 3,3V. Even if this works in to the highest degree of the cases, you should test this with your strip. If it does non work, you can add a level converter like a 74HCT245 or any other 3V3 to 5V convertor betwixt the Principal investigator and the strip.
Footfall 7: Wiring and Power Render
Wiring is done according to the wiring scheme. The power supply is a 5V DC ply.
For an easy along/off shift of the matrix, a throw is added 'tween the power plug and the matrix circuits. Nevertheless, because the Raspberry Operative does not like hard turn out, there is a shutdown option in the software to safely closure the Private detective via Gamepad before switch of the matrix.
The LED strip DIN pin is connected via a Resistor to the Operative, also a large capacitor (4700uF) is added to buffer the power append. Please check out the Adafruit Überguide for Neopixels for to a greater extent details.
LEDs are consuming a maximum current of 60mA per LED, so a supreme circulating of 200x60mA = 12A is possible!!! By reducing the brightness and non victimisation all LEDs fully white, this is more a theoretical value, merely information technology depends connected the code which maximum current is reached. So selecting a larger enough great power supply is real important. For most of the applications a magnate supply with 5V/5A (25W) should be adequate.
To fixate the backplane with the Pi and the Intercellular substance video display, some teensy pieces of wood can be used to scrum them in the edges and also enjoyment screws to hold the backplane in situ.
Step 8: Setup Pi
1. Download modish Raspbian lite envision from raspberrypi.org
2. Replicate information technology to and SD identity card, 8GB is enough. You can apply e.g. etcher to do this.
3. Before booting the Operative with the SD card, prepare WIFI and ssh access
4. Introduce the SD calling card to any computer, a boot folder should be accessible
5. Copy the following lines to the file wpa_supplicant.conf (generate it if not exists) and change the parameters depending on your Wifi and region
ctrl_interface=DIR=/var/run/wpa_supplicant Grouping=netdev country=US update_config=1 network={ ssid="Home Wifi" psk="mypassword" key_mgmt=WPA-PSK } 6. Add an empty file called ssh (without any extension) to boot to enable ssh access
7. Now insert the SD wag to the Razzing Pi and boot it. Check your wifi router to start the IP address of the Pi
8. start a SSH connection to the Pi using a terminal (Linux, Mackintosh) or e.g. Putty an Windows. Insert the IP of the Pi as an alternative of 192.168.x.y
ssh pi@192.168.x.y
9. Update the Pi (takes some time!)
sudo likely-get update sudo apt-get upgrade
10. Install pip and apparatus tool
sudo apt-get set u python3-pip sudo pip3 install --upgrade setuptools
11. Install Neopixel driver, ws281x lib, pygame and libsdl
sudo pip3 set up rpi_ws281x adafruit-circuitpython-neopixel sudo pip3 install pygame sudo apt-undergo put in libsdl1.2-dev sudo pip3 set u --upgrade luma.led_matrix
12. Enable SPI by calling raps-config, navigate to 5 Interfacing Options / P4 SPI / Enable
sudo raspi-config
13. Add Bluetooth Gamepad
sudo bluetoothctl [bluetooth]# agentive role on [bluetooth]# pairable on [bluetooth]# scan along [bluetooth]# pair Associate in Arts:bb:cc:dd:EE:ff [bluetooth]# trust aa:bb:cc:DD:ee:ff [bluetooth]# touch base aa:bb:cc:dd:electrical engineering:ff [bluetooth]# quit
where aa:bb:cc:dd:ee:ff is the Mack dress of your bluetooth gamepad. This address should be shown after calling the "scan on" command. Secure that your Bluetooth controller is ready to pair, please check the blue-collar of the accountant how to do this.
14. You can now connect to you Pi via, default password is raspberry (Windows users may use Putty):
ssh pi@192.168.x.y
Step 9: Python Code, Test and Simulator
Encrypt is available on Github. games_pi_only.py and all bmp files are needed.
git dead ringer <a href="http://href=">href="https://github.com/makeTVee/ledmatrix/tree/master/python/pi_only</a>
The code has an option to run in feigning mode outside the Operative using pygame to simulate the matrix. This is very steadying to develop unexampled features without having direct access to the matrix hardware. Likewise debugging is much easier. You have to set the PI constant to spark off simulation mode (Line 15):
PI=False
In this pretense mode, alse the Keyboard is utilized instead of the Bluetooth gamepad. Buttons 1, 2, 3, 4 are mapped to A, B, X, Y of the gamepad, arrow keys for directions, "s" for bulge out and "x" for select. You fanny use a standard editor plus the console OR some integrated IDEs like Micosoft Visual Studio Cipher operating theater Jetbrain PyCharm to do the growth happening your PC.
If you use the ground substance and the Raspberry Pi, you have to delineate:
PI=Echt
To written matter the code to the Raspberry Pi, you can use the scp command (Windows WinSCP). Open a console windowpane, switch to the folder contenting the Github files and call
scp games_pi_only pi@192.168.x.y:/home/pi scp *.bmp private eye@192.168.x.y:/home/pi
then connect to the Pi via ssh (Windows users may usance Putty):
ssh pi@192.168.x.y
afterwards successful logging connected, you can start the python code away vocation:
sudo python3 games_pi_only.py
If the code runs aright, you can enable autostart by calling:
sudo nano /etc/rc.local
and MBD the following line before exit 0:
/usr/bin/nice -n -20 python3 /interior/pi/games_pi_only.py &
Save (Ctrl+O) and Exit (Ctrl+X)
Step 10: Final Test and Facing
In front the veneer is glue on top of the front, the matrix should atomic number 4 tested to ensure, that altogether LEDs are working. It is such easier to fix something before the veneer is glued on.
The used wood veneer is a special maple facing composition called Microwood, which is one-side covered with paper and has a thickness of 0,1 mm. The paper incline can live glued directly happening the mdf victimisation standard water supply free paper glue.
Step 11: The Result
Possess fun and enjoy the game!
11 People Made This Project!
Recommendations
-
Anything Goes Contest 2022
Source: https://www.instructables.com/Wooden-LED-Gaming-Display-Powered-by-Raspberry-Pi-/
Posted by: woodsgreaughts.blogspot.com

0 Response to "Wooden LED Gaming Display Powered by Raspberry Pi Zero : 11 Steps (with Pictures) - woodsgreaughts"
Post a Comment