Electronics · Embedded Systems · Accessibility
Pool Chlorinator
An Arduino-based automatic pool chlorination system, built as an accessibility-focused client group project and category winner at uOttawa's Engineering Design Day 2023.
Overview
The project was developed for a client with reduced mobility, where lifting heavy chlorine containers, measuring chemicals, and performing regular chemistry testing created a significant accessibility barrier. The project focused on minimizing physical effort by automating chlorine measurement and dispensing while also allowing the reservoir to be refilled without lifting or pouring chlorine.
The Pool Chlorinator is an Arduino-based system that automatically doses liquid chlorine into an above-ground residential pool, reducing the need for routine manual maintenance. The system injects chlorine into the existing filtration plumbing through a one-directional injection tee using a 12V pump.
The system was designed and built by the four-person team Cholomatic for GNG2501, the University of Ottawa's second-year engineering design course, and won the Accessibility 4 category at the Faculty of Engineering Design Day in Winter 2023.
Specifications
- Controller: Arduino Uno
- Dosing: 12V pump controlled through a relay module
- Sensing: HC-SR04 ultrasonic reservoir level sensor and analog pool chemistry sensor
- Firmware: Arduino C++ using a non-blocking
millis()-based scheduler - Indicators: Blue, red, and orange status LEDs
- Plumbing: PEX tubing with injection tee and configurable refill valve path
- Enclosure: Weather-protected prototype enclosure with integrated chlorine reservoir
How It Works
The controller periodically measures the chlorine remaining in the reservoir using an HC-SR04 ultrasonic sensor and reads the pool chemistry through an analog sensor. From those measurements, it calculates the amount of liquid chlorine required to reach the target concentration. If the reservoir contains enough chlorine and dosing is required, the pump runs for a calculated amount of time based on its flow rate to inject the correct volume into the pool plumbing.
The firmware uses a non-blocking millis()-based scheduler rather than delay(), allowing the control loop to evaluate conditions once per dosing interval (one hour by default) while remaining responsive. The pump is also prevented from running when the reservoir falls below a minimum level, protecting it from running dry.
Status LEDs provide simple feedback to the user: a blue LED warns when the reservoir is low, a red LED indicates that chlorine is actively being dispensed, and an orange LED signals that the measured chlorine level is already above the target. The plumbing also includes a refill path that allows the reservoir to be filled directly from a chlorine container without requiring the user to lift or pour the chemical.
Design Decisions
Open-loop scheduled dosing. Rather than continuously controlling the pump, the system evaluates pool conditions at fixed intervals using a non-blocking scheduler. This approach simplified the firmware, reduced unnecessary pump operation, and was appropriate for a second-year engineering prototype while still meeting the client's accessibility needs.
Ultrasonic reservoir monitoring. An HC-SR04 ultrasonic sensor measures the remaining chlorine without contacting the chemical itself. This avoids exposing electrical sensors to a corrosive environment while providing sufficient accuracy for refill notifications.
Accessible refill system. The plumbing was designed with a configurable valve path that allows the same pump used for dosing to refill the onboard reservoir directly from a purchased chlorine container. This eliminated the need for the client to lift heavy containers or manually pour chlorine.
Retrospective
Reviewing the firmware after the course identified an important timing bug: the one-hour dispense interval was originally stored as a 16-bit int, causing an overflow that shortened the interval to roughly 32 seconds. The repository documents this issue and corrects it by using an unsigned long, matching Arduino timing best practices.
The largest remaining limitation is sensor calibration. While the control algorithm computes the required chlorine dose from the measured chemistry, the analog sensor currently relies on a placeholder calibration. A future iteration would focus on accurately calibrating the chemistry sensor to real ppm values, improving dosing accuracy and making the system suitable for long-term deployment.
Source
The complete project is on GitHub, including the firmware, the experiment sketches used during development, and the full design documentation from the course: github.com/blafr103/pool-chlorinator.