Mechanical · Volume 10

Cheatsheet & Glossary

The laminate-ready synthesis — every formula, microstep table, BOM, pinout, and serial command for the three collected builds on one foldable reference, plus an A–Z of terms

This is the volume you print, laminate, and keep on the bench. It carries no new argument — everything here is derived and explained across Vols 1–9 — but it pulls the numbers that actually slow you down mid-build into a single dense reference: the gear and stepper formulas, the TMC2208 microstep table, the three builds’ bills of materials, the IC pinouts, the tuning-fork serial protocol, where every source file lives, and an A–Z glossary. Tables are the heart of it; where a formula appears it carries its units, and a worked example follows. Cross-references point back to the volume that derives the result.

10.1 Formulas at a glance

10.1.1 Gear and reduction math (derived in Vol 3)

Table 1 — 10.1.1 Gear and reduction math (derived in Vol 3)

QuantityFormulaUnitsNotes
Modulem = d / Nmm/toothd = pitch diameter, N = tooth count
Pitch diameterd = m · Nmminverse of the above
Center distanceC = m (N₁ + N₂) / 2mmtwo meshing external gears, equal module
Simple ratioi = N_driven / N_driver>1 is a reduction (output slower)
Belt/pulley ratioi = T_driven / T_driverGT2 60T/20T → 60/20 = 3:1
Planetary, ring fixedi = 1 + N_ring / N_suninput = sun, output = carrier
Planetary, carrier fixedi = −N_ring / N_sunsun→ring, sign = reversal

Clock reductions every movement hides: the minute hand turns at 1 rev/hour and the hour hand at 1 rev/12 h, so the hour:minute reduction is 12:1; the second hand turns at 1 rev/minute, so the minute:second reduction is 60:1 (Vol 3 §3.2).

Worked — center distance, sun + planet, m = 1 mm: with a 30T sun and a 15T planet, C = 1 mm × (30 + 15) / 2 = 22.5 mm between shaft centers.

Worked — planetary ratio: ring fixed, N_ring = 60, N_sun = 20 → i = 1 + 60/20 = 4:1 (carrier turns once for every four sun turns).

10.1.2 Stepper resolution (derived in Vol 4)

Table 2 — 10.1.2 Stepper resolution (derived in Vol 4)

QuantityFormulaUnitsNotes
Steps per revolution360° / step anglesteps/rev1.8°/step → 200 steps/rev
Microstep anglestep angle / microstepsdegreesfiner commanded increment
Microsteps per rev(360° / step angle) × microstepssteps/revtotal addressable positions
Needle resolutionmicrostep angle / gear reductiondegreessmallest hand move at the dial

Worked — microstep angle: 1.8° / 16 = 0.1125° per microstep → 200 × 16 = 3 200 microsteps/rev.

Worked — needle resolution through 3:1: 0.1125° / 3 = 0.0375° of needle travel per microstep — finer than the eye resolves on a typical dial (Vol 2).

10.1.3 Tuning fork (derived in Vol 5)

Table 3 — 10.1.3 Tuning fork (derived in Vol 5)

QuantityFormulaUnitsNotes
Pulses per minutef × 60pulses/min440 Hz → 440 × 60 = 26 400 ppm
Pulses per secondfpulses/sthe fork’s own frequency
Rate error from miscountΔppm / 26 400fractionalone extra pulse/min ≈ 38 ppm
Calibration targetset P register = measured ppmpulses/minthe P serial command (§10.5)

The fork is the timebase: the ATtiny4313 counts pulses, not crystal cycles. If the fork truly runs at 440.0 Hz but the firmware’s P value is wrong by one pulse/minute, the clock gains or loses 1/26 400 ≈ 38 ppm ≈ 3.3 s/day. Tuning is therefore a matter of nudging P until the long-term drift vanishes (Vol 5 §5.4).

10.1.4 Accuracy — ppm to seconds (derived in Vol 5)

The conversion that anchors every accuracy claim: 1 ppm = 0.0864 s/day (because 10⁻⁶ × 86 400 s = 0.0864 s) and 1 ppm = 31.56 s/year (× 365.25 days).

Table 4 — 10.1.4 Accuracy — ppm to seconds (derived in Vol 5)

TimebaseRate specs/days/yearUsed by
AC mains, short termwanders ±a few ppmup to ~±5(legacy synchronous movements)
AC mains, long termgrid-corrected≈ 0 over weeks≈ 0utilities hold the cycle count
Tuning fork, untrimmed~±300–700 ppm~±25–60~±15 000TuningFork before P tuning
Tuning fork, trimmed~±23 ppm~±2~±730TuningFork after P tuning
DS3231 RTC±2 ppm±0.17±63PlanetaryGear, Aviation
NTP / Wi-Fi syncbounded by sync≈ 0≈ 0Aviation (ESP32) when online

The trimmed-fork figure is the designer’s own “within a couple of seconds per day” result (Vol 9). The DS3231’s ±2 ppm is why two of the three builds need no calibration at all; the fork is the build where calibration is the whole game.

10.2 Stepper microstep quick-ref

10.2.1 TMC2208 MS1/MS2 strapping (as wired on the Aviation board)

The Aviation build sets each TMC2208’s microstep mode with the MS1/MS2 pins tied to GND or VCC_IO. The values below are read directly off the project schematic’s configuration table (Vol 4 §4.5). Note these mappings are the board’s chosen set; two of them differ from the bare TMC2208 datasheet default, which is why the schematic annotates them.

Table 5 — 10.2.1 TMC2208 MS1/MS2 strapping (as wired on the Aviation board)

MS2MS1Microstep setting
GNDGND8 microsteps
GNDVCC_IO32 microsteps (differs from TMC2208 default)
VCC_IOGND64 microsteps (differs from TMC2208 default)
VCC_IOVCC_IO16 microsteps

10.2.2 Resolution table — 1.8°/step (200 steps/rev) NEMA-17

Table 6 — 10.2.2 Resolution table — 1.8°/step (200 steps/rev) NEMA-17

MicrosteppingMicrostep angleMicrosteps/rev
Full step (1/1)1.8°200
1/80.225°1 600
1/160.1125°3 200
1/320.05625°6 400
1/640.028125°12 800

Higher microstepping buys smoothness and quiet (StealthChop), not torque or absolute accuracy — the average position is unchanged, the increments are just finer (Vol 4 §4.4).

10.3 The three builds — BOM quick-ref

One compact table per build: the parts that define the design. Full schematics, complete BOMs, and assembly are in Vols 6 and 9.

10.3.1 PlanetaryGear (Arduino gear-train clock)

Table 7 — 10.3.1 PlanetaryGear (Arduino gear-train clock)

BlockPart / value
MCUArduino (AVR)
Stepper driverL293D dual H-bridge
MotorNEMA stepper, 1.8°/step (200 steps/rev)
ReductionGT2 belt, 60T/20T pulleys (3:1) + ~400 mm belt
TimebaseDS3231 RTC (CR2032 backup)
HomingA3144 hall sensor + neodymium magnet
Supply5 V 2 A
Mechanism3D-printed sun / planet / ring / carrier + hands + case

10.3.2 TuningFork (440 Hz resonator clock, per the README BOM)

Table 8 — 10.3.2 TuningFork (440 Hz resonator clock, per the README BOM)

BlockPart / value
MCUATtiny4313-PU (20 MHz max; F_CPU 1 MHz), 4k flash / 256 B RAM
Timebase440 Hz tuning fork in 3D-printed mount
Pickup/drive2 × 22 mH inductors (11 mm) + 15×5 mm neodymium rod magnet
Sustaining ampBC547B ×7 (TO-92 NPN)
SquarerNE555P (PDIP-8)
Shift register74HC595 (8-bit)
Display5 × SC39-11YWA 7-segment
RegulatorL7805 (TO-220, 5 V)
InputAlps EC12E rotary encoder + switch
Status / IO3 × 5 mm LED, panel-mount BNC (scope tap), 1N4148
Passives1 k ×13, 10 k ×8, 100 k ×2, 1 M ×2, 4.7 k; 100 n ×10, 47 n ×2, 100 µF/16 V

10.3.3 Aviation (ESP32 aviator-gauge clock)

Table 9 — 10.3.3 Aviation (ESP32 aviator-gauge clock)

BlockPart / value
MCUESP32-WROOM-32D
Motors3 × NEMA-17 (seconds / minutes / hours)
Drivers3 × TMC2208 microstepping
Homing3 × 3144E hall sensor (one per gauge)
TimebaseDS3231 RTC + NTP over Wi-Fi
AudioJQ6500 voice module (DCF77-style chime)
PresencePIR module (wake the display)
SupplyMP1584EN buck converter
Mechanism3 printed aviation gauges + decals / faces

10.4 Pinouts & key ICs

Compact reference pinouts for the ICs that recur across the three builds. Verify against the datasheet before wiring a board — package orientation (pin-1 dot) matters.

10.4.1 NE555 (PDIP-8) — fork squarer

Table 10 — 10.4.1 NE555 (PDIP-8) — fork squarer

PinNamePinName
1GND8VCC
2TRIG7DISCH
3OUT6THRES
4RESET5CTRL

10.4.2 74HC595 (8-bit shift register) — display scan

Table 11 — 10.4.2 74HC595 (8-bit shift register) — display scan

PinNameFunction
1–7QB–QHparallel outputs (with QA)
8GNDground
9QH’serial-out (daisy-chain)
10SRCLR̄shift-register clear (active low)
11SRCLKshift clock
12RCLKstorage/latch clock
13output enable (active low)
14SERserial data in
15QAparallel output
16VCCsupply

Data is clocked in on SER at each SRCLK edge, then transferred to the outputs on RCLK; OE blanks all outputs (used for display dimming/multiplex).

10.4.3 L293D (dual H-bridge) — planetary stepper driver

Table 12 — 10.4.3 L293D (dual H-bridge) — planetary stepper driver

PinNamePinName
1EN1,216VCC1 (logic)
2IN115IN4
3OUT114OUT4
4GND13GND
5GND12GND
6OUT211OUT3
7IN210IN3
8VCC2 (motor)9EN3,4

One bipolar stepper uses both bridges: coil A on OUT1/OUT2, coil B on OUT3/OUT4; EN1,2 and EN3,4 gate them; IN1–IN4 set winding polarity (Vol 4 §4.3).

10.4.4 ATtiny4313 — fork counter (relevant notes)

8-bit AVR, 4 kB flash, 256 B RAM, run at F_CPU = 1 MHz in this build. One timer counts fork pulses (overflows give the per-second and per-minute ticks); a second timer scans the display and runs housekeeping; the USART does serial at 9600 baud (§10.5). Inputs: the EC12E encoder + button. Note INPUT_PULLUP is not available on certain pins (the schematic flags pins needing external pull-ups) — relevant if you re-pin the encoder.

10.4.5 L7805 (TO-220 regulator)

Table 13 — 10.4.5 L7805 (TO-220 regulator)

PinName
1IN (Vin)
2GND (tab)
3OUT (+5 V)

10.4.6 DS3231 RTC (I²C module)

Table 14 — 10.4.6 DS3231 RTC (I²C module)

PinFunction
SDAI²C data
SCLI²C clock
SQWsquare-wave / 1 Hz interrupt out
32K32.768 kHz output
VCC / GNDsupply; CR2032 backs the clock

I²C address 0x68; temperature-compensated to ±2 ppm (§10.1.4).

10.4.7 TMC2208 (driver control lines)

Table 15 — 10.4.7 TMC2208 (driver control lines)

LineFunction
STEPone edge = one microstep
DIRdirection
EN (ENN)enable, active low
MS1 / MS2microstep select (§10.2.1)
VREFsets coil current (analog)

10.4.8 ESP32-WROOM-32D (Aviation roles)

3 × {STEP, DIR} pairs to the TMC2208s; shared EN; 3 × hall inputs (3144E); I²C (SDA/SCL) to the DS3231; UART/IO to the JQ6500; a PIR input; Wi-Fi for NTP. Avoid the strapping pins (0, 2, 12, 15) and input-only pins (34–39) for outputs. A pinout reference diagram is slotted below if a labeled map reads cleaner than this list.

FIGURE SLOT 10.1 — A labeled ESP32-WROOM-32D pinout reference highlighting the pins used by the Aviation build (3× STEP/DIR, EN, 3× hall, I²C, JQ6500 UART, PIR); to be fetched license-clean via the Photo Helper in the figure pass, or authored as a project-original SVG; credit verbatim.

10.5 Tuning Fork serial protocol quick-ref

The firmware exposes a 9600-baud serial console. Each command is a single uppercase letter followed by a value (to set) or ? (to query), terminated by newline. Every command is answered by a line beginning with = and OK or ERR (an error appends a code). Some options are read-only or write-only (Vol 9 §9.x).

Table 16 — 10.5 Tuning Fork serial protocol quick-ref

CmdMeaningAccessSet exampleQuery
EEcho characterswrite-onlyE0=off, E1=on
AAuto-send time each secondwrite-onlyA0=off, A1=on
CCharsetwrite-onlyC0=PAWScript (Elian), C1=plain numbers
TTimeread/writeT12:34 (HH:MM only)T?HH:MM:SS
PPulses per minute (calibration)read/writeP26400P?
MModeread-onlyM? → one of D/H/M/T/E
RRun stateread/writeR1 runs + clears errors¹R?0 or 1

¹ The README’s R example reads P1\n — a documentation typo; the run command is R1 (you cannot stop the clock with R).

Modes returned by M?: D time display · H hour-setting · M minute-setting · T pulses-per-minute tuning · E error (lost fork signal or other fault).

Error codes (appended after =ERR): :UC unknown command · :INV invalid parameter.

Calibration loop: put the clock in tuning mode, read P?, let it run against a known reference for a day, compute the drift, and adjust P by Δppm × 26 400 (§10.1.3). 26 400 is the nominal value for a true 440 Hz fork.

10.6 Source URLs & where the files live

All three designs are held on disk under Clocks/Mechanical/02-inputs/, one folder per build. The canonical upstream sources:

Table 17 — build. The canonical upstream sources

BuildFolderUpstream
PlanetaryGear02-inputs/PlanetaryGear/Looman_projects, “Planetary Gear Clock,” Instructables (build PDF + full STL/DXF set)
TuningFork02-inputs/TuningFork/NuclearLighthouseStudios, “Tuning Fork Clock” — KiCad project, BOM, fork-mount CAD, article
TuningFork firmware02-inputs/TuningFork/code/github.com/NuclearLighthouseStudios/Tuning-Fork-Clock-Firmware (C / avr-gcc, make flash)
TuningFork videohttps://www.youtube.com/watch?v=TgB_1jr5b_c
Aviation02-inputs/Aviation/Nobby123, “ESP32 Aviator Clock Using Three Aviation-Style Gauges” (FreeCAD bodies, decals, schematic, firmware zips)

The deep-dive Markdown for this series lives in 02-inputs/volume_sources/vol1.md … vol10.md; figure sources in 02-inputs/volume_sources/figs/. Hub-shared docs: Clocks/_shared/comparison.md, Clocks/_shared/deep_dive_protocol.md, Clocks/_shared/safety.md.

10.7 Glossary A–Z

  • Accutron — Bulova’s 1960 tuning-fork watch; a 360 Hz fork sustained by a one-transistor circuit advancing a 300-tooth index wheel. The conceptual ancestor of the TuningFork build (Vol 1).
  • Backlash — lost motion (free play) between meshing gear teeth; the enemy of repeatable hand position. Minimized by center-distance and tooth-thickness control (Vol 3).
  • Balance wheel — the rotary oscillator + hairspring in a mechanical watch; the resonator a tuning fork or quartz crystal later replaced.
  • Barkhausen criterion — the condition for sustained oscillation: loop gain ≥ 1 and total phase shift = 0° (360°). The fork’s transistor amplifier must meet it to self-start (Vol 4).
  • Carrier (planet carrier) — the arm/plate holding the planet gears in an epicyclic train; often the output member (Vol 3).
  • DCF77 — the German 77.5 kHz longwave time signal; here the JQ6500 plays a DCF-style chime sample, not a real radio decode (Vol 9).
  • Epicyclic / planetary gearing — a train with a central sun, orbiting planets on a carrier, and an outer ring; large compact reductions from a flat package (Vol 3).
  • Escapement — the mechanism that feeds energy to a mechanical oscillator and counts its swings; the function the fork’s electronics replace (Vol 2).
  • GT2 — a 2 mm-pitch timing-belt profile; the 60T/20T GT2 pulleys give the PlanetaryGear its 3:1 pre-reduction (Vol 3).
  • Hall sensor — a magnetic-field switch (A3144 / 3144E here); detects a magnet to home a moving part to a known zero (Vol 4).
  • Homing — driving a mechanism to a repeatable reference position (against a hall sensor) so commanded angles read true on power-up (Vol 4).
  • Involute — the standard gear-tooth flank curve that gives constant velocity ratio through the mesh (Vol 3).
  • Lavet stepper — the single-coil stepping motor in cheap quartz movements; one electrical pulse advances the seconds hand one step (Vol 4).
  • Microstepping — driving a stepper’s coils with graded currents to subdivide each full step (1.8°) into finer increments for smoothness (Vol 4, §10.2).
  • Module (m) — the gear sizing unit, m = pitch diameter / tooth count, in mm/tooth; gears mesh only at equal module (Vol 3).
  • NTP — Network Time Protocol; the ESP32’s Wi-Fi time source, accurate to well under a second when online (Vol 5).
  • ppm (parts per million) — fractional rate error; 1 ppm = 0.0864 s/day = 31.56 s/year (§10.1.4).
  • Pressure angle — the angle of tooth-flank force, commonly 20°; must match between meshing gears (Vol 3).
  • Q factor — an oscillator’s sharpness/energy-storage; a high-Q steel fork rings long and holds frequency, easing the sustaining amp’s job (Vol 4).
  • RTC (real-time clock) — a battery-backed timekeeping chip; the DS3231 here is temperature-compensated to ±2 ppm (Vol 5).
  • Ring (annulus) — the internally-toothed outer gear of an epicyclic train; held fixed for the 1 + N_ring/N_sun ratio (Vol 3).
  • StealthChop — the TMC2208’s near-silent voltage-mode chopping mode; why the Aviation needles move quietly (Vol 4).
  • Sun gear — the central gear of an epicyclic train; typically the input (Vol 3).
  • Sustaining amplifier — the positive-feedback transistor circuit (BC547 stages) that keeps the fork vibrating, sensing on one coil and driving the other (Vol 4).
  • Synchronous motor — an AC motor locked to mains frequency; the timebase of legacy mains clocks (Vol 5).
  • TCXO — temperature-compensated crystal oscillator; the technique inside the DS3231 that holds ±2 ppm over temperature (Vol 5).
  • Tuning fork — a U-shaped steel resonator; the TuningFork build’s 440 Hz “concert A” fork is its timebase, counted at 26 400 pulses/min (Vol 5).

10.8 Source URLs

  • PlanetaryGear — Looman_projects, “Planetary Gear Clock,” Instructables. Files in 02-inputs/PlanetaryGear/.
  • TuningFork — NuclearLighthouseStudios, “Tuning Fork Clock” (KiCad + article). Firmware: https://github.com/NuclearLighthouseStudios/Tuning-Fork-Clock-Firmware. Video: https://www.youtube.com/watch?v=TgB_1jr5b_c. Files in 02-inputs/TuningFork/.
  • Aviation — Nobby123, “ESP32 Aviator Clock Using Three Aviation-Style Gauges,” Instructables. Files in 02-inputs/Aviation/.
  • Hub-shared: Clocks/_shared/comparison.md, Clocks/_shared/deep_dive_protocol.md, Clocks/_shared/safety.md.