Introduction: The YouTube Box

By far the biggest time sink that I have is watching YouTube. Since 2008, this website has been my main source of entertainment. I am a huge fan of the platform and many of its content creators. So, I wanted to create something that made it easier to consume my favorite creators newest content. I came up with the idea of making an old-style TV, where the buttons would change to the "Channel" to a different YouTuber and start playing the newest video. Red LED lights on the front would light up when the channel uploads a new video. And when a button is pressed it will open a window playing the newest video.

Step 1: Setting Up the Code

The most important part of any large project like this is making sure that the code works and that it works well. Before coming up with any design of how it should look. After all what is the point of having a really cool looking unit if it doesn't function?

This code obviously revolves completely around YouTube. So, we need to extract information about the channels for the website, interpret that data, then create a URL that take use to the newest video uploaded by the selected channel. To do this we are going to be working with googles API. Before we start working with the API were going to need a 2 thing. First, an API key from google. All this takes is going to the google developer console getting a developer’s license and requesting an API key. Second thing that you need to do is download the Google API Client form GitHub. For this project I am working in python so I needed the python client.

Step 2: Writing the Code

The Hart of this project is a Raspberry Pi4. My first attempted at building this I was using a Raspberry Pi2. Which was just too underpowered for video streaming. It would take several minutes to just load the web page. And when the video would play it could only do it for a few seconds before it needed to buffer. So, the switch was made to the newer board. Works great and have no complaints with it. Web pages load fast and video play without buffering.

How the code works is that every 5mins the program will go to each channel's "all uploads" playlist and get the number of how many videos that are in the playlist. Then it will compare that number to the number of videos that it counted last time it loop or last time the program ran. If the number it just counted is larger than the number it counted last time. Then a new video has been uploaded. Using the IO on the Raspberry Pi, the led will be turned on letting the user know which channel has uploaded and the and the new URL will be ready to go and linked to the button. Once the button is pressed it will open up a web page, go to that URL, turn off the led, and update the saved total uploads value in a TXT file.

Big thing to note, is that this program run off V3 of the YouTube API. At some point the API will be updated and this program will no longer work. But most likely all it would take to fix is changing where the program goes to retrieve information.

Step 3: The Electronics

Before we even think about building a case for this, we need to make sure that this thing is fully functional outside. Then build a case around everything. I started by building the button & led panel. The first version, I soldered the LEDs and tact switches to a PCB. After soldering the PCB, I soldered wire to the board and attached Molex pins. So, that it could be easily attached to the raspberry pi. With this board I tested that the inputs and out puts of the PI were working properly. I later found that lining up and installing this PCB was a pain so I remade it. Version 2 was a much better design. instead of using a PCB I 3D printed brackets for the tact switches and LEDs. I will I will talk about that in the following section.

The next thing we need is sound. which consists of 2 parts an amp, and a speaker. For this I am just using a cheap audio amplifier module from amazon, and a 4 Ohm speaker. Because I am only using one speaker, I will also be using 2 mono audio jacks. one audio jack goes to input of the amp and the other goes to the PI.

Last but not least we need a display. I found this really nice 7" LCD screen on amazon for $70 that was perfect for this. It uses a standard HDMI connector so I needed to buy a different cable (HDMI to micro-HDMI) in order to have it work with the Pi4. Once the display was hooked up, I turned on the unit and was treated to a nice crisp clean image.

Step 4: Making the Panels

The box is built out of 2 different materials, 1/4" MDF & Black PETG. I started out by laying all the parts down onto a table. This gives me a rough idea of how big the box needs to be made. From that information you can move into your favorite drafting software to start sketching out what this thing will look like. For this box the face dimensions were determined by the size of the LCD and button/LED panel. The thickness was determined by power/volume panel. So, the measurements that I came to was a box 10"X6"X5.5".

I cut all the panels out using a table saw:

2 - 10"X6" (Face & Back)

2 - 5"X5.5" (Sides)

2 - 10"X5" (Top & Bottom)

Now for cutting out the openings, what I like to do is print out the shape it needs to be on my 3d printer, tape it in place to the Panel. Then use a flush cut bit on my router to cut it to the exact size. After all panels are cut, I spray-painted them with a glossy cherry red, to match the colors of the YouTube logo. And on the back, using some white paint, I painted the play button icon. It has a little bit of overspray there but I think that it looks cool like that. Almost as if it were lit up.

Step 5: 3D Prints

I started off by remaking the button/Led panel. I could tell right away that lining up the existing one was going to be a huge pain. So, I made a holder for the buttons and just glued the LEDs to the face plate. then re soldered the connections. After that I knew that I needed to make button caps in order to be able to reach the tact switches. The caps were printed and painted white. The color helps it stand out from the panel and matches the theme of the box.

When the display is popped in you are able to see where the LCD and MDF meat and it doesn't look good. So made an LCD cover plate to make it look nice. Then I just popped the display in and placed a cover over the front.

The bottom needs 4 feet and 1 speaker cover. The 4 feet are printed and attached by 4 4-40 screws and nuts. For the speaker cover, once it was printed it needed a little more work. So, I also cut out a small piece of wire mesh and pushed it inside. This gives it that clastic speaker look.

A speaker bracket is then printed and a panel for the power switch and volume control. The power panel just holds power plug and switch as well as the potentiometer for the speaker control.

Step 6: Final Assembly

The speaker is attached over the speaker using a bracket and held in place with two screws. once done the two side panels are glued in place. The top is then glued on followed by the face. At this point I wire everything together and plug all the connectors into the Pi. One of the biggest rules when building something like this is always build something that you can take apart. For that reason the back panel is not glued on it is held in place with four magnets.

Each of the 6 buttons is linked to a different YouTube channel. Jeremy Jahns, Kitboga, penguinz0, PewDiePie, videogamedunkey, and Good Mythical Morning. To be able to know which button links to which channel I printed off pictures of each of their Icons and glued them in the slot next to each LED.

Step 7: Conclusion

And that's all she wrote. The only thing left to do is turn it on sit back and enjoy some YouTube. Thank you so much for taking the time to read. I hope you found something useful or interesting from this. Have a wonderful day.

Fandom Contest

Runner Up in the
Fandom Contest