Aquacontrol32 can control 5 led strips to create gradual sunrises and sunsets in your aquarium. It is developed for and tested on MH-ET LIVE MiniKit ESP32 MCUs. Other than the led dimming hardware, no additional hardware is needed to control the device.
The minimum hardware would be a ESP32 board with at least 5 free output pins connected via 100R gate resistors to 5 NPN mosfets that drive the led lights. You will need logic level mosfets for example IRLZ44N mosfets.
With some modifications and provided there are enough pins broken out, Aquacontrol32 should run on basically any ESP32 based board. The built-in web interface already gives access to most functions. The goal is v2.0 as a single binary with all functions accessible via the web interface.
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 usually come with a XPT2046 touch controller which is supported (and assumed).
Another cool feature is support for 3 Dallas DS18B20 temperature sensors, with temperature logging to FATFS and a 30 day temperature history.
Most libraries can be installed with the Arduino library Manager Sketch > Include Library > Manage Libraries
.
A few have to be downloaded from GitHub:
Install in the Arduino libraries or ESP32 libraries folder.
aquacontrol32.ino
)wifi_password
and wifi_network
. (in aquacontrol32.ino
)deviceSetup.h
and devicePinSetup.h
.The sensors and displays should be plug and play, except the ILI9341 when it has no MISO pin connected. For these displays you can enable TFT_HAS_NO_MISO
(set it to true
) in deviceSetup.h
.
deviceSetup.h
and devicePinSetup.h
.mhetesp32minikit
which has support for ESP_LOGX macros.
--board
option in the compile.sh
and flash.sh
scripts.
~/Arduino/hardware/espressif/esp32/boards.txt
to find the relevant board desciption.
custom_DebugLevel
should be set to esp32_none
in the flash.sh
script for production use.
esp32_info
is probably what you need, esp32_verbose
gives the most info)Toggle the GIT_TAG
option in deviceSetup.h
to enable or disable version information.
Setting GIT_TAG
to true
makes that the Arduino IDE can no longer compile or flash your script.
You then have to use the script compile.sh
to verify your sketch and flash.sh
to verify/upload the sketch to the controller. You might have to adjust these scripts for your particular OS or setup.
Read this blog post to see why I choose this method.
TFT_HAS_NO_MISO
(set it to true
) in deviceSetup.h
.TOUCH_IS_INVERTED
(set it to true
) in deviceSetup.h
.To override the device detection for ILI9341 displays you can use the ILI9341 force
button in the setup
page of the web interface. This will force a ILI9341 display until the device reboots.
channels
area of the web-interface.Set your wifi_network
and wifi_password
in aquacontrol32.ino
before you flash your device.
Double check because setting a wrong wifi_network
or wifi_password
will result in a boot loop!
Or use SmartConfig and take note of the next couple of things.
By default aquacontrol will get an ip address from the DHCP server.
Follow these steps to to set a static ip address:
SET_STATIC_IP
(set it to true
) in aquacontrol32.ino
.STATIC_IP
, GATEWAY
, SUBNET
, PRIMARY_DNS
and SECONDARY_DNS
to the desired values.By default log files are not generated.
This is because log files saved on FFat could reduce the lifetime of the flash memory.
Sensor logging can be enabled in the web interface.
ONEWIRE_PIN
will in some cases display ghost sensors.OneWire
library that comes with the Arduino IDE does not work with esp32 MCUs. Use the stickbreaker OneWire library for troublefree temperature sensors.TOUCH_IS_INVERTED
(set it to true
) in deviceSetup.h
.Not really an issue but if your controller has a problem after flashing (no Wifi or stuck/not properly booting) reflashing after a full flash erase will solve it almost always.
Always backup your default.aqu
in the file manager before flashing and upload it back to the controller after you succesfully flashed your controller.
Use this command to erase flash (FFat INCLUDED!) in Debian based Linux:
~/Arduino/hardware/espressif/esp32/tools/esptool.py --port /dev/ttyUSBx erase_flash
I develop Aquacontrol32 in my spare time for fun. Although I like to code, my afk time is equally important. If you like the project, you could buy me a beer for some moral support.
MIT License
Copyright (c) 2017 Cellie
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.