USB laser switch

Carrier board and case mockup

A parametric OpenSCAD model of the whole assembly: the RP2040-Zero, a single-sided through-hole carrier board that holds the module and the laser switch circuit (circuit.md), and a two-piece printed case in two versions.

  Molex version Cable version
Laser connection Vertical 2-pin 0.1” female header. It hangs under the board and plugs in from the bottom of the case AM2464 cable (2 × 20 AWG, 3.4 mm) soldered into the board
Closing the case Glue 2 × M2×8 self-tapping screws, put in from the bottom through the cable clamp
Outside size (L × W × H) 42.6 × 26.6 × 15.65 mm 52.1 × 26.6 × 14.65 mm

Exploded, cable version Exploded, Molex version

RP2040-Zero (as modelled)

Module

The part positions come from a 3D scan of the module (scan/rp2040-zero-scan.stl). The scan has two patches, the top and the bottom. Each was laid flat and turned into a height map, and the raised parts were measured from those maps.

Top-side model outlines on the scan Bottom-side model outlines on the scan
Top Bottom

Carrier board

Carrier layout

Single-sided, through-hole. 39 × 23 mm, 1.6 mm FR4, copper on one side only.

Ref Part Mounting
R1 1 kΩ, 1/4 W axial Lying flat, 10.16 mm (0.4”) hole spacing
R2 10 kΩ, 1/4 W axial Lying flat, 10.16 mm hole spacing
Q1 2N3904 or PN2222A, TO-92 Standing, legs spread to 2.54 mm, order E-B-C
J1 2-pin 0.1” vertical female header (Molex version) or the two cable wires 1.1 mm holes, 2.54 mm apart. Pin 1 = +5V, pin 2 = LASER−

Check Q1’s pinout. 2N3904 and PN2222A in TO-92 are E-B-C, reading left to right with the flat face toward you and the legs down. Some parts sold as “2N2222” in TO-92 are C-B-E, which would fit the board backwards.

Parts under the board

Build order

  1. Put R1, R2 and Q1 in from the plain side (and the header, for the Molex version). Bend the leads over a little so the parts stay put.
  2. Turn the board copper side up. Solder and trim the leads.
  3. Set the module on its pads, lined up with the USB end of the carrier, and solder the castellations.
  4. Cable version: push the two wires up through J1 from the plain side and solder them on the copper side.

You turn the board over once, after step 1, and do all the soldering from then on without turning it again.

Case

Section, cable version

Section through the middle (cut surfaces shown in gold). Left to right: USB opening, module on the carrier, R1 and R2 under the board, Q1 standing, the wires coming up into J1, and the cable clamp.

Bottom half, cable version

Fit-test mockups

just stl also writes two printable stand-ins for testing the case before the real board exists:

Mockup assembly

Measure before printing

These are estimates. Check them against the real parts and change the matching parameter in the .scad file:

What Parameter Current value
Distance from the USB end to the first castellation pin_off 1.59 (assumes the pins are centered)
How far the USB-C sticks out past the board edge (the scan doesn’t show it) usb_protrude 1.25
Header body size (stand-in for the Molex part) hdr_body 2.54 × 5.08 × 8.5
TO-92 height below the board q1_body, q1_standoff 4.5 body + 1.0 legs

The button, LED and USB positions now come from the scan, which should be good to about ±0.2 mm.

Open questions