OPENRPNCALC: CUSTOM SCIENTIFIC RPN CALCULATOR BASED ON STM32

Summary of OPENRPNCALC: CUSTOM SCIENTIFIC RPN CALCULATOR BASED ON STM32


Anton Poluektov released an open-source scientific Reverse Polish Notation (RPN) calculator built around an STM32L476RG microcontroller. It uses a Sharp 400×240 monochrome Memory LCD, Panasonic light-touch tactile switches, and runs from a 3V CR2032 battery for about a year. Firmware targets practical, non-HP-programmable features, including a 4-element RPN stack, double-precision math, standard scientific functions plus erf and erfinv, multiple display modes (FIX/SCI/ENG with SI prefixes), uncertainty propagation (UNCERT), and very low standby current (40–50 µA).

Parts used in the OpenRPNCalc:

  • STM32L476RG microcontroller (ARM Cortex-M4, up to 80 MHz, 1MB Flash, 128kB SRAM)
  • Sharp LS027B7DH01 400×240 pixel monochrome Memory LCD
  • Panasonic light-touch tactile switches (keyboard)
  • 3V CR2032 lithium coin battery
  • Supporting PCB and circuitry (power management and connectors)

Reverse Polish Notation (RPN) is a popular method for representing mathematical expressions. In this notation, the operator symbol comes after the operands in contrast to the Polish notation, where the operators are placed preceding the operands. For example, the Polish notation for the addition of 2 and 5 is 2+5, while in reverse Polish notation, it is represented as 2 5 +. RPN is suited for lengthy calculations, and this notation leads to faster calculations. This is because the RPN calculators do not need expressions to be parenthesized. Therefore, to perform a typical calculation, fewer operations need to be performed. In addition, the RPN calculator users make fewer mistakes than the other type of calculator users.

Anton Poluektov, a Physicist from France, recently posted his custom open-source scientific RPN calculator. It is based on an STM32 microcontroller and can operate on a 3V CR2032 lithium battery for around a year. Anton says that the hardware is inspired by the SwissMicros DM42 calculator, but it has been designed from scratch. He further adds to it,

“Firmware-wise, however, there is no intention to simulate programmable HP series. Instead, I aim to create a device that fits my everyday needs at work, with a preprogrammed set of functions that are, possibly, rarely or never available in the commercial calculators.”

The device has an STM32L476RG ultra-low-power microcontroller. The microcontroller consists of a high-performance ARM Cortex-M4 32-bit RISC core operating at a frequency of up to 80 MHz. The STM32 microcontroller features high-speed memories (1MB flash memory and 128kB of SRAM) and an integrated LCD driver making it suitable for usage in calculators. The display is the Sharp 400×240 pixel monochrome LS027B7DH01 Memory LCD module. It is a TFT-type display with high longevity. The keyboard uses light-touch tactile switches from Panasonic, and the device runs from the 3V CR2032 lithium battery like most modern calculators. Anton mentions that it is sufficient to provide power to the calculator for around one year of operation.

The calculator includes the following features:

  • Reverse Polish notation with 4-element stack.
  • Double-precision arithmetic operations.
  • “Standard” scientific calculator functions (trigonometric, logarithms, exponentiation, square root, and power).
  • Error function (erf) and its inverse (erfinv).
  • Fixed, scientific (SCI), and engineering (ENG) display modes (including SI prefixes in ENG mode), variable 3-10 digits precision.
  • Calculations with uncertainties using error-propagation formulas (UNCERT mode). This is one of the unique features of the OpenRPNCalc which is very rarely present in firmware-based calculators.
  • Low power consumption (40-50 uA in standby mode with LCD on).

Read more: OPENRPNCALC: CUSTOM SCIENTIFIC RPN CALCULATOR BASED ON STM32

Quick Solutions to Questions related to OpenRPNCalc:

  • What microcontroller is used in the OpenRPNCalc?
    The device uses an STM32L476RG microcontroller with an ARM Cortex-M4 core.
  • What type of display does the calculator use?
    It uses a Sharp 400×240 pixel monochrome LS027B7DH01 Memory LCD module.
  • How long does the CR2032 battery last?
    Anton reports the CR2032 battery can power the calculator for around one year.
  • Does the firmware aim to emulate HP programmable calculators?
    No, the firmware intentionally does not aim to simulate programmable HP series and instead targets practical everyday functions.
  • What numerical precision does the calculator support?
    It supports double-precision arithmetic operations.
  • Does the calculator support uncertainty calculations?
    Yes, it supports calculations with uncertainties using error-propagation formulas (UNCERT mode).
  • What scientific functions are included?
    Standard scientific functions (trigonometric, logarithms, exponentiation, square root, power) plus error function erf and its inverse erfinv are included.
  • What display modes are available?
    Fixed, scientific (SCI), and engineering (ENG) display modes are available, with SI prefixes in ENG mode and variable 3–10 digits precision.
  • Is the calculator low power?
    Yes, it has low power consumption around 40–50 µA in standby with the LCD on.

About The Author

Muhammad Bilal

I am a highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.

Scroll to Top