An Open-source Scientific RPN Calculator

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.

If RPN interests you, it’s a subject we’ve looked at in greater detail in the past.

69 thoughts on “An Open-source Scientific RPN Calculator

    1. I have been using Droid48 forever and I’m very happy with it. Back in the early 90’s, I used x48 on workstations at college and I only feel home on RPN calcs with that ley layout. It carries a lot of baggage that I don’t need anymore, so I think I’ll look into RealCalc. Thank you.

    2. Me too. I installed it to understand what is all that hype about RPN. I didn’t switch to RPM but I could totally understand why some people still appreciate it. And maybe few times to get some more demanding result. Since I switched to iPhone I kind of miss it.

    3. @Me said: “I love RealCalc on my Android phone.”

      You have to pay for RealCalc Plus which unlocks all the functions. Also some say RealCalc Plus requires an internet connection to verify the license. No Internet connection, no additional paid-for functions. Try the completely free Droid48 (HP-48G/48S) and Free42 (HP-42S) Android HP calculator emulator apps instead.

      1. Thanks for the tip. I’ve been using RealCalc for years, but the nag screen is annoying. Given I actually owned a 48SX (still do) I’m keen to give Droid48 a go!

  1. Nice job!

    I still have/use my 15C and 16C. Also at home, the 12C is present and used by my wife and I. Back in college I gave away to my sister the 11C when she entered college as I had bought the 15C. I do like RPN.

      1. Someone relieved me of my 11C in 1987. Bought a 32s to replace it. Changed the batteries in that for the 3rd time this last winter. HP sure knew how to get build them back in the day. (Meanwhile the 35s thing they brought out in, idk was it 2009? Sucks batteries flat inside of 3 months. Oh well)

  2. Swiss Micros (https://www.swissmicros.com/products) offers an excellent lineup of HP calculator clones. I bought their DM15L (clone of the HP-15C) recently and have been very happy with it. Only $129 on Amazon, though they ship from Switzerland, so it took around three weeks to receive. Not that it matters in my application, but they claim their ARM Cortex microcontroller makes the DM15L around 20 times (?) faster than the original.

      1. I have their DM42 and the DM16L which does “logic”. Basically al the things you would do in a register like shift, roll right/left, XOR, >, etc. And does math in decimal, hex, binary, and octal. I don’t use it as much as I thought but am going to do a lot of load of low level machine stuff soon and expect to use it a lot.

  3. Not sure I understand…no make that “I don’t understand at all”.
    Please explain your comment, for the benefit of a LOT of us.

    **************************************************

    This, because I’m lazy, and don’t want to write another comment:

    A while back, when class was over, I left class (of at least 40 people) AND my HP 32S in the room. After overcoming mild panic, and determining that’s where I must have left the device, I found it in that classroom, one hour later.

    If the machine had had an “=” key on it, I’d have never recovered it.

        1. Someday I’d like to know where the full what-that equivalency is used because it is not part of my particular dialect and I never ran into it much before the Internet.

    1. “If the machine had had an “=” key on it, I’d have never recovered it.”

      The very reason why no one wanted to borrow my HP-35 calculator in high school. They would hand it back in bewilderment due to the lack of ‘=’ key.

      1. Wife: Can I use your calculator?
        Me: You MAY use my calculator, but you CANNOT use my calculator.
        Wife: Just hand it over.
        Me: ….
        Wife: I can’t use this calculator.
        Me: …. …. ….

      2. That was true for me in high school with my trusty HP-15C. Then I went to engineering school and my TA asked me to lend him my calculator and I started to explain it was RPN. He cut me short with a withering stare. It was pretty much a given you’d use RPN there.

    1. RPN makes much more sense than the infix, prefix, postfix mix with random operator binding powers you never get right even between neighbours of programming languages. That usually ends with lots of parentheses just for being safe.

      Pure prefix or pure postfix makes much more sense.

      Lisp is a beauty and so is Forth!

      Everything in between them is an ugly compromise.

        1. “Except Lisp (and Smalltalk) are unintelligible to normal humans.”

          …as is APL. The only difference between choosing the power of FORTH versus that of APL? One doesn’t need a specialized keyboard in order to use FORTH.

          …and since when did this venue debase itself by catering to “normal humans”?

          1. That’s a dirty lie.
            APL is fine for normal humans, if they are introduced to it early enough.
            Like, 1979.

          2. Mention of APL causing me to flash back to uni computer lab in ’81, when it seemed the only unused terminals were those that had been left in APL mode.

    1. This is why I am down to two 11C’s. My first (bought it as a daily carry back when) eventually succumbed to key failure a few years ago. The ENTER key is worn concave, but still quite readable (I love that two-shot molding). Still have two more, one from an employer, the other given to me in the early 1990’s by a senior engineer that had moved on to his 42S and no longer used it.

      Still have (and use) the 16C I bought the first month they were out and a 12C (early 2000’s replacement. First one defunct from use and abuse), as well as my original 35 and a 35S (now my daily carry)

      Never did have a 41C, though it would have come in handy for the HP-IL when I was still using a 3468A multimeter.

  4. I love a physical calculator. I have all kinds of calculator apps on my computer and my phone, RPN and algebraic, yet it’s still faster to just grab my HP 48GX or 32S, do the calculation, and proceed.

    1. Same. If for no other reason, hex conversion. I keep one program in my 32s:
      HEX
      STOP
      DEC
      STOP
      Voila. One tap hex/dec conversion on R/S. Hex mode on 35s was garbage (if you make me do extra key presses to indicate input is hex, how ## is that he’d mode?). So the 32s stays next to the laptop. It’s more useful than the mouse.

  5. hey that’s my name, not yours :p

    Seriously though, you just say display. Nobody would understand what you mean with LC without adding the D, so it’s perfectly fine to say LCD display, even if appending “display” is technically redundant.

  6. I was heartbroken when my HP11C (acquired in 1982) died, and snapped up one of the limited edition HP15C’s that became available a few years ago. Unfortunately, in translating the firmware to the new faster core, they didn’t seem to bother with debounce, and now that it has a few years on it the keyboard has become very flaky giving 333 for one press of the 3. I am eyeing up the SwissMicros products and kind of sad that they don’t seem to have any of the credit card sized versions in stock, which would be a cool upgrade.

  7. My daughter was once engaged to an engineer. I asked her “is he an RPN guy?” (she is). She said “I don’t know I will ask him”. A while later I asked what you found out. She said he said “What’s that?” The engagement didn’t last.

  8. On a good infix calculator, like a TI89, if I realize I made a mistake in a complex calculation, or just want to change a number in it, I can press the up arrow and edit the calculation. I haven’t found a way to do this in an RPN calculator. Do the newer ones let you do that?

    1. They always have. Instead of entering the calculation in immediate mode, you enter it as a program. If there’s a problem with a value or order of operations, you can edit the program and rerun.

  9. I don’t understand why everyone reproduces the 4-layer stack XYZT. The “infinite stack” of the HP-28S was so superior. Every time one of these projects pops up I look to see if they implemented an infinite stack, and I see XYZT. But you can’t do left-to-right complex calculations without running off the top of the stack.

    1. A valid point, though analysis of Forth algorithms shows that a 16 deep stack is very rarely exceeded. The strangest stack decision I ever saw was in the Transputer where despite all the experience of HP and the RPN based parsing modules of compilers “the Transputer had only three data registers, which behaved as a stack.” though it did have external conventional stacks. The three register choice is also odd given what HP had demonstrated so well about 4 registers.

  10. I really would love to see something like this based on a ZigBee/Bluetooth SOC.

    A calculator is the perfect base for smarthome control just like phones were the perfect integration point for everything else. Simple and cheap enough to have a few laying around without worrying about charging every day or costing too much, not trying to compete with phones so they don’t need power wasting features.

    There’s a lot of miscellaneous stuff that doesn’t quite belong in a phone that could be rolled into calculators. I think walkie talkies are probably one of them, imagine FRS over ZigBee with multi-week standby battery life! Or magneting one to the fridge as a dedicated kitchen timer/barbecue thermometer receiver.

    Imagine if these had ZigBee and could be sold directly with smart bulb kits!

    The eco footprint isn’t all THAT much worse than a real calculator, so we might as well have 10 identical multi purpose gadgets in different cases, dedicated to one use, rather than 10 separate things that aren’t much cheaper, only do one thing, and are lower quality because there’s no economy of cale, and can’t be reprogrammed.

    We need the Arduino of low power handheld devices!

  11. Everyone needs a copy of “Algorithms for RPN Calculators” by Ball. There are copies on the various online libraries. A physical copy has become quite rare and expensive.

  12. I’m surprised no one has mentioned the “new” TI.

    I bought an hp48sx back in the day. Still have it. But my daughter’s school required a TI cas nspire.
    I no longer love my hp48 as much!
    Never thought I’d say that.

    I made a video on it : https://youtu.be/JUA7Z36RbsI

    It’s so much faster to enter equations and solve multivariable equations that the hp can’t even solve (hp48 needs equations given to it like
    x=f(y) &
    y= blah .

    Hp can’t solve 2 equations like
    x * y / (x + 3) = y.
    y + 6 = x/y

    But the TI CAS solves them with minimal keystrokes. (On hp48, you need to create a dir, create an equation, save it in a var, repeat, enter solver menu, enter var you want to solve for, press solve.)

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.