The Pool Controller System is an automated solution designed to manage the operation of various pool components including pumps, heaters, UV systems, and lights. Built on a robust hardware platform utilizing Ethernet connectivity, NTP for time synchronization, and Flash storage for configuration retention, this system aims to provide an efficient and user-friendly way to maintain optimal pool conditions year-round.
- Automated Control: Manage your pool's pump, heater, UV system, and lights based on configurable schedules.
- Time Synchronization: Utilizes NTP to ensure accurate operation times.
- Web Interface: Configure settings and control your pool's components remotely via a built-in web server.
- MDNS Support: Easy access to the web interface through MDNS naming.
- Flash Storage: Settings are saved to flash memory, ensuring they persist across reboots.
- Debugging Mode: Optional serial output for debugging purposes.
- Arduino Opta RS485
- Optional: USB storage for logging (when compiled with
LogToUSBDrivedirective)
- NTPClient
- TimeLib
- Ethernet (or compatible library for your hardware)
- FlashIAPBlockDevice and TDBStore for storage
- MDNS_Generic
- Library Installation: Install all required libraries through your IDE's library manager or manually include them into your project directory.
- Hardware Setup: Follow this tutorial: https://docs.arduino.cc/tutorials/opta/user-manual/
- Configuration: Adjust the
#definedirectives at the beginning of the main code file to match your hardware setup and preferences. - Compilation and Upload: Compile the code and upload it to your microcontroller using the Arduino IDE.
After uploading the code and powering on your device, the system will start in its default state with the predefined schedules.
- Web Interface: Access the web interface through
http://poolcontroller.local(replacepoolcontrollerwith your actual MDNS hostname) to configure the schedules and settings. - Manual Override: Use the physical user button to toggle the system's operational state.
The Pool Controller System is designed to be highly configurable to meet various operational needs. Below is a detailed explanation of all user-configurable variables within the system. These can be adjusted either in the code before uploading or via the web interface, depending on the variable.
- LED and Relay Pins: Define the microcontroller pins connected to LEDs and relays.
const int LED[] = {LED_D0, LED_D1, LED_D2, LED_D3};const int RELAY[] = {D0, D1, D2, D3};
- User Button: Pin number for the user button.
#define userButton BTN_USER
- Ethernet Configuration: Setup parameters for Ethernet connectivity.
- This is managed by the
Ethernet.begin();method in the setup routine. Modify this call to include specific IP settings if needed.
- This is managed by the
- NTP Settings: Configure the NTP client for time synchronization.
- The
NTPClient timeClient(NTPUdp);instantiation can be modified to specify a different NTP server or time offset.
- The
Variables affecting the system's operation can be configured through the web interface. The initial defaults are defined in the code and can be adjusted as needed:
- Schedule Settings: Time schedules for each component. Configurable via the web interface. Initial values:
TimeSetting defaultTimeSettings[] = { {"fromPump", "08:00"}, {"toPump", "12:00"}, // Add other settings similarly };
bool debugFlag = true;: Enable or disable debug output to Serial.
bool isWinter = false;: Indicate if the system should operate in winter mode, affecting relay management logic.
Debugging Mode: Controlled by the debugFlag variable. When enabled, various operational messages will be printed to the Serial interface.
USB Logging: If compiled with LogToUSBDrive directive, logs can be written to a USB storage device. This feature requires additional configuration: #ifdef LogToUSBDrive: Uncomment and configure this section to enable USB logging.
Hostname: The MDNS hostname can be set to make accessing the web interface more intuitive. Modify the String hostname = "PoolController"; line to change the hostname.
Contributions to the Pool Controller System are welcome! Please refer to the CONTRIBUTING.md file for guidelines on how to submit issues, feature requests, and pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
- Special thanks to all contributors and the open-source libraries used in this project.
For detailed information on setup, usage, and customization, please refer to the wiki pages or submit an issue if you encounter problems.