As the smartphone has eaten ever more of the gatgets with which we once surrounded ourselves, it’s with some sadness that we note the calculator becoming a less common sight. It’s with pleasure then that we bring you [Nekopla]’s keychain calculator, not least because it’s a little more than a conventional model. This is a calculator which uses Reverse Polish Notation, or RPN.
A full write-up in Japanese (Google Translate link) carries an impressive level of detail about the project, but in short, it takes an Arduino Pro Micro, an array of keys, and an OLED display, and packages them on a couple of fiberglass prototyping boards in a sandwich between laser-cut Perspex front and rear panels.
The RPN notation is what makes it especially interesting,a system in which where you might be used to writing 2+2= to get 4, in RPN you would write 2 2 + . It allows the use of much simpler code with a stack-based architecture than that used in a conventional calculator. It’s a system that’s usually the preserve of some pretty exclusive machines, so it’s great to see on something with more of the toy about it.
I have a confession to make. I write about a lot of projects for Hackaday, but there are very few I read about and then go actually build a copy of it. I don’t have a lot of time and I’m usually too busy building my own stuff. But once in a while, something strikes my fancy and I’ll either raid the junk box or buy the kit. The most recent case of that was the PX-41C, a replica of the classic HP-41C.
The HP-41C is a somewhat legendary reverse-polish notation calculator. I still have my original HP-41C from 1979 (a very low serial number). It is still a workhorse but at 43 years old or so, I don’t like to leave it hanging around or near anything that might damage it. It has enough wear from the daily use it received 40 years ago. Sure, I have great emulation on my phone and I use that too, but the PX-41C kit looked fun, and with all through-hole parts it would be a quick build. The black Friday sale on Tindie sealed the deal for me.
The kit arrived on the Saturday after Thanksgiving, I decided to tackle it while waiting for some 3D prints. The components were all nicely bagged and marked. Tearing into the bags was a bit frustrating, but not hard and it did keep everything separate. There was a bill of materials, but — I thought — no instructions. Turns out the last part of the bill of materials is a link to some instructions. They aren’t much and I didn’t realize they were until after completing the board, but it isn’t hard to figure out. All the parts are marked on the silkscreen and you can probably figure it out — with a few caveats.
Why reach for a bland, commercially available calculator when you be using a model that employs RPN (Reverse Polish Notation) in its calculations and be a custom build all at the same time? The kids may have colour TFTs and graphing functions, but your keyboard has no equals sign, and that means something.
Unfortunately for RPN enthusiasts, the RPN calculator is a little on the rare side. Since classic models from the 1970s and ’80s are rather pricey, [Anton Poluektov]’s just build his own called the OpenCalc. This glorious specimen is an open hardware RPN calculator with more than a nod to the venerable Hewlett Packard HP42 in its design.
At its heart is an STM32L476 low-power ARM processor and a Sharp Memory LCD, all on a PCB clad in a 3D-printed case you’d have been proud to own in the 1980s. It runs from a CR2032 which is more than can be said for some modern styles of calculator, and it gives the user everything you could wish for in a scientific calculator. The key legends are a set of printable stickers, which when printed on self-adhesive laser film prove durable enough to last. All the resources can be found in a GitHub repository, so if RPN is your thing there’s nothing to stop you building one for yourself.
While most people are satisfied with a calculator application on their smartphone these days, there’s still something to be said for the old fashioned desk calculator. Maybe it’s the fact the batteries last long enough that you can’t remember the last time you changed them, or the feel of physical buttons under your fingers. It could even be the fact that it keeps your expensive smartphone from needing to sit out on the workbench. Whatever the reason, it’s not uncommon to see a real-life calculator (or two) wherever solder smoke tends to congregate.
Which is precisely the idea behind this DIY calculator kit. Available from the usual overseas retailers for about $15 USD, it has some hobbyist-oriented features such as the ability to decode resistor color bands, convert hexadecimal numbers, and calculate resistor values for driving LEDs. If you’re going to keep a knock-around calculator on your bench, why not build the thing yourself?
Given the dual nature of this product, a DIY electronics kit and a functional desk calculator for electronic hobbyists, it seems only appropriate to review both aspects of it individually. Which is good, since there may be more to this product than just the sum of its parts.
The open source code behind the calculator is the Nonpareil High-Fidelity Calculator Simulator, and [Chris] has used it along with a custom designed readout and PCBs to create a working prototype. The simulator uses the original byte code of the HP-41 so the its behavior is exactly the same as the original calculator.
[Chris] has designed the PCBs so that the buttons and the screen are separate and join together. This neat idea means that he can try out different screens or different button PCBs and mix-and-match to find the combination that works best. He’s also designed a 3D printed case for the calculator. He does prefer using the bare buttons on the board to the 3D printed ones he printed for use with the case.
The best rummage sale purchase I ever made was a piece of hardware that used Reverse Polish Notation. I know what you’re thinking… RPN sounds like a sales gimmick and I got taken for a fool. But I assure you it’s not only real, but a true gem in the evolution of computing.
Sometime in the 1980s when I was a spotty teen, I picked up a calculator at a rummage sale. Protected by a smart plastic case, it was a pretty good condition Sinclair Scientific that turned out when I got it home to have 1975 date codes on its chips, and since anything with a Sinclair badge was worth having it became mine for a trifling amount of money. It had a set of corroded batteries that had damaged one of its terminals, but with the application of a bit of copper strip I had a working calculator.
And what a calculator! It didn’t have many buttons at a time when you judged how cool a scientific calculator was by the prolific nature of its keyboard. This one looked more akin to a run-of-the-mill arithmetic calculator, but had button modes for trigonometric functions and oddly an enter key rather than an equals sign. The handy sticker inside the case explained the mystery, this machine used so-called Reverse Polish Notation, or RPN. It spent several years on my bench before being reverently placed in a storage box of Sinclair curios which I’ve spent half a day turning the house over to find as I write this article.
What does a hacker do when he or she wants something but can’t afford it? They hack one together, of course. Or, in the case of [Ramón Calvo], they thoughtfully plan and prototype. [Ramón Calvo] wanted a scientific calculator, but couldn’t afford one, so he designed and built one himself.
[Ramón] started off with Arduino but upgraded initially to Freescale’s Freedom KL25Z development board upgraded to an ARM Cortex-M0+ programmed using mbed. The display is an Electronic Assembly DOGL-128 128×64 pixel LCD. [Ramón] did a couple of iterations on the PCB, going from a large DIY one in order for the Arduino version to work, to the current, smaller version for the ARM chip with hand soldered SMD components. After that, [Ramón] looked into the algorithms needed to parse mathematical input. He settled on the shunting-yard algorithm, which converts the input into Reverse Polish Notation (RPN), which is easier for the software to work with.
[Ramón] has a ton of features working, including your standard add, subtract, multiply and divide operations, square root, nth root and exponentiation, trigonometry, log and log10, and factorial(!) There are a few things still on the to-do list, such as low power and a graphing mode, and there are a couple of bugs still in the system, but the overall system is up and running. [Ramón] has put up the schematic and KiCAD files up on his Hackaday.io project page along with the bill of materials.