# Sleepy Cloud noise machine

Working build snapshot, 6 October 2026. ESP32-C3 PRO MINI + MAX98357A + B10K potentiometer, in a cloud enclosure printed on a Bambu A1 mini.

The assembled unit works. The speaker is secured with machine screws and nuts. The original five-part print set is the assembled baseline. **The optional reinforced ESP32 holder has not been printed or installed by the builder.** A mode button and browser controls are future ideas, not implemented features.

## Downloads and folders

- `print-files/`: five parts for the baseline enclosure. Print all five once. Numbering is retained from development; there are no missing parts 03, 05, 06 or 07.
- `optional-reinforced-holder/`: an alternative to part 09, not an extra part to install alongside it.
- `firmware/esp32_pink_ocean/esp32_pink_ocean.ino`: the working Arduino sketch, unchanged for publication.
- `cad/sleepy-cloud-v8/`: Blender assembly, construction/review/mesh-validation scripts, and required STL inputs.
- `cad/esp32-cradle-reinforced-v3/`: optional holder source. Keep it next to `sleepy-cloud-v8`; its scripts load that assembly.
- `wiring/`: PNG/SVG wiring diagram, physical board pin guide, netlist, and SVG-generation script.
- `photos/`: final photos and selected original build photos, resized and stripped of photo metadata for sharing.
- `assembly/`: print orientation, exploded joint, nut access and holder revision illustrations.
- `fit-samples/`: optional mirrored potentiometer capture sample and its keeper. These are test pieces, not extra enclosure parts.
- `SHA256SUMS.txt`: integrity hashes for the files in the complete bundle.

The smaller print-files, firmware and CAD archives contain the corresponding subsets. This guide describes the complete bundle.

## Hardware

- ESP32-C3 PRO MINI board, nominal PCB 22.52 x 18 mm, with USB-C. Board variants may differ.
- MAX98357A I2S amplifier breakout. SD and GAIN remain unconnected on this build.
- 3-inch speaker matching the measured pattern: 59 x 59 mm adjacent screw centers, about 79 mm face width and 55 mm depth. Seller listing covers 4/8 ohm options; verify your actual speaker. The advertised 25 W speaker rating is not this amplifier's output power.
- WH148 B10K linear potentiometer, three terminals, measured 7 mm threaded bushing, with a side locating peg and push-on knob.
- USB-C 5 V supply, jumper wires, soldered headers, M3 machine screws and nuts.

The design uses 3.4 mm clearance holes for M3 hardware. Exact screw lengths depend on your speaker ears, washers and printed dimensions. Front enclosure joints were designed around M3 x 25 mm screws with approximately 17 mm material stack and room for a nut. Holder reference screws are M3 x 10 mm; potentiometer keeper reference screws are M3 x 8 mm. Check engagement and clearance with your hardware before tightening. Rear-cover screws engage plastic pilots rather than captive nuts; tighten gently. The builder confirmed using machine screws and nuts for the speaker but did not report their exact length.

## Print set

| File | Purpose | Orientation |
| --- | --- | --- |
| `01-shell.stl` | Cloud middle section, 2.4 mm main outer walls | Rear edge on bed, projecting front lip up; supplied orientation |
| `02-single-front-plate.stl` | Grille, speaker seat and pot mount in one piece | Decorative face down, mounts up; supplied orientation |
| `04-rear-panel.stl` | Rear cover with USB window | Flat on bed |
| `08-pot-keeper.stl` | Retains potentiometer from inside | Flat as supplied |
| `09-esp32-cradle.stl` | Baseline PCB holder attached to rear cover | Flat base down, upright as supplied |

Use millimeters, 100% scale, and do not mirror the front plate. Approximate enclosure dimensions: 164.6 x 139.2 mm face, 103 mm depth. It fits the A1 mini's nominal 180 mm build volume as separate parts.

Saved baseline slicing: A1 mini, 0.4 mm nozzle, Generic PLA profile, 0.20 mm layers, three walls, 15% infill, supports off. Shell estimate: 3 h 56 min / 148.6 g. Front estimate: 2 h 38 min / 76.4 g. Baseline holder estimate: 42 min / 9.2 g. These are estimates from the saved slices, not measured print times or universal settings. Inspect your own sliced layers.

The optional reinforced holder instead uses **five walls and 40% infill**, with the same nozzle/layer/support settings. Estimate: 45 min / 12.8 g. Do not assume the saved estimates apply to another printer, material or profile.

## Assembly order and mating surfaces

1. Check the potentiometer bore and handedness, board fit with plugged-in jumper sockets, and speaker screw pattern before a long print. The optional pot sample reproduces the accepted mirrored pocket; attach its separate keeper to test capture. The small final ESP32 holder itself can serve as the board fit test.
2. With the front plate viewed from the **inside**, flat bottom down and terminal opening downward, the potentiometer's peg pocket is on the **right**. Insert the shaft through the front, seat the body/peg in the matching capture, and install the back keeper using its two screws and nuts. The keeper can sit above the bosses while contacting the pot body; do not force it flat by overtightening.
3. Seat the speaker behind the grille, aligned to the 59 x 59 mm holes. Secure with machine screws and nuts. Ensure the surround and cone clear the grille and screws. The model allows about 6 mm static clearance for the reported 4 mm front projection; confirm your own driver, including movement. Keep wires away from the cone.
4. Match the front plate to the shell's projecting front lip. Insert the four case screws through the plate and shell tabs. Fit the loose nuts from inside the still-open rear. The joint is shown in the assembly illustrations.
5. Slide the ESP32 into its holder from the USB end, with component side up and soldered headers pointing down. Route the female jumper connectors in the open lanes under the two header rows. The center support stays between those rows. Leave relaxed bends in the wires rather than using them to pull the board into position.
6. Determine the rear cover's correct face by matching its **asymmetric cloud outline** to the shell's rear opening, keeping the flat bottom down. Mark the inside temporarily. Attach the holder to that inside face with two screws from outside and nuts accessible inside; align the socket with the USB opening. See the nut-installation guide. Do not mirror or reprint the cover just because it appears mismatched from the wrong side.
7. Wire and test before closing. Leave space for the amplifier and extra wires, and arrange them so exposed contacts cannot touch other conductors or be strained by the cover. The enclosure has no dedicated rigid amplifier mount.
8. Fit the rear cover to the end **without** the projecting front lip, then tighten the rear screws into the plastic pilots gently. Check plug insertion without forcing the board and check sound with wires in their final position.

Unplug USB when moving wiring or opening the assembly. This is a documented hobby prototype; actual fit depends on board, pot, speaker, cable and printer variations.

## Wiring

| ESP32 | Connection |
| --- | --- |
| 5V / VBUS | MAX98357A VIN |
| GND | MAX98357A GND and one outer pot terminal |
| 3V3 | Other outer pot terminal |
| GPIO0 | Pot center/wiper |
| GPIO4 | MAX98357A BCLK |
| GPIO3 | MAX98357A LRC / WS |
| GPIO1 | MAX98357A DIN |

Speaker connects only between amplifier OUT+ and OUT-. **Neither output connects to GND.** SD and GAIN are unconnected. Reversing the pot's two outside terminals reverses knob direction. Supply the pot from 3V3, not 5V.

The ESP32 diagram follows the component-side pin order with USB at the top. The amplifier diagram is schematic; read the labels on your actual board. Consult the separate two-sided pin guide rather than assuming the same left/right order from the underside.

## Firmware

Install Espressif's ESP32 Arduino board package. This build used version 3.3.12, `ESP32C3 Dev Module`, and `USB CDC On Boot: Enabled`. Open `esp32_pink_ocean.ino` inside the matching `esp32_pink_ocean` folder. Select your board's detected serial port and upload using a USB data cable. ESP_I2S and Preferences come from the ESP32 board package.

Serial Monitor: 115200 baud. Commands: `w` white, `p` pink, `b` brown, `o` toggle swells, `t` steady noise, `+`/`-` volume by five percentage points, `m` mute, `s` save, `?` help/status. Saving persists the color and swell setting; physical knob position determines power-on volume. Moving the knob resumes knob control after a serial volume override or mute.

Audio is synthesized locally at 44.1 kHz, 16-bit stereo with identical channels. No WAV files, Wi-Fi configuration, mode button or HTTP server are required or implemented. Current `PEAK_LIMIT` is 12000; this is a digital amplitude ceiling, not speaker wattage or calibrated acoustic loudness. The pink filter credits Paul Kellet's work at https://www.firstpr.com.au/dsp/pink-noise/ in the source.

## Troubleshooting and optional holder

Intermittent static during final assembly was traced by the builder to **ESP32 header solder joints**, after swapping jumper wires and amplifiers did not help. Check both ends and their solder joints when movement changes the sound. Do not assume the module nearest your hand is the faulty part. The earlier low-level crackling on computer USB disappeared on the Anker supply; these were separate observations.

The installed baseline holder still feels somewhat mushy on USB insertion. The optional revision increases the antenna-end stop from 2.15 to 5 mm and adds a 4 mm center brace. Board position, stop contact face, nominal end gap, connector lanes and mounting holes stay unchanged. Mesh, nominal assembly-clearance and slicing checks passed. **Physical stiffness and fit of this new revision remain untested.** It might not resolve movement due to board free play or rear-cover flex.

## Editing the design

The CAD files use millimeter coordinates and were generated with Blender 5.x. Open `cad/sleepy-cloud-v8/sleepy-cloud-v8.blend` to inspect the assembled parts. Hardware envelopes and studio objects are references, not printable parts. Use the supplied STL exports for printing.

To regenerate in a working copy, run Blender in background mode with `--python cad/sleepy-cloud-v8/build_sleepy_cloud.py`, then optionally `--python cad/sleepy-cloud-v8/review_assembly.py`. The builder uses bundled STL inputs for the accepted pot/holder geometry, so keep `inputs/` and `validate_stls.py` together with the script. Scripts write generated files alongside themselves. The optional holder generator expects the sibling v8 assembly. Preserve a copy before regenerating. Python mesh validators use the standard library; Blender scripts require Blender's `bpy`, not ordinary Python.

The source snapshots retain historical comments about prototype verification. This README records the updated physical status on 6 October 2026. A working print by one builder does not establish fit for every hardware variant.
