Skip to content

esemv07/Calculate-Scientific-Game-Calc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2d8b995 · · Jul 13, 2026

History

39 Commits
Jul 13, 2026
Jul 13, 2026
Jul 13, 2026
Jul 13, 2026
Jul 13, 2026

Repository files navigation

Calculate-Scientific-Game-Calc

Project Progress Checklist

  • Electronic Design
    • Schematic
    • PCB
      • Wiring
      • Mounting Holes
  • Case Design
    • Top Lid
    • Mounting
    • Bottom Case
    • Decoration
    • Buttons
    • Button Labels
  • Firmware
    • Button Scanning
    • Button Presses
    • Evaluation
      • Separating order of operations to tokens
      • Ordering tokens as RPN
      • Evaluating each operation in correct order
    • Screen Display - to be tuned further once actual parts have arrived
    • Games - to be made with actual parts

Images

Schematic

Screenshot 2026-07-08 at 12 59 47 PM

PCB

Note

Diodes have been move to bottom layer to allow room for buttons in the case

Screenshot 2026-07-08 at 1 00 05 PM Screenshot 2026-07-13 at 4 31 10 PM Screenshot 2026-07-13 at 4 31 30 PM

Case

Screenshot 2026-07-11 at 10 00 24 AM Screenshot 2026-07-11 at 10 00 58 AM Screenshot 2026-07-11 at 5 45 59 PM

Firmware

Overview

This is also in the top of the firmware file - it was just the flow of my thoughts and planning so is not perfectly polished

-- PROJECT FLOW --

setup:
- setup IO expander
- setup screen
- display initial screen

loop: 
- check for button press
- draw display - could probably leave this out of loop because it reloads on every input

check for button press:
- check whether shifted
- return row + column with shifted/normal key

HANDLE KEY PRESS
Types of key presses:
- Input keys
  - number (0-9)
  - in-built operation (+ - / * ^)
  - special operation (! sqrt otherroot x10^ %)
  - trig function (sin cos tan asin acos atan)
  - other function (log ln Abs nPr nCr)
  - constants (Pi Euler Ans)
  - other inputs ('(' ')' ',' '.')
- Control keys
  - other (Mode Game Shift)
  - deletion (AC DEL)
  - equals (= S<=>D Deg/Min/Sec)
  - direction (UP DOWN LEFT RIGHT)

Flow:
if input key : append to expression

if control key : check - 'can control be executed before evaluation'
  if yes : execute
  if no : continue


EVALUATION
- separate expression into order of operations
  1. brackets
  2. functions
  3. exponents
  4. operations (* /)
  5. operations (+ -)
- evaluate in separated parts
- return ans
- store ans as Ans
- draw display

Flow:
- convert expression to tokens
- turn into RPN
- evaluate RPN
- store Ans
- return ans to display
splay
N
- evaluate RPN
- store Ans
- return ans to display

Interesting Wikipedia page about calculator input methods which I used to learn about RPN methods.

Image

Screenshot 2026-07-10 at 6 27 17 PM

BOM

See BOM.md

Item Price per Unit Unit Size No. of Units Total Price Link
Tactile Buttons (SHOU HAN TS4555CJ 250gf 009) $0.43 50pcs 1 $0.43 https://www.lcsc.com/product-detail/C5359335.html
Arduino Pro Mini 3.3v 8MHz $13.51 1pcs 1 $13.51 https://core-electronics.com.au/arduino-pro-mini-328-3-3v-8mhz.html
0.96" IPS LCD Display Module 80X160 $3.25 1pcs 1 $3.25 https://www.aliexpress.com/item/1005001617019927.html
MT3608 $1.00 1pcs 1 $1.00 https://www.aliexpress.com/item/1005010575920726.html
2 AAA Battery Holder $1.00 1pcs 1 $1.00 https://www.aliexpress.com/item/1005012118979890.html
IO Expander MICROCHIP MCP23017-E/SO $1.96 1pcs 1 $1.96 https://www.lcsc.com/product-detail/C47023.html
Sideways Slide Switch MSS-102568-14A-90-D $1.03 1pcs 1 $1.03 https://www.digikey.com.au/en/products/detail/same-sky-formerly-cui-devices/MSS-102568-14A-90-D/13978973
1N4148 Diode $1.00 100pcs 1 $1.00 https://www.aliexpress.com/item/1005008577093447.html
4.7kΩ Resistor VO CR1/4W-4K7±5%-OT26 $0.53 100pcs 1 $0.53 https://www.lcsc.com/product-detail/C2896831.html
M3 x 3 x 4 Heatset Inserts $2.77 50pcs 1 $2.77 https://www.aliexpress.com/item/1005010664773135.html

Estimated Total Price ($USD) = $26.48 + PCB Cost ($12.60) = $39.08

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

No packages published

Languages