When it comes to exploring the potential of your creative imagination, the Raspberry Pi is a great addition to your creative toolkit. Consider pushing your creative limits with projects like building a toy cabinet, photographing space exploration, or bringing old technology to life.
A recent graduate has been inspired to tackle a unique project using an electronic typewriter as a Linux terminal display, with the help of a Raspberry Pi computer. Let’s take a look at why he decided to take on this project, along with the tools and techniques used to help him along the way.
Learning from others
Having recently earned a degree in mechanical engineering, Riley is no stranger to electronics. Prefers to work on projects where he designs solutions around moving parts. The combination of his dream of creating his own mechanical keyboard and his love of moving parts makes this a perfect project for him.
The idea is initially attributed to a high school friend. Together they built a computer with a Z80 CPU and were planning to get an old typewriter, the Smith Corona PWP D350, to use as a keyboard and case. Unfortunately, the keyboard parts were now gathering dust six years ago.
YouTube creator CuriousMarc used Teletype as a Linux terminal, reigniting Riley’s ambition to try again.
This project is a great way to understand how moving parts work and how technology communicates together.
Components of the project
Here’s what you’ll need to recreate this project at home:
- Brother AX-25 (or similar typewriter)
- the board
- Raspberry Pi (running Raspberry Pi OS Lite)
- USB keyboard
- Arduino one
- Code: Arduino programming language
- voltage dividers
- Various cables and connectors
Research and preparation
A major hurdle has been understanding how a typewriter interprets foreign keystrokes. This was resolved by manually selecting each pin attached to the typewriter cable and then creating a spreadsheet to keep it straight. Each key is assigned a number between 0 and 87 to facilitate programming.
Multiplexers are used to connect inputs and outputs without the need for a lot of additional cables or connections. For example, you can reduce the number of pins used when working with multiple sensors or actuators.
In relation to a typewriter, multiplexers are used to connect several input pins to a single output pin. When you change the selected pins, you can then choose which input is connected to the output.
To ensure accuracy between components, an 8×11 matrix was required to properly understand how to set typewriter traces. You can watch this manual discovery happen on Riley’s YouTube channel linked at the end of this guide.
Based on Riley’s research, the cascade wheel typewriter mechanism works well with an Arduino. To learn more about this microcontroller, check out our guide on Explore the different types of Arduino for details. Why did he end up using the Brother AX-25? This is the first typewriter he’s found fit his criteria.
In the photo above, a long, rectangular board connects the different technologies together. This is called a breadboard. The main purpose of this board is to simplify electronic circuits. Check out our guide on How does the board work for details.
With a USB keyboard connected to the Raspberry Pi, you can then send commands to the typewriter via the Arduino microcontroller. For a deeper understanding of terminal functionality, check out our guide to Linux Command History.
The Raspberry Pi runs the Raspberry Pi Lite OS which meets the needs of this project very well. This is because the typewriter displays simple functions through a TTY (or teletype) terminal.
Riley acknowledges the possibility of removing the Arduino from this equation. Troubleshooting any issues while the multiplexer is passing Raspberry Pi commands to the typewriter is more efficient because it has extensive knowledge of this microcontroller. Instead, a new Linux driver needs to be created to replace the Arduino. This is not something in this builder’s plans at the moment.
He also considered removing the Raspberry Pi and adding a serial port connection between the Arduino and the typewriter. Although he was excited to share that this could mean the typewriter would feel like a true teletyping machine, he chose to keep the general flow of components for now.
Choosing to program using the Arduino programming language due to his experience using the Arduino for a big design project at school. This experiment came in handy a few times especially when there was a small issue when trying to tell the typewriter to press two green (function) keys at the same time.
The timing issue was eventually resolved by telling the Arduino to press two keys that were too close to each other. This actually tricked the typewriter into thinking two keys were pressed together and enabled the use of the green (functional) keys after all.
Regarding the power difference considerations between the Arduino and Raspberry Pi, the voltage dividers used in this project reduce the 5V power output from the Arduino to the 3.3V power output from the Pi Zero W.
What does the future hold?
Riley recently shared a live stream on his YouTube channel of real-time PCB design. Not sure what a PCB is? Check out our guide on printed circuit boards. If you’re not interested in sitting around for six hours of live content (describing the design in detail), consider skipping the video to the section that works for you.
When the schematics are completed, plan to send the PCB design to the manufacturer. When the PCB is completed and received at home, Riley shared that he is excited to take the final product for testing in the real world one day soon.
Would you try this project for yourself?
Since you now understand the required components and how they are put together, you can also review the code online. You are welcome to view Riley Open Source Github repository for serial typewriter. While you’re there, read a great explanation in the README file outlining a circuit diagram to help you wire all the components together.
If you find yourself needing a helping hand, consult Riley YouTube channel Artillect, for details. You’ll also find that it includes other ways to connect with him as well.
Have fun giving your electronic typewriter new life as a Linux terminal!
#Reviving #Typewriter #Raspberry #Arduino