How to make Automated Colorimetric Water-Quality Reader Using Calibrated Smartphone Imaging

1. Introduction

The Automated Colorimetric Water-Quality Reader Using Calibrated Smartphone Imaging is an innovative environmental monitoring project designed to determine selected water-quality parameters using a smartphone camera and colorimetric testing methods.

The system uses chemical reagents that produce different colours when they react with specific substances in water. A smartphone camera captures the resulting colour, while an image-processing application analyses the colour intensity and compares it with calibrated reference values to estimate the concentration of the tested parameter.

The innovation aims to provide an affordable, portable and user-friendly alternative to expensive laboratory water-testing equipment.

Komal Dadlani co-founded Lab4U at age 24 to teach science on phones
パックテスト BOD(低濃度) - パックテストの共立理化学研究所
Hygiène en volailles : Contrôler souvent son eau de boisson est payant | Réussir volailles

2. Problem Statement

Access to affordable water-quality testing remains a challenge in many schools, rural communities and small-scale water treatment facilities.

Traditional laboratory testing equipment can be expensive and may require trained personnel. Manual colour comparison methods can also produce inconsistent results because of differences in lighting conditions and human interpretation.

This project seeks to develop a smartphone-based system that improves the consistency, accessibility and accuracy of colorimetric water-quality analysis.

3. Objectives

  • To design a smartphone-based water-quality reading system.
  • To develop a controlled imaging chamber that minimizes external light interference.
  • To calibrate smartphone RGB colour values against known standard solutions.
  • To estimate selected water-quality parameters using colour intensity analysis.
  • To evaluate the accuracy of the system against reference testing methods.

4. Parameters the System Can Measure

Water parameterTesting method
NitrateColorimetric nitrate reagent
PhosphateMolybdenum blue method
IronIron colorimetric reagent
ChlorineDPD colorimetric method
AmmoniaColorimetric ammonia reagent

The project can initially focus on three parameters: nitrate, phosphate and iron, before expanding to additional tests.

5. Materials and Components

A Smartphone-Enabled Imaging Device for Chromotropic Acid-Based Measurement of Nitrate in Soil Samples
A Smartphone-Based Automatic Measurement Method for Colorimetric pH Detection Using a Color Adaptation Algorithm
Lovibond® MD150 Photometer | Selectech Lab Equipment
Checking your browser - reCAPTCHA
ProRock ESP32 WiFi Bluetooth Board ESP-WROOM-32 30-Pin CH340 USB-C 4MB, 5905973208673 • Cena • Opinie - Allegro
Apexel 100mm Macro Lens Kit Review: An Impressive Phone Add-On | PetaPixel
27430. TEST EN CUBETA TNT FOSFORO TOTAL (0.06-3.5MG) 50 PRUEBAS HACH – CTR Scientific
3D Printing Aids Development of Mobile Phone-Based Medical Devices - Engineering.com
A Smartphone-Based Automatic Measurement Method for Colorimetric pH Detection Using a Color Adaptation Algorithm
Free Chlorine cuvette test, 0.05-2.0 mg/L Cl₂, 24 tests | Hach UK
Hach 2606945 Nitrogen, Ammonia Reagent Set 0.4-50 mg/L NH₃-N
Phosphor gesamt Reagenzküvetten | 0,0 bis 32,6 mg/l | 50 x 16 mm Fertigküvetten
Invest-in.Berlin: Berlin lab turns smartphones into water safety tools
Smartphone Macro Lens : 25 Steps (with Pictures) - Instructables
Evagon Laboratorio de Calibracao - Conheça nossas linhas para monitoramento ambiental e Controle de qualidade de laboratório!
ComponentPurpose
SmartphoneCaptures sample images
ESP32 (optional)Controls LEDs and communicates with the application
White LED lightsProvides consistent illumination
Black enclosureBlocks external light
Sample cuvettesHold water samples
Colorimetric reagentsProduce measurable colour changes
Reference colour standardsCalibration
Measuring pipettesAccurate sample and reagent measurement
Image-processing applicationAnalyses RGB values
LaptopData analysis and calibration

6. How the System Works

Checking your browser - reCAPTCHA

The system follows these steps:

  • Collect a water sample in a clean cuvette.
  • Add the appropriate chemical reagent.
  • Allow the required reaction time.
  • Place the cuvette inside the controlled-light imaging chamber.
  • Position the smartphone camera above the sample.
  • Capture an image under standardized lighting.
  • The application extracts RGB colour values.
  • The software compares the colour values with calibration data.
  • The estimated concentration is displayed on the smartphone.

7. Scientific Principle

The project is based on colorimetry and the Beer-Lambert law.

A=\varepsilon lc

Where:

  • = Absorbance
  • = Molar absorption coefficient
  • = Path length of light
  • = Concentration of the absorbing substance

The smartphone does not directly measure absorbance like a laboratory spectrophotometer. Instead, it measures image colour values, which can be calibrated against known concentrations.

A simplified calibration relationship can be developed:

C=aR+b

Where:

  • = Estimated concentration
  • = Extracted colour intensity
  • = Calibration constants

For better performance, the application can use RGB ratios, HSV values or calculated optical density rather than relying on a single RGB channel.

8. Software Development

The application can be developed using:

  • Python and OpenCV for image processing.
  • MIT App Inventor for a simple Android interface.
  • Google Sheets or a local database for storing test results.
  • ESP32 Bluetooth communication for optional hardware integration.

Proposed application features:

  • Capture sample image.
  • Automatically detect the sample region.
  • Extract colour intensity.
  • Calculate estimated concentration.
  • Display water-quality results.
  • Store and compare historical results.
  • Generate downloadable reports.

9. Experimental Procedure

Prepare standard solutions with known concentrations, following the relevant reagent manufacturer’s instructions.

For each parameter:

  • Prepare at least five different concentration standards.
  • React each standard with the appropriate reagent.
  • Photograph samples under identical lighting conditions.
  • Extract colour values.
  • Generate a calibration curve.
  • Test unknown water samples.
  • Compare smartphone readings against a validated reference method.

10. Innovation and Expected Outcomes

The expected innovation is a portable water-quality reader that transforms an ordinary smartphone into a calibrated analytical instrument.

Expected outcomes include:

  • Reduced dependence on expensive analytical equipment for selected screening tests.
  • Improved consistency in colour interpretation.
  • Portable water-quality screening.
  • Digital storage of test results.
  • Improved accessibility of environmental monitoring in schools and communities.

11. KSEF Research and Evaluation

The project can be evaluated using:

Evaluation parameterMeasurement
AccuracyComparison with reference laboratory results
PrecisionRepeated testing of the same sample
SensitivityAbility to distinguish different concentrations
ReliabilityConsistency across repeated measurements
Response timeTime taken to produce a result
CostComparison with conventional equipment

12. Further Innovation

A Smartphone-Enabled Imaging Device for Chromotropic Acid-Based Measurement of Nitrate in Soil Samples
Progress in the design of portable colorimetric chemical sensing devices  - Nanoscale (RSC Publishing) DOI:10.1039/D3NR03803C
Application of 3D Printing Technology in Sensor Development for Water Quality Monitoring | MDPI
A Portable, Spectroscope-InspiredThree-Dimensionally Printed Smartphone Spectrophotometer - Tim Nguyen, Nick Tobin, Henry Bournef, Erin M. Gross, Joel F. Destino, 2025
Handheld Photometer for N+P Measurement - SciStarter
Checking your browser - reCAPTCHA
Analytical applications of smartphones for agricultural soil analysis | Analytical and Bioanalytical Chemistry | Springer Nature Link
SpecPhone — Smith Lab
Digitising water quality monitoring in Mali | Dutch Water Sector
A Portable, Spectroscope-InspiredThree-Dimensionally Printed Smartphone Spectrophotometer - Tim Nguyen, Nick Tobin, Henry Bournef, Erin M. Gross, Joel F. Destino, 2025
Schematic Diagram Of Spectrophotometer
TERRA FORMA : un nouveau paradigme pour l’observation des territoires | CNRS Terre & Univers
DIY smartphone spectrophotometer for Wine analysis by Fruchtweinkeller - Thingiverse
ICMAB - Wenchao Duan will defend his PhD Thesis on 8 September 2022 at ICMAB
多功能水質分析儀 MD610 | 日澤國際股份有限公司
Water turbidity sensing using a smartphone   - RSC Advances (RSC Publishing) DOI:10.1039/C6RA02483A
Presse - TECHKON - Wir messen Farbe und mehr...
Optical Sensors | Encyclopedia MDPI

To make the project more competitive at KSEF, consider adding:

  • Automatic reagent selection: The application guides the user through the correct test procedure.
  • AI-assisted colour recognition: Machine learning improves sample classification.
  • GPS tagging: Records the geographical location of water samples.
  • Water-quality mapping: Displays results from different sampling locations.
  • ESP32 integration: Automatically controls illumination and communicates with the phone.
  • mbeva

    Dominic Mbeva is a science teacher, experienced researcher, innovator, and creative technologist with expertise in STEM education, digital media, and scientific research. As a Kenya Science and Engineering Fair (KSEF) advisor and projects manager, he mentors young scientists, guiding them in developing award-winning innovations. He is also an IC Technorat, leading advancements in science and technology. Beyond education, Dominic is a skilled photographer and video editor, using visual storytelling to make science more engaging. His philosophy, “If you take care of minutes, hours will take care of themselves,” reflects his belief in consistent effort, strategic thinking, and innovation to drive success in both research and creativity.

    Related Posts

    Smart Multi-Dose Medication Adherence Dispenser with Missed-Dose Alerting for Chronic Care

    1. Introduction Medication adherence is an important part of managing chronic health conditions. Patients who take long-term medications may sometimes forget scheduled doses, take medication at the wrong time or…

    Read more

    KSEF Nationals 2026 Food Technology Results: Top 10 Projects, Winning Schools and Best Innovation Ideas for 2027

    Introduction The Kenya Science and Engineering Fair (KSEF) Nationals 2026 showcased impressive creativity and scientific innovation among Senior School learners participating in the Food Technology category. The final ranking report…

    Read more

    Leave a Reply

    Your email address will not be published. Required fields are marked *