Replies: 3 comments
-
This post is reserved for the Scientific Atlanta 8529300 cable box build. |
Beta Was this translation helpful? Give feedback.
0 replies
-
This post is reserved for the Scientific Atlanta 8540700 cable box build. |
Beta Was this translation helpful? Give feedback.
0 replies
-
This post is reserved for Q/A and odds and ends. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
TVS99 Cable Box (RPi 5 or above)
This post is a WORK IN PROGRESS (WIP) and will be updated with additional details when needed.
Introduction
Remember when you were younger and the enjoyment of turning on the TV and finding something to watch? How about the sound of the cable box turning on and the CRT TV warming up? Let's relive that nostalgia with some fun with TVS99 and an old cable box.
The focus of this discussion is to take an old cable box and replace the guts with a Raspberry Pi to have a retro media center. 3D printing and soldering will be required but should be minimal for both. Knowledge of Linux and the command line interface will also be required.
The base install uses a Raspberry Pi 5 for this project. If you try this with another single board computer do let us know how it goes!
Safety
Norm Abram was 100% on the nose when talking about the importance of safety glasses. When soldering, cutting or drilling (or anything else that may cause fly-back or splashing) always wear some protective lenses!
Everything you do on this project is 100% your responsibility, I take no liability if you injure yourself or others while constructing this, or any of, my projects.
File Share
All of the custom content I created/curated for this project can be found in a Google Drive share:
Please do not redistribute these files, instead point to this guide or the share directly.
Parts
Links in the parts list are the ones I've purchased but you are welcome to find your own.
Here are the minimum set of parts needed for this project:
Optional items:
External Audio/Video Out optional items:
External Power optional items:
Getting the Pi Ready
We will be using an OS named FullPageOS (https://github.com/guysoft/FullPageOS), which is found on the Raspberry Pi Imager under "Other specific-purpose OS". Make sure to add your network information before writing the image.
Any time we Run something, we'll be doing it through an SSH terminal to the Pi and using the CLI. I recommend PuTTY for this.
See cable-box-pinout.jpg for all the GPIO pins used in the File Share:
Install FullPageOS (Latest Nightly)
Install TVS99 [WIP]
Creating the Customizations for TVS99
Setting Up Code for the Display
Since we need a way to visualize the output of something we did in TVS99, let's set up the display first.
Configure TVS99
Get PIP Running
Modify Your Login Profile
Running source .env/bin/activate every time you log in is a pain, let's automate this process.
Now when you log in you'll always be in your virtual environment. To exit from that environment just run: deactivate
Turn on I2C
Install Adafruit CircuitPython [WIP]
More info: https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/installing-circuitpython-on-raspberry-pi
Install 14-Segment Display Settings
Connect the 14-segment display to these pins:
Plug in the Raspberry Pi and log back in.
Example: See display.jpg in the File Share.
Now you should be able to run the 14-segment display on i2c Bus 1.
If nothing changes then do not proceed until you find the issue. Issues could be: Pins not on correct GPIO, update.php isn't creating or updating tv-status.json, errors with Python installation. Ask in this discussion and we'll see what could be wrong.
Note: Dupont female pin connectors will lose their connectivity if they are pulled or stretched out of the header pins too many times, be gentle with these connectors.
Front Panel Inputs
Now that the output mechanism, the display, is set up let's focus on our inputs!
Front Buttons
This is a bit harder to tackle because we are discussing potentially a large combination of buttons. I am going to keep my focus to a max of 5 buttons to keep things simple. If you have a larger number of buttons then you'll need to start a matrix, that is out of the scope of this discussion.
Example: See buttons.jpg in the File Share.
Shut down the Raspberry Pi and connect these buttons to the GPIO pins listed below:
Plug in the Raspberry Pi and log back in.
Finalizing the Setup
Now that the display and buttons work on their own, it is time to button everything up and make sure everything works on boot.
You will need to edit the files above before running if your home directory isn't "/home/pi"!
Let's set up the BASH script.
We really want to run this when the system starts and stops.
If you want to see it in action, just run: sudo reboot -h now
This should give you basic services to get channel updates and push-buttons on the front of your new Cable Box!
Optional Add-Ons
Here are some extras that are pretty awesome that you can put into your setup.
Optional Hardware
Optional: Composite Out
For composite out you'll need these items:
You'll need to solder a header to the Composite Out on the Raspberry Pi board. Those pins are J7 and J8. Once done then connect the TRS cable to the Audio DAC Hat and connect those wires to the white/red jacks of the composite out.
Raspberry Pi header information: https://community.element14.com/products/raspberry-pi/m/files/148385
Run: sudo raspi-config
Select:
Now you should have composite out working.
You can use SHIFT + ALT + RIGHT or LEFT to stretch the window to fill the TV screen. This is not necessary if you are using a CRT.
Optional: Infrared Receiver [WIP]
This part is based on this project: https://github.com/Lime-Parallelogram/pyIR
TVS99 comes with a remote page that can be controlled by your smartphone, but if your instance isn't tied to the internet then you'll need other ways to control it. An old-school IR remote will do the trick easily.
Note: Not all IR sensors are the same frequency. Older remotes use higher frequencies such as 455kHz, newer ones typically use 36-38kHz. Make sure to match your IR sensor with your remote. I would not recommend a wide spectrum IR sensor, such as the TSOP98200, due to the wide signal ratio and the proliferation of LED lighting.
Here are some of the IR sensors I have tested successfully:
Connect the pins of the IR sensor to the GPIO pins listed below:
Plug in the Raspberry Pi and log back in.
Let's train your remote: [WIP]
Now that we have your remote trained, you can test its functions:
With some customization you could add multiple IR receivers to your Cable Box, this way you could have a 455kHz and a 38kHz receiver, though each would need to have their own GPIO pin dedicated to the OUT of the IR receiver. You'd just need to:
You would have to train remote2.py the same as you did for remote.py. You would also have to add a line to run it in cablebox-start.sh.
Optional: Plug Relay
An older cable box has a plug on the back as a power relay, usually it is heard with a sharp CLICK when turning it on. We can't exactly have it turn on when the box turns on BUT we can turn it on as soon as we can.
Disclaimer: You are playing with high voltage, be very careful if you decide to do this! Make sure your Raspberry Pi is fully removed from power and nothing is plugged in.
Note: Doing this mod may degrade your WiFi signal into the Raspberry Pi due to the extra electromagnetic fields AC puts out, you'll have to decide if the juice is worth the squeeze.
For this you'll need a Power Relay, I have one listed in External Power optional items (see above):
Connect these pins:
NO (Normally Open) AC: Neutral Voltage
COM (Common) AC: Hot / Live Voltage
DC+: Pin 4
DC-: Pin 6
IN: Pin 18
Download relay.py file from the File Share:
Run:
To save yourself having two power sources I recommend adding a 5v Power Supply, see the recommended item in the External Power optional items
Optional Software
RPi-Monitor
RPi-Monitor is a tool that allows you to get a quick glance of how your Pi is operating
FrontPageOS Manager
This project is a web application that allows you to manage your FullPageOS running on a Raspberry Pi on the same local network. The application is built with React and runs on a Node.js server. You will need to install NodeJS and Node to run this application.
Troubleshooting
No Sound from HDMI
Make sure you are using the HDMI plug closest to the USB-C plug.
If that doesn't work:
Beta Was this translation helpful? Give feedback.
All reactions