# EP2 — MG90S Pan-Tilt Head

A two-servo pan-tilt head: `pan-tilt-sweep.ino` drives it, and the printed parts live in
`../../designs/pan-tilt/pan_tilt.scad`.

## Servos
- Use the **MG90S** (black, **metal gears**). The blue **SG90** has plastic gears that strip
  under load — not worth the few pennies saved.
- Pull in the **ESP32Servo** library: add `lib_deps = madhephaestus/ESP32Servo` to your
  `platformio.ini` and PlatformIO installs it on the next build.

## Power
- Servos get their **own ~5 V supply**, never the ESP32's 3.3 V pin.
- **Share grounds:** supply GND ↔ ESP32 GND, or the signal means nothing.

## Printing the head
Open `pan_tilt.scad` in OpenSCAD and set `part` to export each piece:
- `"base"` — print flat, open side down.
- `"yoke"` — print disc-down (a brim helps).
- `"tilt"` — print flat, boss up.

PLA, 0.2 mm layers, 3 walls, 20–30% infill. Dimensions are **nominal** — if the servo
pocket is tight/loose, change `fit_tol`. Calipers on your servo beat any datasheet.

## Assembly order
1. Drop the **pan** servo into `base_plate`, screw the body in.
2. **Center** both servos in code *before* attaching horns.
3. Screw `pan_yoke` to the pan horn; mount the **tilt** servo in the yoke.
4. Screw `tilt_bracket` to the tilt horn; mount your camera/sensor.

More: https://minirobo.io/episodes/mg90s.html
