Tinker Mission · Projects 01
Intrusion alarm
Guard a door with an invisible line. When the door opens, the infrared beam breaks and a buzzer sounds. It runs on batteries, so you can stick it anywhere. Then, if you like, add a phone alert or solder it into a permanent box.
- Level 1
- One afternoon (2–3 h (base build). Permanent version: add 2–3 h · estimate)
- About 50–85 CAD (estimate)
- Ask for help: steps 5, 6 and 7
Links
- Online sheettinkermission.com/en/projects/intrusion-alarm/
- The codetinkermission.com/sketches/01-intrusion-alarm.ino
- The lesson: Voltage, current, resistancetinkermission.com/en/lessons/voltage-current-resistance/
Scan a code with a phone camera to open the online sheet, download the code or read the lesson.
Safety first
- 3.3 V logic only. The receiver's output wire goes to
GPIO32and is pulled up to 3V3 only (the code turns on the board's built-in pull-up). The ESP32 uses 3.3 V logic (3.6 V absolute maximum): never connect any ESP32 signal pin to 5 V. The one exception is the board's own5Vpower pin, which takes the battery pack and nothing else. - The red rail is 3V3 only. The 4×AA pack goes into the
5Vpin row and the blue rail (−). Never put its + wire on a red rail. - The two packs are not interchangeable. The 4×AA pack (up to 6.4 V) is for the ESP32 only. The emitter is rated 5.5 V at most, so it takes the 3×AA pack, never 4 cells. Put a label on each: “ESP32 4×AA” and “EMITTER 3×AA”.
- Pack OFF before USB. The board takes one power source at a time. With the pack ON and USB plugged in, current can flow back into the cells. Switch the pack OFF before you plug in the USB cable, and before you move any wire.
- Batteries: never mix alkaline and rechargeable cells, old and new, or brands in one holder; replace all the cells at once. Follow the + / − marks inside the holder. Never let the bare ends of a pack touch each other or metal. Never recharge alkaline cells; recharge NiMH cells only in a NiMH charger, outside the box. No 9 V battery, no 5- or 6-cell holder, no LiPo for this mission. Take the cells out if the alarm sits unused for a month; white crust on a cell means it leaked, so wear gloves, clean it and dispose of it properly. Recycle used cells at a drop-off point.
- Keep the beam out of direct sunlight: sunlight contains infrared and can cause false alarms.
- Small parts and cells: keep small parts, wires and batteries away from pets and from anyone who might put them in their mouth.
Parts · Base build
- ×1 ESP32 boardESP32-DevKitC V4 or a clone: ESP32-WROOM-32, 38 pins, 3.3 V logic. Check the regulator before you buy or use it (step 2): the 3-legged chip with a big tab near the
5Vpin should say AMS1117. - 1 pair Infrared break-beam pair, 5 mm5 mm LED version (Adafruit 2168 type): emitter (2 wires, red and black) + receiver (3 wires: red +, black −, white or yellow OUT), open-collector output, supply 3.3–5.5 V. Rated range about 50 cm at 5 V; we use 15–20 cm, so there is margin. Test it.
- ×1 4×AA battery holder with ON/OFF switch, cover and header-pin endsSwitched 4×AA holder with a snap-on cover and 0.1 in (2.54 mm) pin ends that plug straight into the breadboard (Adafruit 830 type). Fresh alkaline cells give about 6.4 V, flat ones about 4 V. The board needs about 4.4–6.5 V: below that it misbehaves, so change the cells before they get that low.
- ×1 3×AA battery holder with ON/OFF switch and coverSwitched 3×AA holder, about 4.5 V. Three cells, never four: the emitter takes 5.5 V at most.
- ×7 AA batteriesAlkaline AA (LR6), or low-self-discharge NiMH AA (the kind sold as “ready to use”). Same type and brand in each holder, never mixed. 4×NiMH only if your regulator is not an AMS1117 (step 2).
- ×2 WAGO 221-412 lever connectors2-conductor lever connectors, one for red and one for black. If a wire is very thin, strip 11 mm and fold it back on itself so it fills the connector. (Alternative: if both the pack and the emitter have header-pin ends, 2 female-to-female jumpers.)
- ×1 220 Ω resistor220 Ω, 1/4 W, through-hole
- ×1 LED5 mm LED, any colour, through-hole
- ×1 Active buzzer moduleActive (built-in tone) buzzer module, 3 pins S / + / −, 3.3–5 V, sounds when S is HIGH. Test it in step 11: some modules are the other way round.
- ×1 Push button6 mm tactile switch, 4 legs
- ×1 BreadboardFull-size 830 points (fits a 38-pin ESP32)
- 1 set Jumper wiresMale-to-male, about 10–20 cm, 20 wires or more. Only if your 4×AA holder has bare wires instead of pin ends: 10 cm of 22 AWG solid wire, one red and one black.
- ×1 USB data cableData cable (not charge-only) matching the board's port. Used for programming only: the alarm itself runs on batteries.
Tools
- Computer with Arduino IDEArduino IDE 2.x + “esp32 by Espressif” 3.3.x (free download from arduino.cc)
- TapeDouble-sided tape, masking tape or blue tack (removable)
- Ruler or tape measure (optional)Any
- Sticky labels and a penAny
- Multimeter (optional)Any basic digital multimeter
Wiring
| # | Colour | From | To |
|---|---|---|---|
| 1 | red | ESP32 3V3 (hole j19) | 3V3 rail (right red +) |
| 2 | black | ESP32 GND (hole j6) | GND rail (right blue −) |
| 3 | red | 4×AA pack red (+) | the hole next to the ESP32 5V pin (j1). Never a red rail. |
| 4 | black | 4×AA pack black (−) | GND rail (right blue −) |
| 5 | red | IR receiver red (+) | 3V3 rail |
| 6 | black | IR receiver black (−) | GND rail |
| 7 | yellow | IR receiver OUT (white or yellow) | GPIO32 (j13; pulled up to 3V3 by the code, never to 5 V) |
| 8 | orange | ESP32 GPIO25 (j11) | buzzer S (j39) |
| 9 | red | 3V3 rail | buzzer + (j40) |
| 10 | black | buzzer − (j41) | GND rail |
| 11 | green | ESP32 GPIO26 (j10) | 220 Ω resistor, leg 1 (b26) |
| 12 | black | LED short leg (−) | GND rail |
| 13 | blue | ESP32 GPIO27 (j9) | button leg A (j44) |
| 14 | black | button leg B (diagonal) | GND rail |
| 15 | black | left blue rail | right blue rail (a link of GND) |
| E | red / black | emitter wires | 3×AA pack wires, through the two WAGO connectors, on the door. No wire to the ESP32. |
Hole names (j19, j6…) assume the board's pins sit in columns a and i of the breadboard, USB end at row 1 (step 3). The resistor's leg 2 and the LED's long leg (+) share the same breadboard row. The red rail on the right is 3V3 only; the left red rail stays unused.
| Pin | Goes to | Role |
|---|---|---|
| 5V | 4×AA pack + (the only thing that goes here) | Power in (about 4.4–6.5 V; below that it misbehaves) |
| 3V3 | 3V3 rail: IR receiver +, buzzer + | Power out (3.3 V) |
| GND | GND rail: pack −, IR receiver −, buzzer −, LED, button | Ground |
| GPIO32 | IR receiver OUT | Input with internal pull-up (LOW = beam broken). Wakes the board from deep sleep. |
| GPIO25 | Buzzer S | Output |
| GPIO26 | 220 Ω → LED | Output |
| GPIO27 | Button (other leg to GND) | Input with internal pull-up. Wakes the board from deep sleep. |
Build steps · Base build
1 Lay out your parts.
Check: Every part in the list is on the table.
2 Check your board.
Look at the little 3-legged chip with a big flat tab, next to the
5Vpin. Read what is printed on it. If it says AMS1117 (the original board uses it), 4 alkaline cells are fine. If it is tiny, has 5 legs or has no marking, use 4 NiMH cells only (they give a lower voltage). Also read the labels printed on the board next to the pins: on clones the order can differ from this sheet, and your labels win.Check: You know which chip regulates your board, and you have found the pins
5V,GND,3V3,25,26,27and32by their printed labels.3 Place the ESP32.
Press the board across the middle gap, so its two rows of pins land in columns a and i, rows 1 to 19. USB port at row 1, antenna toward row 20. Leave rows 20–23 empty: that is where the antenna sits. Each pin on the j side now has a free hole next to it (column j). No cable yet.
Check: The board sits flat, no pin is bent, and the pin
5Vis in row 1, column i.4 Rails.
Wire the ESP32 pin
3V3(hole j19) to the right red (+) rail and the pinGND(hole j6) to the right blue (−) rail. Then link the left blue rail to the right blue rail with one wire. The right red rail is now 3V3 only.Check: Red wire on the red rail, black wire on the blue rail, and nothing else touches the red rail yet.
5 Wire the receiver. · Ask for help
Pack and USB both off. Receiver red wire to the 3V3 rail, black wire to the GND rail, white or yellow wire (OUT) to
GPIO32(hole j13). Not 5 V.Check: Someone experienced (or you, twice) has checked that red is on 3V3 and OUT is on GPIO32 only.
6 Power the ESP32 from its pack. · Ask for help
Put 4 cells in the 4×AA holder, matching the + / − marks. Switch it OFF. Label it “ESP32 4×AA”. Plug its black pin end into the right blue (−) rail and its red pin end into the hole next to the
5Vpin (j1). Never into a red rail. Leave the switch OFF.Check: Red goes to the
5Vrow, black to the blue rail, the switch is OFF, and someone experienced (or you, twice) has checked it.7 Prepare the emitter's pack. · Ask for help
Put 3 cells in the 3×AA holder, matching the marks. Switch it OFF and label it “EMITTER 3×AA”. Open the lever of a WAGO connector, push in the pack's red wire and the emitter's red wire (strip about 11 mm), close the lever. Same with a second WAGO for the two black wires. Give each wire a gentle tug: it must hold. Red to red, black to black. No wire goes to the ESP32.
Check: Red is joined to red, black to black, the switch is OFF, and nothing from the emitter touches the breadboard or the ESP32.
8 Upload the code.
Both packs OFF. Install the board package, open the sketch, plug in the USB cable, choose “ESP32 Dev Module”, upload. Unplug the USB cable when it is done.
Check: “Done uploading” appears.
9 Test the beam on the table.
Emitter and receiver on the table, about 15 cm apart, facing each other. Switch the emitter's pack ON. Plug in the USB cable and open the Serial Monitor at 115200 baud (pack for the ESP32 stays OFF). The board starts in test mode, which lasts 90 seconds after power-on or reset: the monitor prints “clear” or “broken” each time the beam changes. Press EN (reset) to restart the 90 seconds whenever you need. You should see “clear”. Pass your hand between the modules.
Check: The monitor says “broken” while your hand blocks the beam and “clear” otherwise.
10 Fix swapped words (only if needed).
If the monitor shows “broken” when nothing blocks the beam, find
const int BROKEN = LOW;in the code, changeLOWtoHIGH, upload again.Check: “clear” with nothing in the way, “broken” with your hand.
11 Add the buzzer.
Everything OFF and unplugged. Buzzer
StoGPIO25,+to the 3V3 rail,−to the GND rail (follow the labels on your module). Test it: at the end of the 90 s test mode (press EN to start it again) the buzzer gives one short chirp (0.2 s). That chirp is the buzzer test; you hear the real alarm in step 17. If the buzzer is silent at the chirp and sounds the rest of the time, your module works the other way round: changeBUZZER_ONin the code.Check: The buzzer gives one short chirp at the end of test mode and is silent otherwise. A buzzer that sounds all the time would empty the batteries in a night.
12 Add the LED.
GPIO26→ 220 Ω resistor → long leg (+) of the LED. Short leg to the GND rail.Check: The long leg faces the resistor side.
13 Add the arm button.
One leg to
GPIO27, the opposite leg to the GND rail. No resistor needed: the code turns on the board's internal pull-up.Check: The two wired legs are diagonal from each other (not on the same side).
14 Stick the emitter, its pack and the receiver on the door.
Close the door. Stick the emitter and its 3×AA pack on the door leaf and the receiver on the frame or the wall next to it, at the same height, facing each other 15–20 cm apart (use the ruler), with both lenses clear of the door trim or moulding. Keep the pack's switch within reach. No wire may cross the gap of the door. Keep the beam out of direct sunlight. Do not press the tape down for good yet.
Check: Both modules face each other at the same height, and the only wires on the door leaf are the emitter's, joined to its own pack.
15 Align it with the door closed.
Switch the emitter's pack ON. Plug the ESP32 into USB (its pack stays OFF) and open the Serial Monitor. Test mode runs for 90 seconds, and the LED is lit while the beam is broken (press EN to restart the test). With the door closed you should see “clear”. Nudge the emitter or the receiver slightly in every direction: it should stay “clear” with a little room to spare. Then press the tape down.
Check: “clear” stays steady with the door closed, even when you tap the door gently.
16 Test by opening the door.
Press EN to restart the 90 s test mode. Open the door slowly, then close it. Do it three times.
Check: “broken” appears when the door opens, “clear” returns when it is closed, every time.
17 Test like a spy.
Unplug USB. Switch the ESP32's pack ON: the 90 s test mode runs, ends with a short chirp, then the LED blinks twice (disarmed). Press the button: the LED blinks once a second for 10 seconds, so you can leave and close the door behind you. Then one long flash: the alarm is armed. Open the door: the buzzer sounds. Press the button to silence it.
Check: The buzzer sounds when the door opens. Press the button: it stops and the alarm is disarmed (two short blinks).
What the LED tells you (deep sleep, in plain words)
| What you see | What it means |
|---|---|
| Lit while the beam is broken (first 90 s) | Test mode, after switching on or pressing EN. The LED shows what the receiver sees. A short chirp from the buzzer ends it. |
| Two short blinks | Board just switched on, or alarm disarmed. Nothing is watching. |
| One blink per second for 10 s | Arming. You have 10 seconds to leave and close the door. Press the button again to cancel. |
| One long flash | Armed. The beam was clear and the alarm is watching. |
| One tiny flash every 30 s | Armed and asleep. It woke up for a moment and went back to sleep. |
| Fast blinking for 2 s, and it stays disarmed | The beam is already broken when you press the button: check the emitter (switched on? aimed? door closed?). |
| One blink per second for up to 60 s, then fast blinking, and it stays disarmed | The door was still open at the end of the 10 s countdown. It waits up to 60 s for you to close it, then gives up. |
| Fast blinking and the buzzer | Alarm! It rings for 30 seconds. Press the button to stop it at once. |
| One tiny flash every 5 s | After an alarm, waiting for the door to close: the board checks every 5 s whether the beam is back. |
Make it permanent
Soldering safety
- Lead-free solder with a flux core (0.8 mm is easy to use).
- Iron with a stand and a temperature setting, at 325–375 °C. Turn it down if the solder smokes.
- Ventilation: open a window, or use a small fan with a filter that draws the smoke away from your face.
- Safety glasses: clipped wire ends and solder can fly.
- The iron lives in its stand whenever you are not using it. Never touch the tip or the metal shaft. Work on a heat-proof mat. Unplug the iron when you stop. A burn: cool running water for at least 10 minutes.
- Hold the board with a clamp (“helping hands”), not your fingers.
- Nothing powered while you solder: batteries out of the holder, ESP32 unplugged from its sockets, USB unplugged.
- Wash your hands afterwards, and keep food away from the bench.
- Ask someone who has soldered before to watch your first five joints.
Parts for the permanent version
- ×1 Breadboard-pattern perfboard, full sizeFull-size, same rows, 5-hole strips and rails as the breadboard (Adafruit Perma-Proto Full-sized 1606 type: 157 × 51 mm, 3 mounting holes). Full size, not half, so the layout copies 1:1.
- 2 strips: 1×40 + 1×20 Female header, 2.54 mmSingle row, 2.54 mm pitch, long pins. The 1×40 gives the two 19-socket rows for the ESP32, the 1×20 gives the 3-socket row for the buzzer (H3). Cut with a flush cutter; you lose one socket at each cut.
- 1 × 2-pole, 1 × 3-pole Screw terminals, 5.0 / 5.08 mm pitchPCB-mount, wire entry facing out (KF301 / DG301 type).
- 1 set Solid hook-up wire, 22 AWG, several coloursInsulated, red, black, yellow, orange, green, blue.
- 1 reel Lead-free solder, flux core0.8 mm, for example Sn99.3/Cu0.7 or SAC305.
- 6 flat-head M3 × 10, 3 pan-head M3 × 6–8 M3 screwsFlat-head (countersunk): 4 for the lid, 2 for the battery hatch. Pan-head: 3 to hold the board on its printed standoffs (M2.5 also works).
Tools for the permanent version
- Soldering iron with stand and temperature control
- Multimeter
- Safety glasses
- Helping-hands clamp or board holder
- Flush cutter and wire stripper
- Small fan with a filter (or an open window) (optional)
Row 1 is at the USB edge of the perfboard. Rows run along the long side. Columns a–e and f–j are on either side of the middle gap, like the breadboard. Solder from the underside; the parts sit on the top.
Soldering steps
P1 Set up a safe bench. · Ask for help
Read the soldering safety list. Window open or fan on, glasses on, iron in its stand on a heat-proof mat, board in the clamp. Ask someone who has soldered before to be there for your first five joints.
Check: Someone experienced is with you, and the iron is hot only when you need it.
P2 Fit the ESP32 sockets.
Plug the two 1×19 female headers onto the pins of the ESP32 (this keeps them lined up). Drop the board and headers onto the perfboard: one header in column a, rows 1–19, the other in column i, rows 1–19, with the USB end at row 1. Turn the whole thing over and solder one pin at each end of each header. Check it sits flat and straight, then solder the remaining pins. Pull the ESP32 out and put it aside.
Check: The sockets stand straight, and each pin is a small shiny cone of solder, not a blob.
P3 Solder the terminals and the buzzer socket.
J1 (2-pole): + at h25, − at h27. J2 (3-pole, for the receiver): + at h31, − at h33, OUT at h35. All openings face the right edge. H3 (1×3 female header, for the buzzer): h39 = S, h40 = +, h41 = − (match the order printed on your module).
Check: Each terminal sits flat on the board with its openings facing the right edge.
P4 Solder the resistor, the LED and the button.
R1 (220 Ω), lying flat: from d26 to d30. D1 (LED): long leg (+) in b30, short leg (−) in b31. Leave a30, a31, c30 and c31 empty. SW1 (button): straddling the middle gap, legs in e44, f44, e46, f46. Clip the extra leg length after soldering.
Check: The LED's long leg is in b30, and the button sits flat.
P5 Solder the power wires (W1 to W4).
Insulated 22 AWG wire, flat on the top, soldered from the underside. W1 red: f1 → f25 (the
5Vpin to J1 +). W2 black: j27 → right − rail (J1 − to GND). W3 red: j19 → right + rail (3V3 rail). W4 black: j6 → right − rail (GND rail). Wires may cross over each other: they are insulated.Check: W1 goes to J1 + and nowhere near the + rail.
P6 Solder the receiver wires (W5 to W7).
W5 red: j31 → right + rail. W6 black: j33 → right − rail. W7 yellow: g13 → f35 (
GPIO32to receiver OUT).Check: Three wires, three colours, each in the holes listed.
P7 Solder the buzzer wires (W8 to W10).
W8 orange: h11 → f39 (
GPIO25to buzzer S). W9 red: j40 → right + rail. W10 black: j41 → right − rail.Check: S has its own wire; + and − go to the rails.
P8 Solder the LED and button wires (W11 to W15).
W11 green: g10 → b26 (
GPIO26to row 26, the R1 strip). W12 black: d31 → left − rail, around row 34 (LED −). W13 blue: f9 → h44 (GPIO27to the button, diagonal leg f44). W14 black: a46 → left − rail (button's other diagonal leg e46). W15 black: left − rail → right − rail, around row 52.Check: All 15 wires are in. Keep a 6 mm circle around each mounting hole free of wires and parts, and rows 20–23 free.
P9 Look at the underside.
In good light, look for a blob of solder that joins two strips, or a strip and a rail. Remove any blob with the iron (and desoldering braid if you have it).
Check: No bridge between neighbouring joints.
P10 Multimeter checks, packs OFF and ESP32 not plugged in. · Ask for help
Continuity (beep) mode. Must NOT beep: right + rail to right − rail; socket i1 (5V) to the + rail; socket i1 to the − rail; neighbouring sockets i1 to i19 with each other (only i6 may beep to GND parts). Must beep: J1 + to socket i1; J1 − to socket i6 and to a19; socket i19 to the + rail; i13 to J2 OUT; i11 to H3 S; i10 to R1 (row 26). The button: socket i9 to the − rail beeps only while pressed (if it beeps all the time, look for a solder bridge on rows 44–46). LED: diode test, red probe on row 30, black on the − rail: it glows faintly, and a red LED reads about 1.6–2.0 V (blue or white 2.6–3.2 V, or OL).
Check: Every “no beep” is silent and every “beep” beeps.
P11 Check the packs, then the key test. · Ask for help
Put the cells in the ESP32 holder, switch ON and read the DC voltage on its wires: +5.6 to +6.5 V (alkaline) or +5.0 to +5.6 V (NiMH). A minus sign means the wires are swapped. Switch OFF and screw the wires into J1 (red = +). Now the key test, with the ESP32 still unplugged: switch the pack ON, then measure the socket i1 to GND: you read the pack voltage. Measure the + rail to GND: it must read 0 V.
Check: The + rail reads 0 V. If it shows the pack voltage: STOP. The 5V line touches the 3V3 rail, and it would destroy the ESP32. Switch OFF, find the bridge, fix it.
P12 Plug in the ESP32.
Pack OFF. Plug the ESP32 into its sockets, USB end at row 1, pin
5Vin socket i1. Switch the pack ON: the red power LED on the board lights, and the + rail reads 3.2–3.4 V. Check the emitter pack too: 4.0–4.8 V, before you join it to the emitter.Check: Power LED on, 3V3 rail at about 3.3 V.
P13 Run the tests again.
Repeat steps 9 to 17 of the base build (beam, buzzer, LED, button, door) on your soldered board.
Check: It behaves exactly like the breadboard version.
P14 Put it in the box.
Print the perfboard box, its lid, the battery hatch, the long button pusher and the emitter holder (files: see “3D files” below). Settings in Bambu Studio: Bambu Lab X1 Carbon 0.4 mm nozzle, Bambu PLA Basic, 0.20 mm Standard, 4 walls, 15 % gyroid, supports off, no brim; each file opens as one plate. Estimated time: about 9 hours in all (box 5 h 20, lid 1 h 40, emitter holder 1 h 05, hatch 40 min, pusher 8 min), from another slicer; the parts are not test-printed yet. The board sits on 3 printed standoffs (3 pan-head screws), the lid takes 4 flat-head M3 × 10 screws, and the battery hatch 2 more, so you change the cells without opening the lid. The 4×AA pack lies in its own bay with its switch reachable through a window in the hatch (measure your holder first: sizes vary by a few mm). The box also has a slot for the micro-USB port, with “PACK OFF” embossed next to it (pack OFF first), a window and light tube for the LED, the long pusher over SW1, sound holes for the buzzer, and a cable exit for the receiver wires. It is not airtight: leave the vent slots open. The emitter goes in its own printed holder on the door: it snaps in, and the 3×AA pack sits in a cradle held by a hook-and-loop strap (20 mm wide, about 25 cm). If you stay on the breadboard, a box exists for the 830 board too.
Check: The pack's switch (through the hatch window), the button and the USB port are reachable, and the vent slots are open.
3D files
| Part | Printed size | Print time · filament | Files |
|---|---|---|---|
| Breadboard box (solder-free 830-point version) | 216 × 130 × 32 mm | ~4 h 25 · ~123 g | tm01_box_breadboard (.3mf, .stl) |
| Lid of the breadboard box | 216 × 60 mm | ~1 h 15 · ~35 g | tm01_lid_breadboard (.3mf, .stl) |
| Button pusher (breadboard box) | Ø6 × 4.7 mm | 2 min | tm01_pusher_breadboard (.3mf, .stl) |
| Perfboard box (permanent version) | 188 × 144 × 38 mm | 5 h 20 · 144 g | tm01_box_perfboard (.3mf, .stl) |
| Lid of the perfboard box | 188 × 75 mm | 1 h 40 · 38 g | tm01_lid_perfboard (.3mf, .stl) |
| Long button pusher (perfboard box) | Ø4 × 27.9 mm | 8 min (×2) | tm01_pusher_perfboard (.3mf, .stl) |
| Battery hatch (both boxes) | 86 × 69 × 2 mm | 37 min · 12 g | tm01_hatch (.3mf, .stl) |
| Emitter holder for the door | 119 × 55 × 18.6 mm | 1 h 05 · 25 g | tm01_emitter (.3mf, .stl) |
Bambu Studio settings: Bambu Lab X1 Carbon 0.4 nozzle · Bambu PLA Basic · 0.20 mm Standard · 4 walls · 15 % gyroid infill · supports off · no brim. Print each part in the orientation of the file. Two colours: if the text loads merged into the part, right-click it, Split, To parts, and give the text part filament 2.
Measure first: Before printing, measure your own parts with a ruler or calipers: both battery holders (size and where the switch is), the breadboard or perfboard, the USB plug and the buzzer. Listings vary by a few millimetres. If one is different, change its size in the OpenSCAD file, or print a small test corner first. Too tight: clearance 0.4 mm; too loose: 0.2 mm.
My notes
Regulator chip says: AMS1117 / other
Words on my module (“clear” / “broken”)
BROKEN = LOW or HIGH; BUZZER_ON = HIGH or LOW
Emitter to receiver distance (cm)
Date I put in new batteries