# Color QR Codes for Smartphone-Based Analysis of Free Chlorine in Drinking Water

**Authors:** María González-Gómez, Ismael Benito-Altamirano, Hanna Lizarzaburu-Aguilar, David Martínez-Carpena, Joan Daniel Prades, Cristian Fàbrega

PMC · DOI: 10.3390/s25113251 · Sensors (Basel, Switzerland) · 2025-05-22

## TL;DR

This paper introduces color QR codes for measuring free chlorine in drinking water using smartphones, making it easier for on-site testing.

## Contribution

The novel use of color QR codes to embed colorimetric references for accurate smartphone-based chlorine testing.

## Key findings

- Color QR codes achieved 88.10% accuracy for BTB strip measurements.
- DPD powder measurements reached 84.62% accuracy using the same method.

## Abstract

Free chlorine (FC) plays a crucial role in ensuring the safety of drinking water by effectively inactivating pathogenic microorganisms. However, traditional methods for measuring FC levels often require specialized equipment and laboratory settings, limiting their accessibility and practicality for on-site or point-of-use monitoring. QR Codes are powerful machine-readable patterns that are used worldwide to encode information (i.e., URLs or IDs), but their computer vision features allow QR Codes to act as carriers of other features for several applications. Often, this capability is used for aesthetics, e.g., embedding a logo in the QR Code. In this work, we propose using our technique to build back-compatible Color QR Codes, which can embed dozens of colorimetric references, to assist in the color correction to readout sensors. Specifically, we target two well-known products in the HORECA (hotel/restaurant/café) sector that qualitatively measure chlorine levels in samples of water. The two targeted methods were a BTB strip and a DPD powder. First, the BTB strip was a pH-based indicator distributed by Sensafe®, which uses the well-known bromothymol blue as a base-reactive indicator; second, the DPD powder was a colorimetric test distributed by Hach®, which employs diethyl-p-phenylenediamine (DPD) to produce a pink coloration in the presence of free chlorine. Custom Color QR Codes were created for both color palettes and exposed to several illumination conditions, captured with three different mobile devices and tested over different water samples. Results indicate that both methods could be correctly digitized in real-world conditions with our technology, rendering a 88.10% accuracy for the BTB strip measurement, and 84.62% for the DPD powder one.

## Linked entities

- **Chemicals:** bromothymol blue (PubChem CID 6450), diethyl-p-phenylenediamine (PubChem CID 7120)

## Full-text entities

- **Chemicals:** bromothymol blue (MESH:D001979), BTB (-), Water (MESH:D014867), Chlorine (MESH:D002713)

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12157797/full.md

## Figures

12 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12157797/full.md

## References

23 references — full list in the complete paper: https://tomesphere.com/paper/PMC12157797/full.md

---
Source: https://tomesphere.com/paper/PMC12157797