

Calculator
A homemade birthday gift for an economist: a calculator that understands the maths but makes questionable economic forecasts. It has a round colour display, physical keys, and a habit of treating uncertainty as an opportunity.
- Size
- 26.8 × 19.5 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 14
- Nets
- 23
- Pads
- 57
- Tracks, vias
- 135, 4
- Routed
- Yes
- KiCad
- KiCad 10.0 (file 20260206)
- Created
- 10 Oct 2026
- Updated
- 10 Oct 2026
Overview
Calculator is an open-source printed circuit board by yamarus, from the yamarus/Joke-Calculator repository on GitHub. It is a 2-layer board of 26.8 × 19.5 mm with 14 parts on 23 nets, routed with 135 tracks and 4 vias.
It is built around the AO3401A. Its parts include 6 connectors, 3 capacitors, 3 resistors, 1 IC and 1 transistor. It belongs with the lEDs and displays boards and the RISC-V boards of this library.
Main components
1README
README.mdJoke Calculator for an Economist
A homemade birthday gift for an economist: a calculator that understands the maths but makes questionable economic forecasts. It has a round colour display, physical keys, and a habit of treating uncertainty as an opportunity.
I started just five days before the birthday, so I used off-the-shelf components and made the board and enclosure at home. The firmware was vibe-coded with ChatGPT, then tested on the device.
What it does
- Normal: a scientific calculator with fractions, powers, roots, logarithms, trig, DEG/RAD and Ans.
- Uncertainty: enter a value with its standard uncertainty, such as
100 ± 3. The calculator propagates independent uncertainties using first-order derivatives. - Economics: ordinary input. Values receive artificial, random uncertainties → the expression propagates them → the result becomes a slightly unreliable economic estimate.
The economic estimate shifts by a multiple of sigma. Its absurdity score depends on uncertainty relative to the result, cancellation, risky division and nonlinear growth. More uncertainty gives the calculator more room to misbehave. Input assumptions stay stable within a session; repeated = can revise the presentation.
Three personalities share that machinery: Economist cautiously estimates; TV Expert becomes more confident as the evidence gets worse; Referee 2 finds methodological objections. Settings control idle shutdown, displayed digits and notation, and survive reboot.
Controls: MODE cycles Normal → Economics → Uncertainty → Settings. FN activates the secondary legends for one keypress; left/right move between expression fields, and FN + = advances to the next field. In Uncertainty mode, ± enters sigma; in Normal and Economics it changes the sign. AC clears, DEL edits, and repeated = in Economics revisits the same model with a fresh interpretation.
Some examples of what might happen:
Usually Economics mode simply produces a plausible estimate with uncertainty, without an extra joke. Here, 48/6 becomes 7.921 ± 0.4328:

| Unreliable growth forecast | An imaginary economic precedent |
|---|---|
![]() | ![]() |
1.08^18: TV Expert may hide the uncertainty and insist it is VERY CLEAR. | sqrt(-1): 2002 Ig Nobel got there first. No complex arithmetic, just a purple i. |
| A denominator nobody should trust | Excellent use of equipment |
|---|---|
![]() | ![]() |
1/(1000-999): strong cancellation can make the denominator statistically compatible with zero and invite a Black Swan. | 80085: Very mature. The exact-number banner is intentional. |
These screenshots illustrate possible responses; probabilistic events do not appear every time. More examples and their trigger conditions are in the PDF gallery. ECON's random function also returns exactly 1 ± 0.
Electronics and homemade PCB
The design is deliberately minimal: a CH32V006F8P7, a GC9A01 240×240 SPI LCD, a battery, an AliExpress battery charging/protection board, and a handful of passive components plus an LCD power switch. The keyboard is a 6×5 switch matrix. No framebuffer is needed.
The PCB was made at home: laser-print the pattern on glossy paper, iron the toner onto copper-clad board, then etch it using hair-bleach developer. The MCU was reflow-soldered on a frying pan; the remaining components were soldered by hand. These photos document the build, rather than a chemical or temperature recipe.
| Etched board | MCU soldered | Remaining components |
|---|---|---|
![]() | ![]() | ![]() |
The KiCad schematic and PCB are included. The schematic uses a CH32V003FxPx symbol, while this firmware targets CH32V006F8P7; check that distinction when reproducing the board.
| Connection | MCU pin(s) |
|---|---|
| LCD SCK / MOSI / DC | PC5 / PC6 / PC7 |
| LCD power, active low | PD4 |
| Keyboard rows | PD6, PA1, PC0, PD0, PA2, PC1 |
| Keyboard columns | PC2, PC3, PC4, PD2, PD3 |
| Power button, active low | PD5 |
LCD CS/RST are not connected. A short power-button press enters standby; the next press wakes it. Holding the button for about two seconds resets the MCU through its interrupt handler, even if the main loop hangs.
Case and buttons
Printed on a Bambu Lab A1 mini with a single filament at a time. The colours came from manually changing filament after the first four layers, rather than using a multicolour attachment.
The first button printed after a filament change tended to have a defect. Print at least two buttons on the bed and use one as a sacrificial purge piece; keep the good one.
The 3MF project is included.
Build and flash
Use the WCH RISC-V GCC12 toolchain supplied with MounRiver Studio. The build uses WCH's rv32ec_zmmul_xw ISA and ilp32e ABI; a generic RISC-V compiler is not interchangeable.
make WCH_BIN="/path/to/WCH/GCC12/bin"
make size WCH_BIN="/path/to/WCH/GCC12/bin"Outputs are build/calculator.bin, .hex and .elf. If the WCH tools are on PATH, plain make works. I programmed the MCU using Ardulink on an Arduino Nano board. The supplied flashing script uses minichlink with your programmer's serial port:
./flash.sh build/calculator.bin /dev/your-programmer-portThe firmware uses about 61.7 KiB of flash and 1.9 KiB of static RAM, plus a 3 KiB reserved stack. The last 256-byte flash page stores settings. Flash space is almost full; toolchain changes can affect whether the build fits.
User/ contains the application; Core/, Debug/, Startup/ and Peripheral/ supply the required WCH support. Only used peripheral driver implementations are included. Generated font data is supplied, so building needs no font-generation tools.
WCH files retain their original copyright and usage notices. The DejaVu font notice is in licenses/LICENSE_DEJAVU. No additional license for the original project files has been selected yet.
Parts
14| Qty | Value | Footprint | References |
|---|---|---|---|
| 3 | Conn_01x02 | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J2, J3, J4 |
| 2 | Conn_01x05 | Connector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_Vertical | J1, J5 |
| 1 | 1.8k | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R3 |
| 1 | 100nF | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C2 |
| 1 | 10uF | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C3 |
| 1 | 2.2uF | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C1 |
| 1 | 43k | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R2 |
| 1 | 82 | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R1 |
| 1 | AO3401A | Package_TO_SOT_SMD:SOT-23 | Q1 |
| 1 | CH32V003FxPx | Package_SO:TSSOP-20_4.4x6.5mm_P0.65mm | U1 |
| 1 | Conn_01x06 | Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical | J6 |
Similar boards
- 2 layers192.2 × 150.5 mm

- 4 layers102.9 × 96.7 mm

PicoGUS chipdown
polpo/picogus
Emulation of ISA sound cards and CD-ROM on Raspberry Pi Pico (GUS, SB/Adlib, MPU-401, Tandy, CMS, Panasonic CD-ROM) with USB mouse/joystick support
99 parts805 - 6 layers237.9 × 80.5 mm

XG Mobile Dock
osy/XG_Mobile_Station
Open source eGPU dock for ROG Ally and ROG Flow
300 parts712CC-BY-4.0 - 2 layers60 × 111.3 mm

Silkscreen pcb
iandchasse/silkscreen-pcb
Silkscreen: open-hardware ESP32-S3 e-paper reader mainboard (KiCad 9). Formerly the de-link hub.
189 parts589CERN-OHL-S-2.0 - 2 layers89.2 × 82.6 mm

Desktop 50 Pin TopConn
BlueSCSI/BlueSCSI-v2
BlueSCSI v2/Ultra - an open source, open hardware, SCSI emulator using the Pi Pico PR2040 and Pico 2 RP2350
108 parts459GPL-3.0 - 4 layers55 × 55 mm

RBoard
pms67/LittleBrain-STM32F4-Sensorboard
STM32F4-based PCB interfacing with a variety of sensors.
90 parts339 - 6 layers55 × 95 mm

- 4 layers243.8 × 171.5 mm

Questions
How big is the Calculator PCB?
It measures 26.8 × 19.5 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Calculator use?
14 parts, built around the AO3401A. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Calculator KiCad files?
From the yamarus/Joke-Calculator repository on GitHub, at the commit this page was made from: the board is kicad/calculator.kicad_pcb and its schematic kicad/calculator.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Calculator design in my own project?
Its repository states no licence, so its author keeps all rights: ask yamarus before reusing the design.






