Devesh36/orbit-turntable

ORBIT is a USB-C-powered display turntable for photographing jewellery, models and small products. Four-layer ESP32-C3 / ULN2003 PCB, geared stepper, OLED, push encoder, home switch and buzzer, with an enclosed and exploded assembly. Hardware prototype; firmware and physical qualification remain separate.

Version
0.1.1
License
unset
Stars
0

docs/DESIGN.md

SchematicSchematic preview for docs/DESIGN.md
# ORBIT hardware and assembly

## Architecture

The MCU sequences four ULN2003ADR channels to sink the motor windings. The winding common goes to protected 5 V; the driver's COM pin also goes to 5 V so its internal clamp diodes absorb inductive turn-off energy. Channel 5 drives the buzzer. Unused driver inputs 6/7 are grounded and outputs 6/7 are left open. The five active driver inputs have 47 kΩ pull-downs to keep the coils and buzzer off while MCU pins are floating.

The Adafruit 858 is a five-wire unipolar motor. Its documented nominal gearing is 16.128:1 and it has 32 full steps per motor revolution, giving approximately 516.096 full steps per output revolution. Do not hardcode the 4096-half-step number commonly associated with other 28BYJ-48 variants. The gearbox has backlash; the home switch establishes an index, not a closed-loop angular encoder. Homing speed, half-step sequence, acceleration and idle coil release require firmware and bench validation.

## Power and USB-C

J1 supplies VBUS through F1, Littelfuse 1206L050/15YR (0.5 A hold, 15 V resettable fuse), to V5. D1 is the 5 V ESD suppressor on the input. AP2112K-3.3TRG1 supplies the MCU, OLED and logic from V5. C1/C2 are regulator bypass capacitors; C3/C5 are local module bypass/bulk capacitance and C4 is motor-driver bypass. The PTC is overload protection, not a precise electronic current limiter.

CC1 and CC2 each have a separate 5.1 kΩ pull-down. Each is also sensed through a 100 kΩ series resistor and 1 nF filter by a separate ADC input. The firmware must identify the connected CC pin, use calibrated ADC readings and keep all motor drive outputs low until a 1.5 A or 3 A current advertisement is present. There is no USB Power Delivery controller and no request for higher voltage. USB data and SBU contacts are intentionally unused. USB-C is power input only.

The selected motor's listed winding resistance is approximately 42 Ω; two energized windings draw roughly 0.2 A after driver voltage drop. MCU radio operation, display and buzzer add to this. Actual peak current, inrush, fuse derating and regulator temperature require measurement; do not infer a USB compliance approval from the schematic. Turn radio off when not needed and release coils while idle. The intended operating supply is a USB-C adapter, not an unenumerated PC port.

## MCU pin map

| Function | Module pad | ESP32-C3 GPIO | Net |
| --- | --- | --- | --- |
| Motor winding A input | 3 | 4 | COIL_IN1 |
| Motor winding B input | 4 | 5 | COIL_IN2 |
| Motor winding C input | 5 | 6 | COIL_IN3 |
| Motor winding D input | 6 | 7 | COIL_IN4 |
| Status LED, active low | 7 | 8 | STATUS_N |
| Dial push / start / boot | 8 | 9 | BOOT_START |
| Encoder A | 10 | 10 | ENCODER_A |
| Encoder B / UART RX | 11 | 20 | UART_RX via R20 to ENCODER_B |
| Buzzer / UART TX | 12 | 21 | BEEP |
| OLED SDA | 13 | 18 | SDA |
| OLED SCL | 14 | 19 | SCL |
| Home switch, active low | 15 | 3 | HOME_N |
| Boot strap, pulled high | 16 | 2 | STRAP2 |
| CC2 ADC | 17 | 1 | CC2_ADC |
| CC1 ADC | 18 | 0 | CC1_ADC |
| Enable / reset | 2 | EN | EN |
| Logic supply | 1 | — | V3V3 |
| Ground | 9, 19 | — | GND |

GPIO2, GPIO8 and GPIO9 have pull-ups for boot behavior. EN has a 10 kΩ / 1 µF reset network. Pressing the dial during reset enters download mode; a normal short press after startup can be interpreted as start/stop by firmware. I²C uses GPIO18/19, so firmware must configure these as GPIO/I²C instead of USB Serial/JTAG.

R20 (4.7 kΩ) isolates the encoder B contact from UART RX so a connected programmer is not shorted directly to ground by the dial position. Encoder contacts have 10 kΩ pull-ups and 10 nF filtering. Encoder and home switch still need firmware debounce. UART TX shares the buzzer driver input, so boot/programming traffic can produce sound; leave the buzzer unpopulated during initial serial bring-up if that is undesirable.

## Connectors and test pads

| Connection | Pins, in numbered order |
| --- | --- |
| J1 | USB-C 5 V input; no USB data function |
| J2 | 1 winding A, 2 winding B, 3 winding C, 4 winding D, 5 common +5 V |
| J3 | 1 +3.3 V, 2 GND, 3 SDA, 4 SCL |
| J4 | 1 HOME_N, 2 GND; connect Omron common and normally-open contacts |
| TP1 | Protected +5 V |
| TP2 | +3.3 V reference |
| TP3 | Ground |
| TP4 | EN/reset |
| TP5 | BOOT_START |
| TP6 | MCU UART RX; connect adapter TX |
| TP7 | MCU UART TX; connect adapter RX |

Use a 3.3 V logic UART adapter and common ground. Power the board through USB-C; do not feed an adapter's 5 V into a signal or the 3.3 V reference pad. Hold BOOT_START low, pulse EN low, then release EN for serial download. Motor connector order is defined by this board, not by wire color alone. Verify the purchased harness and repin if necessary.

## Antenna and layout

The ESP32 module is rotated so its PCB antenna faces the left edge. A native keepout excludes routing on every copper layer in the antenna strip and extends along both sides. No ground or power pour occupies that strip. The motor, bearing, display and USB receptacle are outside this area. Use the specified nonmetallic enclosure and nylon lid screws; substituting metal screws or a metal case near the antenna needs RF/layout review. Wireless functionality and antenna performance are not tested.

All traces are routed by tscircuit on four layers. The input/motor net width setting is 0.4 mm; small logic nets use 0.18 mm. Review current-carrying paths, clearances, return paths, manufacturability and stackup with the fabricator before ordering. This is a prototype layout, not an EMC-qualified design.

## Mechanical construction

The stationary base holds the controller PCB on four supports and the motor on two tall posts. The lid contains the OLED window, encoder opening, blue LED light pipe, buzzer vents and a bearing seat. A 608-2Z bearing (8 mm ID × 22 mm OD × 7 mm) supports the platform through a printed 5 mm D-shaft-to-8 mm adapter. The platform carries a thin nonslip mat and a single underside index lug to operate the home-switch lever.

Nylon M3 service screws are used around the enclosure. The PCB uses four M2.5 positions. The lid/body, bearing and shaft interfaces need tolerance coupons and physical fitting. The external module retention, switch bracket, wire routing, screw engagement, motor alignment and rotating clearance must be qualified on the actual purchased parts. The wiring paths shown are illustrative, not length-controlled harness drawings. No rated payload is specified.

Colored print, display content and the rubber mat are separate assembly parts. STL exports represent prototype print geometry; the colored GLB conveys the assembled appearance. The OLED content is illustrative only.

## Parts and references

Exact imports were verified through `tsci import C-number --jlcpcb --use-exact-footprint`:

| Part | JLCPCB ID / reference |
| --- | --- |
| ESP32-C3-WROOM-02-N4 | C2934560; [Espressif datasheet](https://www.espressif.com/sites/default/files/documentation/esp32-c3-wroom-02_datasheet_en.pdf) |
| ULN2003ADR | C7512; [TI datasheet](https://www.ti.com/lit/ds/symlink/uln2003a.pdf) |
| AP2112K-3.3TRG1 | C51118 |
| USB4105-GF-A | C3020560 |
| PEC11R-4020F-S0024 | C143788; [Bourns datasheet](https://www.bourns.com/docs/product-datasheets/pec11r.pdf) |
| YS-SBZ9650DYB05 | C409830 |
| ESD5Z5.0T1G | C82044 |
| XL-1608UBC-04 | C965807 |
| 1TS026A-1600-0553-CT | C913784 |
| Geared stepper | [Adafruit 858](https://www.adafruit.com/product/858) |
| OLED module | [Waveshare 0.91inch OLED Module](https://www.waveshare.com/wiki/0.91inch_OLED_Module) |

The OLED and motor are wired assemblies rather than invented on-board package footprints. The PCB uses standard 2.54 mm headers for them. Discrete passive footprints use native 0603, 0805 and 1206 definitions. External mechanical CAD is dimension-based and should not be mistaken for manufacturer STEP models.