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)
| Quantity | Formula | Units | Notes |
|---|---|---|---|
| Module | m = d / N | mm/tooth | d = pitch diameter, N = tooth count |
| Pitch diameter | d = m · N | mm | inverse of the above |
| Center distance | C = m (N₁ + N₂) / 2 | mm | two meshing external gears, equal module |
| Simple ratio | i = N_driven / N_driver | — | >1 is a reduction (output slower) |
| Belt/pulley ratio | i = T_driven / T_driver | — | GT2 60T/20T → 60/20 = 3:1 |
| Planetary, ring fixed | i = 1 + N_ring / N_sun | — | input = sun, output = carrier |
| Planetary, carrier fixed | i = −N_ring / N_sun | — | sun→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)
| Quantity | Formula | Units | Notes |
|---|---|---|---|
| Steps per revolution | 360° / step angle | steps/rev | 1.8°/step → 200 steps/rev |
| Microstep angle | step angle / microsteps | degrees | finer commanded increment |
| Microsteps per rev | (360° / step angle) × microsteps | steps/rev | total addressable positions |
| Needle resolution | microstep angle / gear reduction | degrees | smallest 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)
| Quantity | Formula | Units | Notes |
|---|---|---|---|
| Pulses per minute | f × 60 | pulses/min | 440 Hz → 440 × 60 = 26 400 ppm |
| Pulses per second | f | pulses/s | the fork’s own frequency |
| Rate error from miscount | Δppm / 26 400 | fractional | one extra pulse/min ≈ 38 ppm |
| Calibration target | set P register = measured ppm | pulses/min | the 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)
| Timebase | Rate spec | s/day | s/year | Used by |
|---|---|---|---|---|
| AC mains, short term | wanders ±a few ppm | up to ~±5 | — | (legacy synchronous movements) |
| AC mains, long term | grid-corrected | ≈ 0 over weeks | ≈ 0 | utilities hold the cycle count |
| Tuning fork, untrimmed | ~±300–700 ppm | ~±25–60 | ~±15 000 | TuningFork before P tuning |
| Tuning fork, trimmed | ~±23 ppm | ~±2 | ~±730 | TuningFork after P tuning |
| DS3231 RTC | ±2 ppm | ±0.17 | ±63 | PlanetaryGear, Aviation |
| NTP / Wi-Fi sync | bounded by sync | ≈ 0 | ≈ 0 | Aviation (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)
| MS2 | MS1 | Microstep setting |
|---|---|---|
| GND | GND | 8 microsteps |
| GND | VCC_IO | 32 microsteps (differs from TMC2208 default) |
| VCC_IO | GND | 64 microsteps (differs from TMC2208 default) |
| VCC_IO | VCC_IO | 16 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
| Microstepping | Microstep angle | Microsteps/rev |
|---|---|---|
| Full step (1/1) | 1.8° | 200 |
| 1/8 | 0.225° | 1 600 |
| 1/16 | 0.1125° | 3 200 |
| 1/32 | 0.05625° | 6 400 |
| 1/64 | 0.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)
| Block | Part / value |
|---|---|
| MCU | Arduino (AVR) |
| Stepper driver | L293D dual H-bridge |
| Motor | NEMA stepper, 1.8°/step (200 steps/rev) |
| Reduction | GT2 belt, 60T/20T pulleys (3:1) + ~400 mm belt |
| Timebase | DS3231 RTC (CR2032 backup) |
| Homing | A3144 hall sensor + neodymium magnet |
| Supply | 5 V 2 A |
| Mechanism | 3D-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)
| Block | Part / value |
|---|---|
| MCU | ATtiny4313-PU (20 MHz max; F_CPU 1 MHz), 4k flash / 256 B RAM |
| Timebase | 440 Hz tuning fork in 3D-printed mount |
| Pickup/drive | 2 × 22 mH inductors (11 mm) + 15×5 mm neodymium rod magnet |
| Sustaining amp | BC547B ×7 (TO-92 NPN) |
| Squarer | NE555P (PDIP-8) |
| Shift register | 74HC595 (8-bit) |
| Display | 5 × SC39-11YWA 7-segment |
| Regulator | L7805 (TO-220, 5 V) |
| Input | Alps EC12E rotary encoder + switch |
| Status / IO | 3 × 5 mm LED, panel-mount BNC (scope tap), 1N4148 |
| Passives | 1 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)
| Block | Part / value |
|---|---|
| MCU | ESP32-WROOM-32D |
| Motors | 3 × NEMA-17 (seconds / minutes / hours) |
| Drivers | 3 × TMC2208 microstepping |
| Homing | 3 × 3144E hall sensor (one per gauge) |
| Timebase | DS3231 RTC + NTP over Wi-Fi |
| Audio | JQ6500 voice module (DCF77-style chime) |
| Presence | PIR module (wake the display) |
| Supply | MP1584EN buck converter |
| Mechanism | 3 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
| Pin | Name | Pin | Name |
|---|---|---|---|
| 1 | GND | 8 | VCC |
| 2 | TRIG | 7 | DISCH |
| 3 | OUT | 6 | THRES |
| 4 | RESET | 5 | CTRL |
10.4.2 74HC595 (8-bit shift register) — display scan
Table 11 — 10.4.2 74HC595 (8-bit shift register) — display scan
| Pin | Name | Function |
|---|---|---|
| 1–7 | QB–QH | parallel outputs (with QA) |
| 8 | GND | ground |
| 9 | QH’ | serial-out (daisy-chain) |
| 10 | SRCLR̄ | shift-register clear (active low) |
| 11 | SRCLK | shift clock |
| 12 | RCLK | storage/latch clock |
| 13 | OĒ | output enable (active low) |
| 14 | SER | serial data in |
| 15 | QA | parallel output |
| 16 | VCC | supply |
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
| Pin | Name | Pin | Name |
|---|---|---|---|
| 1 | EN1,2 | 16 | VCC1 (logic) |
| 2 | IN1 | 15 | IN4 |
| 3 | OUT1 | 14 | OUT4 |
| 4 | GND | 13 | GND |
| 5 | GND | 12 | GND |
| 6 | OUT2 | 11 | OUT3 |
| 7 | IN2 | 10 | IN3 |
| 8 | VCC2 (motor) | 9 | EN3,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)
| Pin | Name |
|---|---|
| 1 | IN (Vin) |
| 2 | GND (tab) |
| 3 | OUT (+5 V) |
10.4.6 DS3231 RTC (I²C module)
Table 14 — 10.4.6 DS3231 RTC (I²C module)
| Pin | Function |
|---|---|
| SDA | I²C data |
| SCL | I²C clock |
| SQW | square-wave / 1 Hz interrupt out |
| 32K | 32.768 kHz output |
| VCC / GND | supply; 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)
| Line | Function |
|---|---|
| STEP | one edge = one microstep |
| DIR | direction |
| EN (ENN) | enable, active low |
| MS1 / MS2 | microstep select (§10.2.1) |
| VREF | sets 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
| Cmd | Meaning | Access | Set example | Query |
|---|---|---|---|---|
E | Echo characters | write-only | E0=off, E1=on | — |
A | Auto-send time each second | write-only | A0=off, A1=on | — |
C | Charset | write-only | C0=PAWScript (Elian), C1=plain numbers | — |
T | Time | read/write | T12:34 (HH:MM only) | T? → HH:MM:SS |
P | Pulses per minute (calibration) | read/write | P26400 | P? |
M | Mode | read-only | — | M? → one of D/H/M/T/E |
R | Run state | read/write | R1 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
| Build | Folder | Upstream |
|---|---|---|
| PlanetaryGear | 02-inputs/PlanetaryGear/ | Looman_projects, “Planetary Gear Clock,” Instructables (build PDF + full STL/DXF set) |
| TuningFork | 02-inputs/TuningFork/ | NuclearLighthouseStudios, “Tuning Fork Clock” — KiCad project, BOM, fork-mount CAD, article |
| TuningFork firmware | 02-inputs/TuningFork/code/ | github.com/NuclearLighthouseStudios/Tuning-Fork-Clock-Firmware (C / avr-gcc, make flash) |
| TuningFork video | — | https://www.youtube.com/watch?v=TgB_1jr5b_c |
| Aviation | 02-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.