Skip to the content
2 layers26.8 × 19.5 mmCalculator, the printed circuit board in 3D

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

1

README

README.md

Joke 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.

Finished calculator running Economics mode

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:

Ordinary Economist result: 48 divided by 6 gives 7.921 plus or minus 0.4328

Unreliable growth forecastAn imaginary economic precedent
TV Expert: VERY CLEARImaginary economics: 2002 Ig Nobel got there first
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 trustExcellent use of equipment
Black Swan: Not in the model80085: Very mature
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 boardMCU solderedRemaining components
Home-etched PCBMCU soldered to the PCBHand-soldered 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.

ConnectionMCU pin(s)
LCD SCK / MOSI / DCPC5 / PC6 / PC7
LCD power, active lowPD4
Keyboard rowsPD6, PA1, PC0, PD0, PA2, PC1
Keyboard columnsPC2, PC3, PC4, PD2, PD3
Power button, active lowPD5

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.

CAD model of the calculator enclosure and buttons

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.

sh
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:

sh
./flash.sh build/calculator.bin /dev/your-programmer-port

The 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
QtyValueFootprintReferences
3Conn_01x02Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ2, J3, J4
2Conn_01x05Connector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_VerticalJ1, J5
11.8kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR3
1100nFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC2
110uFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC3
12.2uFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC1
143kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR2
182Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR1
1AO3401APackage_TO_SOT_SMD:SOT-23Q1
1CH32V003FxPxPackage_SO:TSSOP-20_4.4x6.5mm_P0.65mmU1
1Conn_01x06Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ6

Similar boards

  • 2 layers192.2 × 150.5 mmDjinn, the printed circuit board in 3D

    Djinn

    tzarc/keyboards

    @tzarc's custom keyboard designs.

    292 parts993CERN-OHL-S-2.0
  • 4 layers102.9 × 96.7 mmPicoGUS chipdown, the printed circuit board in 3D

    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 mmXG Mobile Dock, the printed circuit board in 3D

    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 mmSilkscreen pcb, the printed circuit board in 3D

    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 mmDesktop 50 Pin TopConn, the printed circuit board in 3D

    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 mmRBoard, the printed circuit board in 3D

    RBoard

    pms67/LittleBrain-STM32F4-Sensorboard

    STM32F4-based PCB interfacing with a variety of sensors.

    90 parts339
  • 6 layers55 × 95 mmEcho r1-rev1, the printed circuit board in 3D

    Echo r1-rev1

    amachronic/echoplayer

    Echo - Open Hardware Music Player

    154 parts281CERN-OHL-S-2.0
  • 4 layers243.8 × 171.5 mmNeotron Pico, the printed circuit board in 3D

    Neotron Pico

    Neotron-Compute/Neotron-Pico

    A Neotron powered by the Raspberry Pi Pico

    242 parts250

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.