Preview build — page text is a draft awaiting human review. Code badges come from real compiles. The flasher is real but not yet hardware-tested; the Playground is still a preview.

Day 28 of 30 · about 37 minutes

Planning a real project: parts list and wiring plan

Today you build: A one-page plan for your water tank alarm

  • Read 4 min
  • Write the must-do list 5 min
  • Parts & current check 8 min
  • Pin table 6 min
  • Measure your tank 10 min
  • Real-world notes 4 min

Community draft — report a mistake

The last three days are one real project: a water tank level alarm, one of the most useful builds in an Indian home. Today you plan it on paper. An hour of planning saves a weekend of rewiring.

1. Write down what it must do

Be specific. For our alarm:

  • Show the tank level in % on a display.
  • Beep when the tank is nearly full (overflow warning).
  • Show when the pump should run: on below 25 %, off above 95 %.
  • If the sensor fails, say so and never signal “pump on”.
  • Run from a 5 V adapter and survive power cuts without setup.

Anything not on the list — Wi-Fi, phone alerts, logging — is a later upgrade. Finish version 1 first.

2. Choose the parts

Job Part Why
Measure level HC-SR04 (day 13) Cheap, no contact with water. For a wet, closed tank, a waterproof JSN-SR04T is better — see ultrasonic vs ToF sensors
Show level 16×2 I2C LCD (day 12) Readable from a distance, 4 wires
Overflow beep Passive buzzer (day 6) Already on your breadboard
Pump indicator LED + 220 Ω Stands in for the relay in this course
Brain Arduino Uno Everything here is 5 V — no level shifting

3. Check voltages and current

All parts run at 5 V, the same as the Uno — day 11’s rule is satisfied with no shifter. Rough current: Uno ~50 mA, LCD with backlight ~25–30 mA, HC-SR04 ~15 mA, buzzer and LED ~20 mA each. Well under the 500 mA a USB port or a 1 A phone charger gives. The current budget tool does this properly.

4. Assign pins

Signal Uno pin Notes
HC-SR04 TRIG 9
HC-SR04 ECHO 10
Buzzer 8 via 100 Ω
Pump LED 12 via 220 Ω
LCD SDA / SCL A4 / A5 I2C, address 0x27 or 0x3F
Everything’s 5V / GND 5V / GND use the breadboard rails

Keep pins 0 and 1 free (they’re USB serial), and note which pins have special jobs (PWM ~, I2C, interrupts) before you hand them out.

5. Measure the tank

You need two numbers for the code:

  • EMPTY_CM — distance from where the sensor will sit to the bottom (or the lowest useful level).
  • FULL_CM — distance to the overflow line. Keep at least 20 cm of gap: the sensor’s minimum range plus splashes.

6. Plan the real-world version

Write this down now, even though you won’t build it this week. In a real install the pump LED becomes a relay module driving a contactor, and the contactor switches the pump. That part runs on 230 V: a licensed electrician does it, with an MCB/RCCB and earth. The water tank alarm project shows that full design on an ESP32.

You’re done when…

  • You have one page (paper or a file) with the must-do list, the parts table, a rough current total and the pin table.
  • EMPTY_CM and FULL_CM are measured on your real tank (or a bucket standing in for it), not guessed.
  • The 230 V side is written down as “contactor, electrician only”.

Tomorrow: build day.

↑↓ to move · Enter to open