Making a custom typewriter keyboard

Making a custom typewriter keyboard

If you at all know me, then you know of my love for old technologies and retro aesthetics. Up till now, this passion has been limited mostly to musical devices such as cassette- and record-players. However, I have wanted to retrofit a typewriter to send keystrokes to my laptop for a while now. When I saw this post, I learned of a simple way to make such a project and I decided to make my own typewriter keyboard, which is the very device I am writing this post on.

Just like the post linked above, my typewriter uses a softpot potentiometer to detect the keystrokes. This sensor sits against the “space bar” which each key pushes against to advance the carriage.

softpot against spacebar

This little sensor then connects to an Arduino micro which sends the relevant keystrokes to my laptop over usb.


I also have three magnetic switchers to detect the spacebar, carriage return and shift key.

spacebar sensor

Though at the moment, I only have the spacebar switch connected.

The beautiful thing about this method is that the machine still works as a mechanical typewriter, thus allowing me to keep paper copies of all my blogposts. Nearly all the writing and electronics are hidden under the keyguard, so it even looks like a “normal” typewriter.


The Arduino runs my custom code which divides the softpot into 333 equal sections. Each section can be mapped to a key using a calibration string which looks like this: 111qqqaa222zzzww… The above string in indicates that the first three sections belong to the character 1, the next three belong to q, etc. This allows for some slight variability in where exactly the key hits the softpot. When the shift switch is active, this sting is replaced with something resembling this: ~~~QQQAA"""ZZZWW…

The calibration string is doubtlessly the most finicky part of this whole project. The data from the softpot is affected by the exact resistance of the wires as well as the precise input voltage from the usb, which results in keys shifting over one position at times. During the writing of this post in particular, the “s” key was mapped to the character “3”, leading to quite a bit of frustration. I plan to add a small potentiometer dial to adjust the calibration slightly, which would mediate this problem, but that is a project for another day.

For now, I would recommend any fellow tinkerers to try such a project for yourself. I learned a lot about typewriters in the process, and the end result is a lot of fun. You should not however expect it to be easy. The entire project took me three eight-hour days, and I am still working out some kinks. I was lucky that my typewriter had an easily accessible space bar, which greatly facilitated testing and my experience with soldering and (Arduino) programming also certainly helped.