Chlorine detection with RGB sensors relies on colorimetric testing - using chemical reagents that change color in the presence of chlorine:
DPD (N,N-diethyl-p-phenylenediamine) - turns pink/red with chlorine
OTO (Orthotolidine) - turns yellow with chlorine
Requires chemical reagents (DPD or OTO)
Not direct measurement - measures color change, not chlorine
Affected by:
Water turbidity
pH levels
Temperature
Other chemicals
Ambient light
Accuracy issues - ±0.5 ppm at best
FCL-01 - Free chlorine sensor
CLE-03 - Chlorine electrode
Atlas Scientific EZO-ORP - ORP sensor (indirect)
Use specific wavelength (530nm for DPD)
More accurate than RGB
Use in controlled environment (dark box)
Always use same reagent amount
Calibrate frequently
Keep temperature constant
Use same test tubes
Filter water samples first
Would you like me to provide more details on:
Building a proper test chamber?
Implementing temperature compensation?
Using electrochemical sensors instead?
Creating a calibration curve?
The TCS34725 can work for this, but it's really meant for hobbyist/educational use rather than accurate water quality monitoring
The FCL-01 (and similar industrial chlorine sensors) typically cost:
Sensor probe alone: $150-300
With transmitter/controller: $400-800
Complete kit: $500-1000+
These are industrial-grade sensors designed for pools/water treatment plants.
FCL-01 typically outputs:
4-20mA current loop (industrial standard)
RS485 Modbus (some models)
Not direct Arduino-friendly voltage
// Need a 250Ω resistor to convert 4-20mA to 1-5V
// 4mA = 1V = 0 ppm
// 20mA = 5V = max ppm (usually 10 or 20)
#define CHLORINE_PIN 34 // ESP32 ADC pin (or A0 for Arduino)
void setup() {
Serial.begin(115200);
}
void loop() {
int raw = analogRead(CHLORINE_PIN);
// For ESP32 (12-bit ADC, 0-3.3V)
float voltage = raw * (3.3 / 4095.0);
// Convert voltage to mA (with 250Ω resistor)
float current = voltage / 0.250; // V = I*R
// Convert mA to ppm (assuming 4-20mA = 0-10ppm)
float ppm = ((current - 4.0) / 16.0) * 10.0;
if (current < 3.5) {
Serial.println("Sensor disconnected!");
} else {
Serial.print("Chlorine: ");
Serial.print(ppm);
Serial.println(" ppm");
}
delay(1000);
}
Direct Arduino/ESP32 compatible
0-3.3V output
Includes interface board
// DFRobot sensor - much simpler!
#define CL_PIN A0
void setup() {
Serial.begin(9600);
}
void loop() {
float voltage = analogRead(CL_PIN) * (5.0/1024.0);
float ppm = voltage * 2.0; // Simple linear conversion
Serial.println(ppm);
delay(1000);
}
Available on AliExpress/eBay
Variable quality
Usually 0-5V or 0-3.3V output
Direct Arduino compatible
Measure oxidation potential (indirect chlorine)
Atlas Scientific or DFRobot versions
Easier to integrate
Complete modules with display
Often have analog output you can tap into
Skip the industrial FCL-01 and go for:
Best Value: Generic chlorine probe + interface board (~$50 total)
Easiest: DFRobot Gravity Chlorine Sensor (~$70)
Budget: ORP sensor for indirect measurement (~$40)
#define CHLORINE_PIN 34
#define SAMPLES 10
float readChlorine() {
float sum = 0;
for(int i = 0; i < SAMPLES; i++) {
sum += analogRead(CHLORINE_PIN);
delay(10);
}
float avg = sum / SAMPLES;
float voltage = avg * (3.3 / 4095.0);
return voltage * 3.0; // Adjust multiplier based on calibration
}
The industrial FCL-01 is overkill for most Arduino/ESP32 projects - the cheaper alternatives work fine for hobbyist pool monitoring or water quality projects!
Search on AliExpress/Alibaba/eBay:
"residual chlorine sensor arduino"
"CL2 sensor probe 0-5V"
"free chlorine electrode probe"
"water quality chlorine sensor module"
"FCL chlorine probe analog output"
"swimming pool chlorine sensor 4-20mA"
"RS485 chlorine sensor modbus"
Specific model numbers to search:
"CLE-03 chlorine electrode"
"RCL-01 residual chlorine"
"CS7820 chlorine sensor"
"FCL502 chlorine probe"
Search terms:
"pool tester ORP chlorine module"
"swimming pool water quality sensor"
"spa chlorine pH combo sensor"
"pool automation sensor probe"
"BLE-200 pool sensor" (specific model)
"Hayward ORP sensor replacement"
Since you mentioned charity and scalability, ORP might be better:
Search for:
"ORP probe arduino"
"ORP-169 sensor module"
"redox potential sensor"
"ORP electrode BNC connector"
Why ORP for charity project:
Much cheaper ($15 vs $50)
More durable/longer lasting
Correlates with chlorine (indirect but reliable)
No expensive replacement membranes
// ORP to Chlorine estimation
#define ORP_PIN A0
#define OFFSET 0 // Calibrate this
float getChlorineFromORP() {
int raw = analogRead(ORP_PIN);
float voltage = raw * 5.0 / 1024.0;
int orpValue = (voltage * 1000) - 1500 + OFFSET; // Convert to mV
// Rough correlation (pH dependent)
// 650-750 mV = 0.5-1.0 ppm chlorine
// 750-850 mV = 1.0-3.0 ppm chlorine
float chlorinePPM;
if (orpValue < 650) chlorinePPM = 0;
else if (orpValue < 750) chlorinePPM = map(orpValue, 650, 750, 0.5, 1.0);
else if (orpValue < 850) chlorinePPM = map(orpValue, 750, 850, 1.0, 3.0);
else chlorinePPM = 3.0;
return chlorinePPM;
}
For maximum scalability in developing regions:
Components:
TCS34725 or any RGB sensor ($5)
3D printed test chamber
DPD powder packets (bulk buy)
Search for:
"DPD powder bulk 1000 packets"
"pool test reagent DPD wholesale"
"chlorine test powder sachets"
// Low-cost chlorine tester for water safety
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#define ORP_PIN A0
#define BATTERY_PIN A1
#define LED_PIN 13
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
lcd.init();
lcd.backlight();
pinMode(LED_PIN, OUTPUT);
lcd.setCursor(0,0);
lcd.print("Water Chlorine");
lcd.setCursor(0,1);
lcd.print("Tester v1.0");
delay(2000);
}
void loop() {
float chlorine = readChlorineLevel();
float battery = readBattery();
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Cl: ");
lcd.print(chlorine, 1);
lcd.print(" ppm");
lcd.setCursor(0,1);
if (chlorine < 0.5) {
lcd.print("ADD CHLORINE!");
digitalWrite(LED_PIN, HIGH);
} else if (chlorine > 3.0) {
lcd.print("TOO HIGH!");
digitalWrite(LED_PIN, HIGH);
} else {
lcd.print("SAFE WATER");
digitalWrite(LED_PIN, LOW);
}
delay(1000);
}
Version 1 - Ultra Budget ($15-20):
Arduino Nano clone: $3
ORP sensor probe: $12
16x2 LCD: $3
Box + battery: $2
Version 2 - Better ($30-40):
ESP32: $5
Generic chlorine probe: $25
OLED display: $5
Rechargeable battery: $5
Direct from Manufacturers:
Search Alibaba for "chlorine sensor factory"
Minimum order: 10-50 units
Price drops to $10-15 per sensor
Specific Suppliers to Search:
"Kedida sensor" (Chinese manufacturer)
"Yosemitech water sensor"
"Kelilong electrode factory"
Alternative: Contact Pool Supply Wholesalers
They often have old/surplus sensors
Might donate for charity
Use phone app instead of LCD (cheaper):
// ESP32 with Bluetooth
#include <BluetoothSerial.h>
BluetoothSerial SerialBT;
void setup() {
SerialBT.begin("WaterTester");
}
void loop() {
float chlorine = readSensor();
SerialBT.println(String(chlorine) + " ppm");
delay(1000);
}
Consider test strips + camera for ultimate low cost
Partner with pool chemical companies for donated sensors
Would you like me to help you:
Design a 3D printable enclosure?
Create a phone app for the tester?
Write a grant proposal for bulk sensor purchase?
Find specific suppliers on Alibaba?