Skip to content
Ohmstead
Download

The example project

A walk through the built-in Arduino Parking Sensor template, device by device, from the 9 V supply to the printed sheet.

The example is the built-in Arduino Parking Sensor template. An Arduino UNO R3 times an HC-SR04 ultrasonic sensor, shows the distance on a 16x2 LCD and beeps a buzzer faster as the car gets closer, all from a 9 V wall adapter. It has 7 devices, 2 terminal strips and 17 wires on one level, with no subsystems or cables, so it reads in one pass. Fork it from the Gallery to follow along in your own copy.

The Arduino Parking Sensor drawing in Ohmstead: the supply, the UNO, two strips, the sensor, the LCD, the buzzer and its transistor

This is the live template: zoom and pan it. Each step's Show in drawing button brings you back here, zoomed to that step's devices with their wires lit. Project in the corner shows the whole thing again.

PS1 is a 9 V 1 A wall adapter. Its + lands on the UNO's VIN pin, which takes 7 to 12 V, and the board's own regulator makes the 5 V everything else runs on. Its - lands on GND1, the first of the UNO's three ground pins. The two wires carry different signal types, 9VDC (+) and 0VDC (-), so each draws in its own color and the schedule says which is which. The template hides the UNO's unused pins (the eye button on the canvas toolbar), so only the 10 wired ones show.

The wiring schedule with PS1's two rows picked
PS1's two rows in the wiring schedule: one row per wire, and the drawing is built from them.

Every device here is a component that points at a Codex part, and each wire's color comes from its signal type. The wiring schedule is where the rows are typed and edited.

The sensor, the LCD and the buzzer all need 5 V, and the sensor and the LCD need ground. A device terminal takes one wire, so U1:5V can't land three of them. Instead the UNO's 5V pin feeds TB1:1, and TB1 is three jumpered terminals with one load on each. TB2 does the same for ground from GND2: two jumpered terminals for the sensor and the LCD.

From To Signal
U1:5V TB1:1 5VDC (+)
TB1:1 B1:VCC 5VDC (+)
TB1:2 LCD1:VCC 5VDC (+)
TB1:3 BZ1:+ 5VDC (+)
U1:GND2 TB2:1 0VDC (-)
TB2:1 B1:GND 0VDC (-)
TB2:2 LCD1:GND 0VDC (-)
The Strips tab listing TB1 with three terminals and TB2 with two
The Strips tab: each terminal's block and what lands on its in and out sides.

You don't have to lay these out yourself. Wire U1:5V straight to all three loads and Fix all builds the strip. Terminal strips covers how.

B1 is an HC-SR04. The sketch pulses TRIG from D9, and the sensor answers on ECHO with a pulse as long as the sound's round trip, read on D10. Both are Digital I/O (5V). The ECHO row runs from the sensor to the board, the way the signal goes. Power comes from the strips: VCC from TB1:1, GND from TB2:1.

From To Signal
U1:D9 B1:TRIG Digital I/O (5V)
B1:ECHO U1:D10 Digital I/O (5V)

LCD1 is a 16x2 display with an I2C backpack, so it takes two signal wires instead of the display's usual sixteen pins. SDA and SCL go to the UNO's pins of the same name (on the R3 they're tied to A4 and A5), and the I2C signal type draws them dashed, like all comms. Power and ground come from TB1:2 and TB2:2.

From To Signal Note
U1:SDA LCD1:SDA I2C pull-ups
U1:SCL LCD1:SCL I2C pull-ups

I2C lines need pull-up resistors. Most backpacks have them on board, so the drawing has none, and both rows carry a note that says so: Most I2C backpacks have pull-ups. If yours has none, add 4.7 kΩ from SDA and SCL to 5 V. Notes print with the wire on the schedule.

BZ1 is a 5 V active buzzer. An UNO pin is good for about 20 mA, and a buzzer can want more, so the pin doesn't power it. BZ1:+ takes 5 V from TB1:3, and its - goes to the collector of Q1, an NPN PN2222A whose emitter sits on GND3. D8 drives the base through R1, a 1 kΩ resistor, which holds the pin's current near 4 mA: (5 V − 0.7 V) / 1 kΩ. When D8 goes high, Q1 closes the buzzer's path to ground. That's a low-side switch, the usual way to hang a small load off a microcontroller pin.

From To Signal Note
U1:D8 R1:1 Digital I/O (5V) Beeps faster as the car gets closer.
R1:2 Q1:B Digital I/O (5V) 1 kΩ base resistor
BZ1:- Q1:C Digital I/O (5V) The transistor switches the buzzer's low side
U1:GND3 Q1:E 0VDC (-)

The project's sizing standard is Low-voltage electronics (Sheet tab), the tables for dev boards, breakouts and header pins: ampacity down to 30 AWG and no minimum size on DC or signal wires. Every wire takes its gauge from its signal type, 22 AWG for the supplies and signals and 18 AWG for the 0 V returns. Open a row and its Sizing section shows the whole calculation.

The 9 V feed's row opened to its Sizing section, on the Low-voltage electronics standard
The 9 V feed into VIN, opened: 22 AWG from the signal type, 7 A of ampacity on a short run in open air, then the drop and fuse checks.

With no fan-outs, no signal clashes and no sizing warnings, the project shows no issues. Wire and fuse sizing explains the tables and the warnings.

Export PDF prints ANSI B (11×17") landscape sheets with a title block (this template's drawing number is OHM-T007), then the wire schedule. The drawing splits across print pages by itself, and the Sheet tab names the pages and fills in the title block.

The first printed sheet of the Arduino Parking Sensor, ANSI B landscape with its title block
Sheet 1 of 7: PS1 and the UNO, with each wire that leaves the page flagged to its sheet and zone.

PDF export and Print pages cover the rest.

The pages on subsystems, cables, harnesses and fuse sizing use the built-in Formula SAE EV Low-Voltage System template, which has all of those. It's in the Gallery too, with the ESP32, Raspberry Pi, motor starter and VFD templates.