MustafaMulla29/wireless-mouse-pcb

A 3D-printed wireless mouse enclosure housing a 44×70 mm PCB with nRF52810 BLE control, optical sensor, USB-C LiPo charging/power circuitry, buttons, scroll encoder/wheel, and battery bay.

Version
1.0.18
License
unset
Stars
0

Use with the tscircuit CLI

tsci is the tscircuit CLI. Install it with npm install -g tscircuit.

tsci clone MustafaMulla29/wireless-mouse-pcb  # download the package files into ./wireless-mouse-pcb
tsci add MustafaMulla29/wireless-mouse-pcb    # add it to your project as @tsci/MustafaMulla29.wireless-mouse-pcb

In a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.

enclosure/README.md

# Mouse enclosure — 44 × 70 mm PMW3610 board

A two-part printed shell (base + lid) with captive printed controls. It uses
the same construction, fasteners and coordinate convention as the
`rp2040-bldc-motor-controller` enclosure:

- 2.4 mm walls and a 2.4 mm floor, 4.3 mm side clearance around the PCB.
- M2 × 3 mm heat-set inserts (3.6 mm OD, 3.4 mm pilot).
- Case closed by four M2 × 4 mm screws from the underside, into inserts in
  lid flanges. Same flange radius, head seat and blind-hole depth as the BLDC lid.
- Captive plungers fitted from the underside of the lid. The power slider uses a
  printed retainer plate held by two M2 × 5 screws.
- Board-centred Z (z = 0 at the middle of the PCB), with native JSCAD CSG
  through `jscad-fiber` and a standalone Three.js assembly viewer.

The PCB is not changed. Its three existing 2.4 mm holes take M2, not the BLDC
board's M3 × 8 mounting screws. The PCB is held by M2 × 4 screws into M2 × 3
inserts in the base posts, so the whole mouse uses a single insert size.

## Geometry

| | |
| --- | --- |
| Footprint | 57.4 × 114.4 mm (the rear extension holds the battery) |
| Height | 34.2 mm above the tracking surface; palm peak at y = 28 |
| PCB top to surface | 7.40 mm (PMW3610 datasheet) |
| Base bottom to surface | 0.6 mm (0.8 mm skates in 0.2 mm recesses) |
| Wheel above the roof | 3.4 mm |

Controls:

- **Left/right buttons**: printed keys sit in windows in the roof. Each key's
  flange is captured under the roof and its stem pad rests 0.15 mm above the
  D2FC-F-7N actuator.
- **Scroll wheel**: 18 mm wheel with a Ø2 mm axle into the EC10E rotor. Its free
  end rides in a yoke resting on SW_MIDDLE, so pressing the wheel gives the middle
  click. Two lid guides keep the yoke upright.
- **DPI**: BLDC-style round plunger (same stem, bore, flange, pocket and guide
  radii).
- **Side buttons**: two horizontal plungers through the left wall onto the
  EVQPUC02K side-actuated switches.
- **Power**: BLDC-style captive slider with an open fork on the SS-12D00 lever.
  It travels ±1.75 mm along X, for an assumed 2.5 mm lever travel.
- USB-C opening (12.5 × 7 mm) and a Ø2 mm charge-LED window in the front wall.
- Lens opening in the base, relief pockets under through-hole leads, and a
  battery bay for a 20 × 30 × 6 mm 1S cell, held down by lid ribs.

## Print files and hardware

STLs are in `print/`, in assembly orientation, dropped to Z = 0. Re-orient them
in the slicer. Recommended: base flat; lid on its seam with supports under the
roof; keys upside-down on their caps; wheel on its side face; plungers upright.

| Item | Qty | Notes |
| --- | ---: | --- |
| base.stl, lid.stl | 1 each | |
| key-left.stl, key-right.stl | 1 each | |
| scroll-wheel.stl, wheel-yoke.stl | 1 each | Printed axle: consider a Ø2 mm pin if it is weak |
| dpi-plunger.stl | 1 | |
| side-plunger-1.stl, side-plunger-2.stl | 1 each | |
| power-slider.stl, power-retainer.stl | 1 each | |
| M2 × 3 mm heat-set insert | 9 | 3 PCB posts, 4 lid flanges, 2 power track; 3.4 mm pilots |
| M2 × 4 mm screw | 7 | 3 PCB, 4 case closing; head ≤ 3.9 mm dia, ≤ 1.3 mm high |
| M2 × 5 mm screw | 2 | Power retainer |
| PTFE skate strip 30 × 4 × 0.8 mm | 2 | Front and rear recesses |
| 1S protected LiPo ≤ 20 × 30 × 6 mm | 1 | e.g. 602030, JST-PH lead to J_BAT_PROTECTED |

## Assembly

1. Fit inserts: three in the base posts, four in the lid flanges (from below),
   two in the power track (from above). Let them cool.
2. Fit the PCB on the posts with three M2 × 4 screws. Place the battery in the bay
   and route its lead through the notch to J_BAT_PROTECTED.
3. Put the yoke on the wheel axle, push the axle tip into the encoder rotor, and
   rest the yoke on SW_MIDDLE.
4. With the lid inverted: drop in both keys, the DPI plunger and both side
   plungers from inside. Fit the power slider and screw on its retainer.
   Then set the slider and SW_POWER to the same end.
5. Lower the lid vertically and close it with four M2 × 4 screws from underneath.
   Stick on the skates.

## Regenerate and verify

The build runs with Bun and checks itself against the PCB it was designed for.
Reference extraction prefers `index.circuit.circuit.json` from a fresh local
build and falls back to the published `dist/index/circuit.json`:

```sh
bun run enclosure:reference   # after any PCB rebuild
bun run enclosure:build       # plans, STLs, clearance checks, native assembly
bun run enclosure:viewer      # writes viewer.html (open through any local web server)
```

`dist/build-report.json` records the results. The current build:

- 11 parts, all non-empty solids.
- 89 component envelopes and all 55 part pairs checked: no intersections. The
  only allowed contact is the wheel axle entering the encoder rotor.
- Standalone viewer generation from the same 11 checked printable solids.

Envelopes are conservative boxes taken from the supplier 3D models (C5157566,
C160888, C22355741, C456012, C42442560, C79172, C79174). These are
modelled-clearance checks, not a fit test.

## Check before printing

- **USB-C seating.** The C456012 model puts the receptacle face about 2.7 mm
  inside the PCB front edge. A plug overmold may stop on the board before it
  fully mates. Check with a real cable; this is a PCB placement question.
- **Lens opening.** 19 × 22 mm is an allowance, not taken from the PixArt LM18-LSI
  drawing.
- **Encoder.** Axis height (11.0 mm), the rotor bore and the axle D-flat come
  from the 3D model, not the Alps drawing.
- **D2FC actuator.** The 2.5 mm offset comes from the 3D model; the 4 × 5 mm stem
  pad tolerates about ±1 mm.
- **Power direction.** Which slider end is ON depends on wiring, so the lid has
  no ON/OFF marking.
- **Not reachable with the lid on:** SW_RESET (side-actuated, inside) and the SWD
  pads. The debug WLED is not visible.
- The PCB has three mounting holes. The rear-right antenna corner is left
  unsupported to keep plastic clear of the antenna.
- Physical fit, button feel, wheel feel and ergonomics have not been tested.