Team ESB4
Bacteria Detection Device in Food Items (Prototype)
Project Overview
Team ESB4's Bacteria Detection Device represents an innovative approach to food safety monitoring, combining embedded systems, optical sensing, and machine learning to create a portable, affordable device for detecting harmful bacterial contamination in food and water samples. Unlike traditional laboratory methods that require expensive equipment, trained personnel, and hours or days to produce results, this prototype device provides preliminary screening results in minutes using a combination of spectrophotometry, turbidity measurement, and AI-powered analysis. The system targets detection of common foodborne pathogens including E. coli, Salmonella, and other coliform bacteria that cause foodborne illnesses affecting millions annually. This project addresses a critical public health challenge, particularly relevant in developing regions where food safety testing infrastructure is limited and contaminated food causes significant health and economic burdens.
Problem Statement
Foodborne illnesses caused by bacterial contamination affect over 600 million people globally each year, causing approximately 420,000 deaths according to WHO estimates. Traditional microbiological testing methods are time-consuming (24-72 hours for culture-based tests), expensive, require specialized laboratory facilities, need trained microbiologists, and are impractical for on-site or rapid screening applications. Street food vendors, small restaurants, water purification plants, and food processing facilities in developing countries often lack access to timely testing services, leading to contaminated products reaching consumers. Existing rapid testing kits, while faster, are often expensive per test, require specific conditions, and provide only binary yes/no results without quantification. There's an urgent need for accessible, affordable, portable detection systems that can provide quick preliminary screening to identify potentially contaminated samples requiring further testing, enabling faster intervention to prevent foodborne illness outbreaks and protect public health.
Solution & Approach
Our detection device uses optical analysis principles where bacterial presence affects light transmission and scattering properties of samples. The system employs a custom-designed chamber with precise light path control, an LED light source with specific wavelength (typically 600nm), and a photodiode sensor measuring light transmission through the sample. When bacteria are present in sufficient quantities, they increase sample turbidity, reducing transmitted light intensity—this principle is similar to spectrophotometry used in professional laboratories. The Arduino-based microcontroller reads analog signals from the photodiode, performs calibration corrections, and calculates turbidity levels. To enhance detection accuracy, we implemented a machine learning classification model trained on datasets of clean and contaminated samples across various food matrices. The ML model analyzes turbidity patterns, rate of turbidity change over time, and optional temperature data to classify samples as safe, suspect, or contaminated with confidence scores. Sample preparation involves a simple protocol where food/water samples are mixed with a culture medium designed to promote rapid bacterial growth, then placed in the detection chamber. Initial readings establish a baseline, and subsequent measurements track turbidity changes indicating bacterial proliferation. The device includes an LCD display showing real-time readings, classification results, and bacterial load estimates. A smartphone app provides enhanced functionality including reading history, data visualization, cloud sync for aggregated health monitoring, and alerts when dangerous levels are detected.
Technologies Used
The core controller is an Arduino Uno R3 providing adequate processing power for sensor readings and control logic while maintaining low cost and ease of programming. The optical system uses a 5mm white LED (6500K) with current-limiting resistor for stable light output, and a photodiode (BPW21) connected through a transimpedance amplifier circuit (using LM358 op-amp) to convert light intensity into measurable voltage. The detection chamber is 3D-printed in black ABS plastic with precise dimensions to maintain consistent light path length (typically 10mm), with optical windows using clear acrylic sheets. Temperature sensing uses a DS18B20 digital temperature sensor to monitor sample conditions and compensate for temperature effects on bacterial growth rates. Data display uses a 16x2 LCD with I2C interface. The machine learning model was developed using Python with scikit-learn library, training a Random Forest classifier on turbidity time-series data from controlled experiments with known bacterial concentrations. The trained model was converted to decision tree logic implementable on Arduino with limited memory. For the smartphone companion app (Android), we used MIT App Inventor with Bluetooth communication to the Arduino. Power is provided by a 9V battery or USB connection. The sample holders are disposable plastic cuvettes (1cm path length) to prevent cross-contamination between tests. Calibration standards use sterile water as zero turbidity reference and standardized bacterial suspensions for validation.
Challenges & Learnings
Achieving consistent and accurate measurements proved challenging due to numerous variables: ambient light leakage into the detection chamber causing false readings (solved by designing a light-sealed chamber), LED brightness variations with temperature and battery voltage (addressed through voltage regulation and baseline calibration before each test), and variations in sample preparation affecting results (mitigated by developing standardized protocols). The machine learning model required extensive training data which was difficult to obtain—we conducted controlled experiments culturing known bacteria concentrations, though we lacked access to pathogen strains and had to use safer proxy organisms like non-pathogenic E. coli. Sensitivity and specificity optimization involved balancing false positives versus false negatives; we tuned thresholds to minimize false negatives (missing actual contamination) at the expense of more false positives, prioritizing safety. Sample preparation complexity was a major usability concern—our initial protocols were too complicated for field use, so we simplified to a quick mixing step with pre-packaged medium, though this limited detection to rapidly growing bacteria. The device requires incubation time (2-4 hours typically) for bacterial growth to reach detectable levels, which is faster than traditional methods but still not truly instant. Validation against gold-standard microbiological methods was limited by resource constraints, so we focused on proof-of-concept with future plans for rigorous clinical validation. We learned that bridging the gap between laboratory science and field-deployable devices requires careful consideration of user experience, environmental variability, and practical constraints that aren't apparent in controlled settings.
Results & Impact
The prototype successfully demonstrated bacterial detection capabilities in controlled laboratory tests, achieving 78% accuracy in distinguishing contaminated samples from clean controls when bacterial concentrations exceeded 10^6 CFU/mL (colony-forming units per milliliter)—sufficient for indicating significant contamination. Detection time ranged from 2-4 hours depending on initial bacterial load and growth conditions, representing significant improvement over 24-48 hour traditional culture methods. The device showed promising results with water samples, detecting coliform bacteria indicators of fecal contamination. Cost analysis indicates the device could be manufactured for approximately $50-80 at scale, with per-test costs under $2 for disposable components and medium, making it economically viable for developing regions. The project was recognized as a finalist in the IPE-Sphere Project Fair organized by the SUST IPE Department, validating its innovation and potential impact. While the current prototype requires further development for commercialization—particularly clinical validation, regulatory approval, and robustness engineering—it successfully proves the concept of affordable, accessible bacterial detection. Potential applications extend beyond food safety to include water quality monitoring for rural communities, rapid screening in hospitals for bacterial infections, and quality control in food production facilities. The project has generated interest from local food safety authorities and NGOs working on public health initiatives. We're exploring partnerships for further development including clinical trials, enhanced machine learning models with larger datasets, and miniaturization for truly portable operation. This project demonstrates how interdisciplinary engineering combining optics, biology, embedded systems, and AI can address critical public health challenges with solutions appropriate for resource-limited settings.
- Designed a prototype device for detecting bacterial contamination in food using sensor-based analysis.
- Applied principles of microbiology and embedded systems to enhance food safety monitoring.
- Finalist in the IPE-Sphere Project Fair organized by the SUST IPE Department.