Aquacontrol32 is software used to program and control 5 led strips to create more natural sunrises and sunsets in your aquarium.
Aquacontrol32 is developed and tested on hardware based on a MH-ET LIVE MiniKit ESP32.
With some modifications and provided there are enough pins broken out, Aquacontrol32 should run on basically any ESP32 based board.
The minimum hardware would be a ESP32 board with at least 5 free output pins connected via 330R gate resistors to 5 NPN mosfets. I use IRLZ44N mosfets as these are cheap and have the right ratings for my setup.
You can connect a 128x64 I2C OLED and/or a ILI9341 SPI tft display to have some feedback on the display(s).
The ILI9341 displays optionally come with a XPT2046 touch controller which is supported.
Aquacontrol32 dimming down YouTube video
5 channels led dimming (common anode) at 1.22kHz with 16 bit (65535 steps) resolution.
Lunar cycle night light.
50 timers per channel.
Automatic NTP timekeeping.
OneWire Maxim ( Dallas ) DS18B20 sensor support.
I2C 128x64 SSD1306 OLED support.
SPI 320x240 ILI9341 TFT support.
XPT2046 touchscreen support.
SPIFFS storage support.
Temperature logging on SPIFFS.
All device settings are saved in NVS.
Easily connect your controller to WiFi with the ESP8266 SmartConfig Android app.
Get a notification in the web interface if a new release is available.
You will need:
Aquacontrol32 can run happily with or without OLED or TFT display.
#includedlibraries version numbers against libraries.md.
Check your device options in
deviceSetup.hto enable or disable version information.
truemakes that the Arduino IDE can no longer compile or flash your script.
You then have to use the script
compile.shto verify your sketch and
flash.shto verify/upload the sketch to the controller.
Read this blog post to see why I choose this method.
Source are compiled for
mhetesp32minikitwhich has support for ESP_LOGX macros.
This can be changed to a particular esp32 board by changing the
--boardoption in the
~/Arduino/hardware/espressif/esp32/boards.txtto find the relevant board desciption.
custom_DebugLevelshould be set to
flash.shscript for production use.
When you are still testing your hardware and setup, debug level can be set to anything depending on your needs.
esp32_infois probably what you need,
esp32_verbosegives the most info)
If your controller has a problem after flashing (no Wifi or stuck/not properly booting) the most probable cause is corrupted NVS.
Erasing the complete flash memory will solve most of these problems.
Use this command to erase flash (SPIFFS INCLUDED!) in Linux:
~/Arduino/hardware/espressif/esp32/tools/esptool.py --port /dev/ttyUSB1 erase_flash
default.aquin the file manager before erasing and upload it after you flash your controller.
Connecting the hardware:
Check the Aquacontrol hardware GitHub repo.
Read the file on connecting a ILI9341 display. Pull-ups are not optional!
The ILI9341 boards from AliExpress, DealExtreme or any other supplier are not all equal.
Among the tested boards I encountered some that have no MISO pin connected, so they can't respond to read commands.
For these boards you can enable
TFT_HAS_NO_MISO(set it to
Some ILI9341 boards have their touch coordinates inverted.
For these boards you can enable
TOUCH_IS_INVERTED(set it to
Don't forget to connect the tft LED to 3.3V. (default: GPIO PIN 2)
To be on the safe side, I use a BC547 transistor (and a 330R resistor) between the ESP32 pin and the LED connector on the tft board.
If you connect the LED directly to a ESP32 pin, connect it through a 330R resistor in series to prevent burning up your ESP32.
Lunar cycle night light:
When enabled, the settings for the minimum levels in the channel section of the webinterface become the full moon light value.
Can be disabled in
deviceSetup.h. (set it to
The lunar images used in the web interface are rendered by Jay Tanner and licenced under the Creative Commons Attribution-ShareAlike 3.0 license.
If your ESP32 has connected to your WiFi router before you flash Aquacontrol to your device, it will probably connect automagically .
If you try to connect to an unknown WiFi network or changed your WiFi router settings, Aquacontrol will fail to connect and start SmartConfig.
If you have no oled or tft connected, the onboard led will blink at 1Hz to show you the device is in SmartConfig mode.
You can then use the Espressif SmartConfig app or the ESP8266 SmartConfig Android app to setup your Aquacontrol WiFi connction.
If after 5 minutes SmartConfig has not connected your device will reboot. This way Aquacontrol32 will reconnect after a powerout when the modem is not yet online when Aquacontrol32 has booted the first time.
By default log files are not generated.
Log files saved on SPIFFS could reduce the lifetime of the flash memory.
To log the temperature sensor values enable
LOG_FILES (set it to
Use the stickbreaker OneWire library for troublefree temperature sensors.