Use the classic ATmega328P Arduino Nano with 5 V logic, not a Nano ESP32 or another 3.3 V variant. Compare the official Nano pinout with your module before soldering socket rows. The Nano USB end is at the left of this turned footprint. Spare pins, including VIN, remain unused intentionally.
Sensor header J2: VCC goes to +5V, TRIG to D2, ECHO to D3 and GND to the common return. J2 represents a cable header, not the sensor's physical body. Match the HC-SR04's printed pin names; do not assume a cable preserves their order. Mount the transducers facing away from the board with a clear sound path.
The HC-SR04 datasheet calls for a trigger pulse at least 10 µs high and recommends measurement cycles longer than 60 ms. Firmware times the ECHO high pulse to estimate round-trip travel. Give the read a finite timeout; a missing echo is an invalid measurement, not a nearby object. Soft, angled or small targets can give unreliable returns. This is a maker demonstration, not a collision-prevention device.
Buzzer header J3: D5 reaches the passive piezo's positive terminal through R1, a 1 kΩ resistor. Its other terminal goes to GND, with R2, 10 kΩ, across the piezo. Use a capacitive passive piezo transducer, not a magnetic buzzer, speaker or unknown active module. Call Arduino's tone function on D5 for sound and noTone to stop. A steady HIGH will not make a sustained tone from a passive transducer.
For an ideal 5 V pin and a zero-voltage load, the site's Ohm's law library computes 5 mA through R1. This is a feed-current bound, not the piezo's continuous current or a loudness prediction. The conservative resistor makes a quiet indicator; use a separately designed driver if you need more sound. R2 provides a discharge path. This circuit does not need a flyback diode because the specified transducer is capacitive.
Power: J1 takes regulated 5 V, with C1 ceramic bypass and polarized C2 bulk capacitance near the sensor header. Both Nano ground pins join the return. Use one power source at a time: disconnect J1 before USB programming, with external peripherals unpowered. Do not feed 9 V into the 5V header. ECHO is a 5 V signal here; a 3.3 V controller needs a different design with suitable level conversion.
Use isolated-pad perfboard with insulated jumpers. The top-row junctions are individual endpoints, not a continuous copper bus. Wire crossings are not solder joints. The checker verifies continuity and shorts, not ultrasonic measurements or firmware. No sketch is included: initialize TRIG low, implement the timing and timeout, and choose your own valid-distance alarm threshold.