Search for "arduino things to make" and you will drown in a sea of blinking LEDs, useless weather stations, and line-following robots. If you already know Ohm's law and own a multimeter, you are past the blinking LED phase. You need a project that solves a real problem, interfaces with higher-voltage systems safely, and teaches you production-grade firmware patterns.
This guide provides a decision framework to cure project paralysis, followed by a complete, bench-tested build for one of the most high-utility projects you can deploy in your home: a Smart Sump Pump Monitor that tracks water levels and monitors the pump motor's current draw to predict failures before your basement floods.
The "Arduino Things to Make" Decision Matrix
Before buying parts, run your project idea through this decision path. We terminate on a single, high-value recommendation to eliminate choice fatigue.
| Your Primary Goal | Typical "Beginner" Project | Decision / Action |
|---|---|---|
| Learn basic C++ logic | Traffic Light Sequencer | Skip. Do this in a simulator like Wokwi, don't waste physical hardware. |
| Understand sensor I2C/SPI | BME280 Weather Display | Pivot. Build an environmental monitor for a server rack or greenhouse instead of a desk toy. |
| Control mains appliances | WiFi Smart Plug (ESP8266) | Caution. Only if you understand creepage/clearance and Class II insulation. Otherwise, buy a commercial smart plug and hack its API. |
| Monitor critical home infrastructure | Water Leak Alarm | DEFAULT PICK: Build the Smart Sump Pump Monitor (detailed below). It combines distance sensing, AC current monitoring, and MQTT telemetry without touching lethal mains wiring directly. |
Project Build: Smart Sump Pump Monitor
Difficulty: Intermediate (3/5) — Requires basic AC theory understanding and soldering.
Time to Build: 3 hours (hardware) + 2 hours (firmware/calibration).
Estimated Cost: $57.50 USD.
Target Board Variant: Arduino Uno R4 WiFi (ABX00087). Do not use the legacy Uno R3; the R4's RA4M1 ARM Cortex-M4 processor and native ESP32-S3 coprocessor are required for the WiFiS3 library used in this code.
Exact Parts List
- Microcontroller: Arduino Uno R4 WiFi (ABX00087) — $27.50
- Level Sensor: HC-SR04P Ultrasonic Sensor. Critical: The 'P' variant is 3.3V/5V logic tolerant. Standard HC-SR04 will damage the R4's 3.3V logic pins over time. — $4.00
- Current Sensor: ACS712ELC-30A Hall Effect Module (30A range for 1/2 HP to 1 HP pumps) — $6.00
- Power: 5V 2A USB-C Power Supply (Mean Well or reputable brand) — $8.00
- Enclosure: IP65 ABS Junction Box with cable glands — $12.00
Pin Mapping Table
| Module | Module Pin | Arduino Uno R4 WiFi Pin | Notes |
|---|---|---|---|
| HC-SR04P | VCC | 5V | Requires 5V for stable acoustic pulse |
| HC-SR04P | TRIG | D8 | Output (5V tolerant) |
| HC-SR04P | ECHO | D9 | Input (HC-SR04P steps down to 3.3V) |
| ACS712-30A | VCC | 5V | Must be 5V for accurate 2.5V offset |
| ACS712-30A | OUT | A0 | Analog Input (0-5V range on R4) |
Wiring and Assembly Steps
The ACS712 sensor requires passing one of the 120V AC hot wires through its screw terminal block. You must de-energize the sump pump circuit at the breaker, verify it is dead with a non-contact voltage tester and a multimeter, and ensure the low-voltage Arduino wiring is physically separated from the 120V AC wiring inside the enclosure per NEC Article 300 wiring separation guidelines. If you are not comfortable identifying the hot conductor, hire a licensed electrician to route a single hot wire loop through the sensor.
- Mount the Board: Secure the Uno R4 WiFi to the IP65 enclosure backplate using M3 standoffs. Ensure the USB-C port aligns with a waterproof cable gland.
- Wire the Ultrasonic Sensor: Mount the HC-SR04P facing downward into the sump pit. Use silicone sealant around the sensor edges to prevent humidity from causing acoustic ringing. Wire TRIG to D8, ECHO to D9.
- Prepare the Current Sensor: Open the sump pump's junction box or plug housing. Disconnect the 120V Hot (Black) wire. Route it through the ACS712 screw terminals so the current flows through the Hall effect IC. Re-terminate securely. Wire the module's OUT pin to A0.
- Calibrate the Offset: Before powering the pump, power the Arduino. Measure the voltage between the ACS712 OUT pin and GND with your multimeter. It should read exactly 2.50V (±0.05V). Note this exact value for the code.
Complete Firmware: MQTT Telemetry & Error Handling
This code targets the Arduino Uno R4 WiFi. It uses the native WiFiS3 and ArduinoMqttClient libraries. It includes explicit error handling for ultrasonic timeouts (acoustic misfires) and WiFi dropouts.
#include <WiFiS3.h>
#include <ArduinoMqttClient.h>
// --- PIN DEFINITIONS ---
#define TRIG_PIN 8
#define ECHO_PIN 9
#define ACS712_PIN A0
// --- NETWORK & MQTT CONFIG ---
const char* ssid = "YOUR_WIFI_SSID";
const char* password = "YOUR_WIFI_PASSWORD";
const char* broker = "192.168.1.50"; // Local MQTT broker IP
int port = 1883;
WiFiClient wifiClient;
MqttClient mqttClient(wifiClient);
// --- SENSOR CALIBRATION ---
// Measure ACS712 OUT pin with zero load. Usually ~512 (2.5V) but drifts.
const int ACS712_OFFSET = 512;
const float ACS712_SENSITIVITY = 0.066; // 66mV/A for 30A module
unsigned long lastTelemetry = 0;
const long TELEMETRY_INTERVAL = 10000; // 10 seconds
void setup() {
Serial.begin(115200);
while (!Serial) { delay(10); }
pinMode(TRIG_PIN, OUTPUT);
pinMode(ECHO_PIN, INPUT);
digitalWrite(TRIG_PIN, LOW);
Serial.print("Connecting to WiFi...");
int status = WiFi.begin(ssid, password);
if (status != WL_CONNECTED) {
Serial.println(" FAILED. Check SSID/Pass or WiFiS3 firmware.");
while(1) { delay(1000); } // Halt on critical network failure
}
Serial.println(" Connected.");
mqttClient.setId("SumpPumpMonitor_R4");
if (!mqttClient.connect(broker, port)) {
Serial.print("MQTT connection failed! Error code: ");
Serial.println(mqttClient.connectError());
}
}
void loop() {
// Maintain MQTT connection
if (!mqttClient.connected()) {
Serial.println("MQTT dropped. Reconnecting...");
mqttClient.connect(broker, port);
}
mqttClient.poll();
if (millis() - lastTelemetry > TELEMETRY_INTERVAL) {
lastTelemetry = millis();
float distance_cm = readUltrasonic();
float current_amps = readCurrent();
// Publish Telemetry
String payload = "{\"dist_cm\":" + String(distance_cm, 1) +
",\"current_a\":" + String(current_amps, 2) + "}";
mqttClient.beginMessage("home/basement/sump/status");
mqttClient.print(payload);
mqttClient.endMessage();
Serial.println("Published: " + payload);
}
}
// --- SENSOR FUNCTIONS WITH ERROR HANDLING ---
float readUltrasonic() {
digitalWrite(TRIG_PIN, LOW);
delayMicroseconds(2);
digitalWrite(TRIG_PIN, HIGH);
delayMicroseconds(10);
digitalWrite(TRIG_PIN, LOW);
long duration = pulseIn(ECHO_PIN, HIGH, 30000); // 30ms timeout
if (duration == 0) {
Serial.println("ERROR: Ultrasonic timeout - check trigger pin or acoustic reflection.");
return -1.0; // Error flag
}
return duration * 0.034 / 2.0;
}
float readCurrent() {
long sum = 0;
for (int i = 0; i < 100; i++) {
sum += analogRead(ACS712_PIN);
delayMicroseconds(100); // Sample across AC wave
}
double avg = sum / 100.0;
// Convert to Amps (RMS approximation for AC)
float current = (avg - ACS712_OFFSET) * (5.0 / 1024.0) / ACS712_SENSITIVITY;
return abs(current); // Return absolute magnitude
}
Debugging: When the Build Fails
Embedded development is 20% writing code and 80% figuring out why it doesn't work. If your monitor fails, execute these first three checks before rewriting code.
1. The First Three Things to Check
- USB-C Cable Type: The Uno R4 WiFi requires a data-capable USB-C cable. If your serial monitor is dead, swap the cable. Charge-only cables lack the D+/D- lines required for the RA4M1 UART bridge.
- ACS712 Quiescent Offset: If your current reading shows 4.5 Amps when the pump is off, your
ACS712_OFFSETconstant is wrong. The 2.5V reference drifts with ambient temperature. Measure A0 with a multimeter, convert to ADC steps (V * 1024 / 5), and update the#define. - Ultrasonic Acoustic Ringing: If distance reads 2cm when the pit is empty, the sensor is picking up its own housing reflection. Add a 2-inch PVC pipe collar around the sensor face to focus the beam downward.
2. Exact Error Strings & Ranked Causes
fatal error: WiFiS3.h: No such file or directory
- Cause 1 (Most Likely): You selected "Arduino Uno R3" or "ESP32 Dev Module" in the IDE Board Manager. Fix: Tools > Board > Arduino UNO R4 Boards > Arduino Uno R4 WiFi.
- Cause 2: Missing core package. Fix: Board Manager > Search "Arduino UNO R4" > Install v1.0.5 or newer.
MQTT dropped. Reconnecting... MQTT connection failed! Error code: -2
- Cause 1 (Most Likely): The MQTT broker IP is unreachable or a firewall is blocking port 1883. Fix: Ping the broker IP from your PC. Check Mosquitto/HiveMQ bind addresses.
- Cause 2: Broker requires authentication, but the code uses anonymous connect. Fix: Add
mqttClient.setUsernamePassword("user", "pass");beforeconnect().
Extending or Simplifying the Build
Once the baseline telemetry is flowing to your MQTT broker (like Home Assistant or Node-RED), you have a clear path to scale the project based on your needs.
How to Simplify (No Network Required)
If you don't have an MQTT broker and just want local visual feedback, strip the WiFi code and utilize the Uno R4 WiFi's onboard 12x8 LED matrix. Map the ultrasonic distance (e.g., 20cm to 100cm) to the 8 rows of the matrix. As the water rises, the LED rows illuminate from bottom to top. This eliminates network debugging entirely and reduces the BOM cost by removing the need for a router configuration.
How to Extend (Add Active Control)
To move from monitoring to active mitigation, add a Futek SSR-10A Solid State Relay wired to a 12V backup bilge pump.
Decision Rule: If distance_cm < 15.0 (high water alarm) AND current_amps < 0.5 (primary pump failed to start or tripped breaker), trigger D10 HIGH to engage the backup pump. This requires upgrading your power supply to a 12V 5A unit and adding a buck converter to step down to 5V for the Arduino, but it transforms the project from a passive alarm into an active life-safety system.
Stop browsing generic lists. Build infrastructure that protects your home, teaches you ARM-Cortex debugging, and respects the physics of AC current measurement.






