
Raspberry Pi YouTube Boombox
Created by Ruiz Brothers
Last updated on 2021-01-27 10:26:20 AM EST

2
3
3
7
7
8
9
9
9
9
9
10
11
12
12
12
12
12
12
12
Guide Contents
Guide Contents
Overview
Parts
3D Printing
Parts List
Slicing Parts
Assemble
Press Fit Speaker Holder
Speaker Grill
Add Raspberry Pi to Case
Speaker
Screen Case
Optional Tripod Install
Set up Raspberry Pi
Set up SD card
Enable SSH
Install Blinka Libraries
Configure Audio, Fan and Display
Install Kiosk-mode Script
Edit Playlist
© Adafruit Industries https://learn.adafruit.com/youtube-radio Page 2 of 13

Overview
In this project we’re building a Raspberry Pi powered YouTube lofi radio player with Adafruit’s BrainCraft HAT!
We designed and 3d printed this case to house the electronics and features a built-in speaker and display!
The Pi is set up in kiosk mode and automatically plays any YouTube music stream. This uses digital I2S, so it's got
high quality stereo output!
The BrainCraft HAT has everything you need to make an all-in-one YouTube player.
The built in joystick can be used to change the stations and adjust the volume.
This lets you quickly switch between different YouTube channels without having to use a keyboard or mouse.
You can also pause and play the video by pressing the button next to the joystick.
The case has access to all of the ports so you can get to the headphone jack if you wanna hook it up to a bigger
sound system.
To keep the Pi nice and cool, we added holes on the side of the case for better airflow.
Parts
© Adafruit Industries https://learn.adafruit.com/youtube-radio Page 3 of 13

Raspberry Pi 4 Model B - 4 GB RAM
The Raspberry Pi 4 Model B is the newest Raspberry Pi computer made, and the Pi Foundation knows you can always make a good thing better! And
what could make the Pi 4 better...
$55.00
In Stock
16GB Card with NOOBS 3.1 for Raspberry Pi Computers including 4
NOOBS 3.1 is the fastest way to have a variety of operating systems on your Pi. Available on a 16G card, you can now boot multiple OS's such as
Raspbian, Pidora, RaspBMC,...
$14.95
In Stock
Add to Cart
Add to Cart
© Adafruit Industries https://learn.adafruit.com/youtube-radio Page 4 of 13

Speaker - 40mm Diameter - 4 Ohm 3 Watt
Hear the good news! This speaker is a great addition to any audio project where you need a 4 Ohm impedance and 3W or less of power.At 40mm
diameter it...
$4.95
In Stock
JST PH 2-Pin Cable - Female Connector 100mm
Red and black tinned wires with a 2-pin JST PH connector on the end. 4" / 100mm long. Matches up nicely with our Lipoly chargers!
Out of Stock
Add to Cart
Out of
Stock
© Adafruit Industries https://learn.adafruit.com/youtube-radio Page 5 of 13

Full Size Wireless Keyboard with Trackpad
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox - sorry! We were practicing our typing
ON THIS AWESOME...
Out of Stock
Out of
Stock
© Adafruit Industries https://learn.adafruit.com/youtube-radio Page 6 of 13

3D Printing
Parts List
STL files for 3D printing are oriented to print "as-is" on FDM style machines. Parts are designed to 3D print without
any support material. Original design source may be downloaded using the links below.
BrainTube-screen.stl
BrainTube-case.stl
BrainTube-tripod.stl
BrainTube-speaker-grill.stl
BrainTube-speaker-cone.stl
BrainTube-speaker-ring.stl
https://adafru.it/Qcv
https://adafru.it/Qcw
https://adafru.it/Qcv
https://adafru.it/Qcw
© Adafruit Industries https://learn.adafruit.com/youtube-radio Page 7 of 13

Slicing
Parts
Slice with
settings for
PLA material.
The parts
were sliced
using CURA
using the
slice settings
below.
PLA
filament
215c
extruder
0.2
layer
height
10%
gyroid
infill
60mm/s
print
speed
60c
heated
bed
© Adafruit Industries https://learn.adafruit.com/youtube-radio Page 8 of 13

Assemble
Press Fit Speaker Holder
The speaker ring part fits into the cutout on the BrainTube-Case part.
Speaker Grill
Fit the Speaker-Grill part into the Speaker-Cone part.
Add Raspberry Pi to Case
Place the Pi over the standoffs and align the board with the port openings on the case.
Speaker
Solder the speaker wires to the JST female connector. Use heat shrink to insulate the connections
© Adafruit Industries https://learn.adafruit.com/youtube-radio Page 9 of 13

Screen Case
The front cover is fitted over the HAT with the speaker cable fitted through the slit on the HDMI port opening.
Add gaffers tape or kapton tape to insulate the speaker magnet. The Speaker press fits into the ring.
Align the speaker cone over the speaker wires and then press fit over the speaker.
© Adafruit Industries https://learn.adafruit.com/youtube-radio Page 10 of 13

Optional Tripod Install
Use three M3x8 screws and a 3/8" to 1/4" Adapter Screw (https://adafru.it/toF) to attach any tripod compatible
mount.
© Adafruit Industries https://learn.adafruit.com/youtube-radio Page 11 of 13

Set up Raspberry Pi
Set up SD card
Attach an HDMI monitor, like our 3D Printed portal monitor (https://adafru.it/QbP) to set up the Pi OS.
Use the official Raspberry Pi Imager to burn the latest OS on a SD card. Download the imager
below:
https://adafru.it/QbQ
Enable SSH
After all updates are complete, enable SSH. Follow the step here for instructions:
raspberry-pi-setup (https://adafru.it/QbR)
Install Blinka Libraries
Follow the step below to set up the Blinka libraries:
Blinka Setup (https://adafru.it/Pf7)
Configure Audio, Fan and Display
Follow the links below to set up the Voicecard, Fan Service and Display module
software:
Audio Setup (https://adafru.it/Pf8)
Fan Service Setup (https://adafru.it/QbS)
Display Module Setup (https://adafru.it/Pfa)
Check these steps if you encounter audio or display issues:
Display Module Troubleshooting (https://adafru.it/QbT)
Install Kiosk-mode Script
Use the kiosk-mode script to enable fullscreen video playback:
Kiosk-mode Install (https://adafru.it/QbU)
Edit Playlist
Follow these steps to add your own streams:
Edit Playlist (https://adafru.it/QbV)
https://adafru.it/QbQ
© Adafruit Industries https://learn.adafruit.com/youtube-radio Page 12 of 13

© Adafruit Industries Last Updated: 2021-01-27 10:26:20 AM EST Page 13 of 13