Close

Initial notes

A project log for RPNCalc

A calculator which uses RPN instead of infix notation

raphael.treccanichinelliraphael.treccanichinelli 04/15/2019 at 21:090 Comments

Introduction

I'm making this project log a little late. I decided that none of the calculators i use regularly (FX-83GT, NatSciCalc for android, and Windows calculator) did everything i wanted from a calculator, and i found myself reaching for a notebook to write my calculations out by hand. 

It's difficult to think of everything you'd like from a calculator in one go, so the first specification is that it must be reprogrammable, and easily so at that. I wanted to use RPN (Reverse Polish Notation), as it can make you faster and less prone to errors, as well as allowing you to easily use lots of memory variables temporarily. With these two specifications in mind i started to hash out a design.

Component selection

Initially, i decided on a rough estimate of the number of buttons I needed. I used an FX-83GT calculator, counted how many buttons i used regularly, and then added a couple buttons for redundancy. That said, i wanted every button to have two purposes, activated by a 'Mod' key that toggled in a second feature set. I arrived at 25 buttons, for up to 48 functions. 

With this in mind, i knew i needed at least 10 IO pins. 5 row drivers, 5 column drivers.

I was initially drawn to the Atmega328p, the trusty tool of any DIY and hobbyist electronics engineer. I also briefly considered the ESP32, another system i am familiar with, and whilst i decided against it for now, due to the difficulty in hardware layout and the slightly less developed and more fragmented toolchain, i may well come back to it if i find the Atmega running out of processing steam.

As an aside, it may seem sort of blasé to use the most mundane, generic IC on the planet as my MCU, but it's important that this calculator is reprogrammable, and there's arguably no easier chipset to layout and program than the Atmega328. Besides this, I think it will have the necessary capability to drive this calculator. 

With that out of the way, I needed to select a screen. I originally wanted to use the HP 6064 bubble display, maybe 2 or 3 of, but decided this wouldn't provide enough visual feedback, and would offer limited options for reprogramming. I also researched e-ink displays and found the refresh rate was severely worse than I anticipated.

I began scouring Amazon and farnell. for an individual engineer, it was desirable to find a screen with a daughter PCB and headers to allow easy integration into the device, at least initially. Maybe going forward I would switch to a bare mounted OLED on the main PCB. I didnt have too many constraints on the OLED itself, and indeed it became the driving factor for the size of the device, which I was happy about.

I found this 1.5" 128*128 OLED, and decided it hit all the marks. I especially liked that it had standoffs that would allow me to mount it safely on the main PCB. It runs on 4 wire SPI, so i only need the extra 4 wires on the Atmega328.

That's all for now, I'll update soon with the more detailed component selection and the schematic capture!

Discussions