When it comes to teleprompters, content creators have many options, but the most affordable option involves an app on your phone, which may be bulky or additional hardware that may not work well with your camera settings. However, you can build your own Raspberry Pi-powered teleprompter with some Python code, basic electronic components, and 3D printed parts.
What you need: Raspberry Pi teleprompter
Software settings of the Raspberry Pi teleprompter: installation dependencies and scripts
The Python code requires some dependencies. You need to install two libraries: Tkinter and pynput, and Adafruit’s Blinka layer.
1. Install Tkinter Use the apt-get command in the terminal. Tkinter is a Python library for creating basic graphical user interfaces, where it is used to create the teleprompter application part of the project.
sudo apt-get install python-tk
2. Install Pynput using pip3. Pynput is a keyboard and mouse emulator Python library. For this project, it was used to simulate the mouse scrolling of a text box created with Tkinter.
pip3 install pynput
3. Install Blinka, An Adafruit CircuitPython compatibility layer, suitable for single-board computers running Linux. Blinka also allows you to run the CircuitPython library with the Python library. The basic setting only involves entering these three commands:
sudo pip3 install --upgrade adafruit-python-shell wget https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/raspi-blinka.py sudo python3 raspi-blinka.py
If you have questions, please refer to Adafruit’s Blinka installation guide.
4. Download all three .py files From mine github page And put them in your /home/pi directory.
Python script for the Raspberry Pi teleprompter
The teleprompter software involves two Python scripts (you download above) and a Bash script. The first Python is an actual teleprompter application written in Tkinter. The code creates a scrollable text box in which you can display your script. There is also a button on the side of the application. When you click it, you can open a text file to load into the text box. If you need to make any edits to the script when it is opened in the application, you can type it directly in the text box.
The second Python script is used to control the teleprompter application with external digital input. In this program, we use the pynput library and Blinka to simulate mouse scrolling input and buttons. It can be considered as a control interface for Tkinter scripts.
When the switch is turned on, pynput will start scrolling, allowing your teleprompter to run. You can also use two buttons to increase or decrease the scroll speed. Finally, an extra button can be used to switch between whether the teleprompter application on the Pi is full screen or window.
We can use a bash script to run two Python scripts at the same time. The Bash script is launched from the terminal using “sudo ./tele.sh”.
Wire the Raspberry Pi Teleprompter
In order to interact with the buttons to control the teleprompter on the Raspberry Pi, we used the Adafruit Perma-Proto HAT. It is a breadboard-style blank board that allows you to easily solder the circuit used with the Pi. It has power, ground and GPIO pins disconnected and marked.
The Fritzing circuit diagram will show you how to connect the three buttons and the slide switch. The two buttons on the upper left corner of Perma-Proto HAT control the speed of the teleprompter, and the one on the right switches between full screen and window mode.
This switch controls whether the teleprompter is running. In addition, the HDMI decoder board can receive ground and 5V power from Perma-Proto HAT. Otherwise, it needs to be powered by USB.
3D printed Raspberry Pi teleprompter
Three 3D printed parts are required to create the body of the teleprompter. The .STL file can be downloaded from my GitHub pageThe two larger parts snap together to form the main part of the teleprompter. There is a tripod mount and a cutout for mounting SLR lens on one side. On the other side there are mounts and cutouts for reflective acrylic, screen and Raspberry Pi.
The important thing is to print the part, or paint it in black. It needs to be dark so that you can see the reflection of the screen on the acrylic.
The third 3D printed part is the PCB mount for the HDMI decoder board, used with a 5-inch HDMI display that carries the video signal from the Raspberry Pi.
Assemble the Raspberry Pi teleprompter
After you 3D print the parts, it’s time to assemble them together.
1. Connect two M2.5 supports Two M2.5 nuts are installed in the front mounting holes of the front 3D printed part of the Raspberry Pi.
2. PCB bracket for connecting HDMI decoder A PCB with four M3 nuts and screws on the bottom of the 3D printed part.
3. USelectronic Two M2.5 supports to be connected Raspberry Pi to the installed M2.5 bracket. Pi will be installed in front of the teleprompter for easy access.
4. Put Perma-Proto HAT on the GPIO connector of Raspberry Pi with Fix it to the M2.5 bracket Use two M2.5 screws.
5. Insert the 5″ screen into the 3D printed part And cautiously Pass its flexible connector through the bottom Case. Please be careful because the connector is easily damaged. Then insert the connector into the slot on the HDMI decoder board.
6. Install HDMI decoder board Use 4 M3 screws to fix to the 3D printed PCB carrier.
7. Run HDMI cable between Raspberry Pi and HDMI decoder boardYou can use any cable, but the modular ribbon cable can keep the structure compact. However, like screen connectors, they can be fragile, so handle them carefully.
This concludes the hardware assembly of the teleprompter!
8. Cut a piece of acrylic Approximately 109 mm x 127 mm. Use a safety knife or other cutting tool recommended for acrylic to perform this operation. Then slide the acrylic into the groove on the 3D printed part.
The display settings of the Raspberry Pi teleprompter
The last step is to invert the display of the Raspberry Pi so that it is mirrored on the screen and correctly reflected on the acrylic. To do this, you will edit the /boot/config.txt file slightly.We will list the changes below, but you can also list the changes in my Sample config.txt file.
1. Open /boot/config.txt for editing.
sudo nano /boot/config.txt
2. Disable the FKMS graphics driver By placing a # symbol (for commenting out) in front of any line containing dtoverlay=vc4-kms-v3d. This is generally not recommended, but traditional graphics give you more control over flipping and inverting the display.
3. Mandatory use of 800 x 480 resolution By making sure that the “Force a specific HDMI mode” section looks like what you see below. The resolution of the screen is also forced to 800×480, because the HDMI decoder is not scaled.
# uncomment to force a specific HDMI mode (this will force VGA) hdmi_group=2 hdmi_mode=1 hdmi_mode=87 hdmi_cvt 800 480 60 6 0 0 0
4. Add the line display_rotate=0x20000 Go to the bottom of config.txt to reverse the display.
5. Save and restart your Pi.
After restarting, the display of your Pi will be mirrored but displayed correctly in acrylic, making it ready to be a teleprompter.
Use the Raspberry Pi teleprompter
You can use several different workflows on the Raspberry Pi teleprompter. You can use VNC or SSH to remotely access the Pi to load your video script and run your code, or you can still use the wireless keyboard and mouse to use the teleprompter’s display as the Pi’s monitor.
Furthermore, you can choose to run a bash script every time you start (see How to run a script when the Raspberry Pi starts). No matter how you choose to use it, you can use a compact open source teleprompter option during a video or presentation.