Smartphone Nitrate Testing in Vegetables and Water
ISEF Category: Biochemistry
Ready to Turn This Idea Into a Real Project?
This guide was put together with the help of AI research tools to give you a solid starting point. But a competitive science fair project lives in the details: refining your research question, fine-tuning your variables, analyzing your data, and presenting your findings like a seasoned scientist.
For next steps tailored to your interests, skill level, and timeline, work one-on-one with a MehtA+ mentor. Learn more about MehtA+ Science & Engineering Research Mentorship →
Subcategory: Analytical Biochemistry · Difficulty: Intermediate · Setup: School Lab · Time: 1 to 2 Months
The Hook
A bunch of spinach can look healthy and still carry very different nitrate levels from another bunch. Your phone camera can turn that hidden chemistry into a color signal you can measure. The same method can check tap water, where a simple screen can reveal more than your eyes can. That makes this a strong project for a student who wants real data, not just a pretty color change.
What Is It?
The Griess reaction turns nitrite into a pink dye. A dye is a colored molecule, and deeper color usually means more of the target ion. If you want to measure nitrate, you first convert nitrate to nitrite, then read the same color signal.
Your phone acts like a simple color meter. You take the red, green, and blue values from each sample, then build a calibration curve, which is a map from color to concentration. A machine-learning model can do the same job and may handle messy plant samples better if you train it on good standards and test it on held-out samples. Public USDA data gives you a reference point for what has been reported in leafy vegetables already.
Why This Is a Good Topic
This topic works well because you can change one thing at a time, like the sample type, the lighting, or the analysis method, and measure how the color output changes. It connects to food quality and water safety, two real problems students already care about. You can learn sample prep, colorimetry, calibration, and model testing without needing a giant lab.
Research Questions
- How does sample type, leafy vegetables versus tap water, affect the prediction error of an RGB calibration model for nitrate and nitrite?
- What is the effect of using a nitrate reduction step on agreement between measured color and USDA reference values?
- Does a linear calibration or a machine-learning calibration predict known standards more accurately?
- To what extent does fixed lighting improve repeatability across repeated smartphone photos?
- Which color channel, red, green, blue, or a combined index, best tracks concentration in the Griess test?
- How does vegetable pigment level affect recovery of nitrate from the color test?
Basic Materials
- Smartphone with manual camera controls.
- White light box or desk lamp with a fixed bulb.
- White background card.
- Griess reagent kit or school-lab Griess reagents.
- Nitrate standard solution.
- Nitrite standard solution.
- Clear cuvettes or small clear sample cups.
- Disposable pipettes or transfer pipettes.
- Coffee filters or syringe filters.
- Gloves and safety goggles.
- Distilled water.
- Spreadsheet access.
Advanced Materials
- Spectrophotometer or microplate reader.
- Analytical balance.
- Micropipettes and tips.
- Volumetric flasks.
- Centrifuge.
- Nitrate reduction column or enzyme kit.
- Certified nitrate and nitrite standards.
- Controlled light box.
- Image analysis software.
- Statistical software for calibration and validation.
Software & Tools
- ImageJ: Extracts RGB values from each sample image and helps you compare color intensity.
- Google Sheets: Organizes standards, formulas, and simple curve fits without paid software.
- Python: Trains and compares calibration models, then scores prediction error on held-out samples.
- Google Colab: Runs Python notebooks in a browser and keeps the workflow free and shareable.
Experiment Steps
- Define whether you will measure nitrate, nitrite, or both, and choose the exact sample types you will compare.
- Design a fixed photo setup so every sample is shot under the same light, angle, and background.
- Build a calibration set from known standards and decide which image features you will convert into concentration.
- Plan a second analysis path, such as linear fit versus machine learning, so you can compare prediction quality on the same samples.
- Set aside held-out samples and USDA reference values for final validation, so your result is tested, not just fitted.
Common Pitfalls
- Changing the room light between photos, which shifts RGB values more than the chemistry does.
- Skipping a reduction step for nitrate, which leaves the Griess reaction blind to part of the target signal.
- Using vegetable samples with too much pigment, which masks the pink color and weakens the calibration.
- Training and testing on the same samples, which makes the model look accurate before it sees new data.
- Comparing raw smartphone colors to USDA values without matching units or sample type, which turns validation into a false comparison.
What Makes This Competitive
A class-level version stops at making the color change work. A stronger project tests whether your model still performs after you change the food matrix, the lighting, or the camera. The best entries report error, bias, and repeatability, then compare those numbers across several sample types with clear statistics.
Project Variations
- Measure spinach, lettuce, and kale separately to see how leaf pigment changes prediction error.
- Compare tap water, bottled water, and filtered water to study how low-nitrate samples behave near the detection limit.
- Swap RGB averages for pixel histograms or HSV values to see which image feature gives cleaner calibration.
Learn More
- USDA FoodData Central: Search nitrate data for vegetables and compare your results with public reference values.
- PubMed: Search review articles on the Griess assay, nitrate reduction, and smartphone colorimetry.
- NIH PubChem: Look up nitrate, nitrite, and Griess reagent components for properties and safety details.
- USGS Water Data for the Nation: Find public water quality records and compare them with local tap water results.
- MIT OpenCourseWare: Review free analytical chemistry lectures on calibration, spectroscopy, and error analysis.
Biochemistry Category Guide
How to Do Real Biochemistry Research at Home: A High School Student’s Guide to Free Tools, Affordable Kits, and Public Databases →For next steps tailored to your interests, skill level, and timeline, work one-on-one with a MehtA+ mentor. Learn more about MehtA+ Science & Engineering Research Mentorship →
To discover more projects, visit the MehtA+ Science Fair Hub →
