ArduAqua Documentation,
DIY Aquarium Automation.

A comprehensive guide for building and configuring your own Arduino Mega-based aquarium controller.

About the Project

"ArduAqua began as a personal mission to automate the daily routines of my aquariums. Over the years, it has evolved into a reliable system that manages multiple tanks in my home. I am sharing this documentation to provide other hobbyists with a transparent, functional, and fully customizable DIY solution."

— The Developer

Core Features

📅

Automation

Scheduled automatic execution of stored events and tasks.

Manual Control

Instantly trigger dosing, dimming, or switching at any time.

🔌

Port Assignment

Map sensors and actuators to any available I/O pin with support for custom 8-character names.

💡

13-Bit PWM Lighting

7 PWM channels with "13Bit" resolution and adjustable frequency (125Hz-1kHz).

🕹️

Fully Stand-alone

All settings managed directly on the device. No PC or App required.

🛡️

Safety

Automatic state recovery after power failure and integrated temperature-based heater protection.

Interface Design

A visual guide to the control layout and display states.

Sa 14:32 24.25°C
DIM->68% 42%

ArduAqua is operated via a simple control panel with 4 buttons.

LCD Layout

The top row displays the weekday, current time, and water temperature.

The bottom row cycles through status messages (dimming, heating, alerts) while showing current light intensity.

Controls & Alerts

Adjust the LED brightness instantly using the UP and DOWN keys—no menu navigation required.

The LCD backlight automatically dims during inactivity to reduce ambient light and save power.

During a warning or error, the display flashes to ensure critical issues are noticed immediately.

Sa 09:05 25.00°C
HEATING 78%
Standard View Status messages cycle while the main parameters remain visible.
····
········
Standby Mode The panel turns off after a timeout to avoid distracting light in the room.
Critical Alert The firmware uses a flashing backlight to signal active alarms or sensor errors.

Menu Reference

Complete documentation of the on-device configuration and control structure.

📁 Tasks (Automation)

Execute

Trigger stored tasks (Dosing, Dimming, Switching, Curve Override) immediately.

Add Task
  • Dim Light: Target brightness (%) and ramp duration.
  • Switch Ports: Turn relay ports HIGH or LOW on schedule.
  • Fertilize: Configure pump, volume (ml), and frequency.
  • Temp Limits: Define safe temperature ranges for the heater.
  • Curve Override: Manually override the LED curve for a specific port.
Scheduled Info

View countdown and details of the next upcoming task.

💡 LED Settings

Dim Curves

Add, edit, or remove custom 11-point curves. Assign curves to physical PWM ports.

PWM Frequency

Adjust frequency (125Hz - 1000Hz) to match your LED driver specifications.

LED Power Port

Configure the relay that provides mains power to your LED drivers.

Pre-Start / Post-Finish

Trigger auxiliary tasks (fans, CO2) before or after lighting cycles.

LED Off-State

Define the port state when the LED power is turned off.

🌡️ Temperature Control

Alert Bounds

Set global alarm thresholds for Tank and Sump sensors.

Sensor Ports

Assign physical ports to Tank, Sump, and Ambient sensors.

Heater Settings

Configure heater port, active state, and switching logic.

RTC Adjustment

Calibrate the internal temperature sensor of the DS3231 RTC.

⚙️ Peripherals & Naming

Port Names

Give your physical ports custom names (8 chars) for better readability.

Dosing Pumps

Configure the starting port, pump count, and active state (HIGH/LOW).

Dosing Calibration

Measure actual flow rates (ml/min) for precise fertilization.

Date & Time

Set the high-precision DS3231 real-time clock.

Off-the-Shelf Hardware

ArduAqua is built using standard, widely available electronics components. No proprietary hardware is required.

Main Components

  • Arduino Mega 2560 - The heart of the system.
  • LCD Keypad Shield (16x2) - Classic HD44780 interface.
  • DS3231 RTC + AT24C - High-precision clock with EEPROM.
  • DS18B20 Sensors - At least 1 (Tank), others optional.
  • Pull-up Resistor - 4.7kΩ for the temperature bus.
  • Relay Module (Optional) - Needed for heaters or 230V devices.
  • Buttons - 4x push buttons.
ArduAqua Hardware Kit

Wiring: Fixed Assignments

These ports are reserved for specific hardware functions. Most other pins can be freely assigned in the menu.

FunctionMega Pin(s)
LCD Display (via Shield)4, 5, 6, 7, 8, 9, 10
ButtonsA10 - A13
LED PWM (7 Channels)2, 3, 11, 12, 44, 45, 46
All Other PinsFreely assignable for Sensors, Pumps, Relays, etc.

Custom Button Module

A self-made button module is required. Standard LCD shield buttons use resistor coding which is too imprecise and doesn't support the hardware interrupt needed to wake the device from standby.

Sensor Authenticity

Most DS18B20 sensors on the market are clones. ArduAqua can detect these and displays 'B' (Backup/Clone) or 'O' (Original) in the info menu. Both work, but originals are more precise.

Relay Safety & Inrush

For 230V wiring, consulting an electrician is mandatory. Cheap modules often have dangerously small isolation distances; look for PCBs with physical cutouts. Also note that high inrush currents from switching power supplies can 'weld' relay contacts shut over time.

Dosing System

Control up to 16 pumps. The system handles calibration automatically: just measure the output once, and ArduAqua calculates the exact timings for your required dosage.

Firmware Architecture

Written in C++ for AVR, the firmware uses a non-blocking event loop and hardware interrupts for high-priority tasks. Settings are stored in the external AT24C EEPROM (RTC module) to minimize wear on the Mega's internal memory.

LED Dimming & Curves

ArduAqua uses a "13Bit" resolution (0-8000) for ultra-smooth transitions. You can create curves by defining points or simply by entering an exponent.

Exponential Curve (Gamma 2.2)

Dim-Level (%) PWM "13Bit" Duty-Cycle (%) Precision Gain
0%00-
10%501+30
20%2323+8
30%5667-6
40%106613-26
50%174122+19
60%260033+40
70%365046+30
80%489761-17
90%634579-25
100%8000100-

F:

A:

Optocoupler Longevity

A unique feature: you can define a 'Rest State' for PWM ports. Optocouplers can age when kept active for long periods (often necessary to keep a light 'OFF' depending on the driver). By cutting the main LED power via 'Pre-/Post-Start Tasks', the PWM signal can be set to a non-aging state without turning the lamp on.

0 100% 8k

Visualized Exponential Curve (Gamma 2.2)

Firmware & Installation

Latest Release (v2.0)

avrdude -v -p atmega2560 -c wiring -P COM3 -b 115200 -D -U flash:w:arduaqua.hex:i