-
-
Full project
-
Project after electrolysis
-
IoT Blynk interface
-
A section of the control board showing the O led screen and the three buttons
-
Electrolysis chamber
-
Bubbles of chlorine gas forming at the anode during electrollysis
-
Bubbles of chlorine gas forming at the anode during electrollysis
-
Bubbles of chlorine gas forming at the anode during electrolysis
-
Chlorine gas scrubber featuring 2 layers of fabric soaked in water with baking soda
-
Gas scrubber
-
The top of the device showing the gas fan and chlorine gas sensor
-
Control board
Imagine producing your own bleach (water disinfectant) using nothing more than an arduino/ESP 32 microcontroller, 65W of power, and basic salt water. This Arduino-controlled electrolysis system demonstrates how resource-constrained computing can solve critical infrastructure challenges transforming complex electrochemical processes into automated, edge-computing solutions that work anywhere, anytime, with an optional internet connectivity and no high-power requirements.
By leveraging embedded computing on minimal hardware, this device could drastically reduce waterborne diseases in communities where traditional computing infrastructure doesn't exist. It's not just about making bleach, it's about proving that sophisticated algorithms can run on constrained hardware to democratise access to clean water and health security.
Inspiration
As students and tech enthusiasts, we were deeply moved during a 2023 community outreach in Northern Uganda, where we witnessed a high influx of patients suffering from diarrheal diseases such as typhoid, cholera, and dysentery. Field investigations revealed that poor water sanitation was the root cause, with communities relying on contaminated water sources such as ponds and swamps. These water sources are occasionally filled by run-off rain water that is a mixture of sewer water, animal waste and fertiliser from farms which is ideal for microbial proliferation. For most households, when this water was collected, it was filtered with a cloth, and boiled only once before being stored in unhygienic drinking water storage containers, many with visible algal blooms inside. According to the WHO, diarrheal diseases are the third leading cause of death in children aged 1-59 months. A 2022 Ugandan study found that using protected water sources reduced diarrhoea cases by 73.5% compared to unprotected sources. Recognising the limitations of boiling water such as high energy demand, lack of scalability in water treatment, and no residual protection, we were inspired to explore a sustainable alternative in line with Sustainable Development Goal 6: Ensuring universal access to clean water and sanitation. With several days of brainstorming and revisiting my high school chemistry notes, I identified a cheap and viable method to purify water using sodium hypochlorite a broad spectrum antimicrobial agent which can be easily produced by electrolysis of commonly available and cheap salt water. My previous experience with Arduino micro-controllers and sensors enabled monitoring and optimisation of this process.
What it does
This Arduino-controlled electrolysis system produces sodium hypochlorite (bleach) at three customisable concentrations with automated safety controls and real-time monitoring:
Key Features:
Three concentration levels:
0.5% for surface disinfection (1 minute 9 seconds) 5% for laundry use (11 minutes 47 seconds) 10% for industrial bleach (23 minutes 34 seconds)
For disinfection of household drinking water the general guidelines are;
5.25% Sodium Hypochlorite: ~8 drops (0.5 mL) per gallon (3.8 liters) of water.
12.5% Sodium Hypochlorite: ~3 drops (0.2 mL) per gallon (3.8 liters) of water.
Meaning large volumes of drinking water can be disinfected by small volumes of sodium hypochlorite.
This project also features; .Automated process control using Faraday's law calculations .Real-time safety monitoring with chlorine gas detection .IoT connectivity via ESP32 for remote monitoring .Energy efficient: Operates at 65W (comparable to a light bulb) 74.4% efficiency in bleach production
User Interaction:
Preparation: 30g of table salt dissolved in 700ml water Selection: Choose target concentration via three switches Automated Production: System calculates time and monitors safety Real-time Display: OLED shows concentration, time remaining, temperature, and safety parameters
Applications:
Water purification: Large volumes of drinking water can be disinfected with small amounts Household cleaning: Replace expensive store-bought bleach Medical facilities: Cost-effective disinfection for hospitals and clinics Rural communities: Accessible solution for water-scarce areas
This project showcases resource-constrained computing in action—running sophisticated electrochemical calculations, real-time safety monitoring, and IoT connectivity on an Arduino Nano with just 32KB of memory and 16MHz processing power. The system demonstrates how edge computing can handle complex industrial processes using minimal computational resources.
Resource-Constrained Computing Features:
- Edge Processing: All calculations happen on 8-bit microcontroller locally
- Memory Optimization: Complete system runs in <2KB RAM
- Power Efficiency: 65W total power consumption enables solar/battery operation
- Offline-First: Works completely without internet connectivity
- Real-time Computing: <100ms response time for safety decisions
How we built it
Hardware Components:
Electrolysis Chamber: Glass jar with graphite electrodes (3:1 anode to cathode ratio) Control System: Arduino Nano with ESP32 for IoT connectivity Safety Features: MQ-series chlorine gas detector with alarm system Monitoring Sensors: TDS sensor, DS18B20 temperature sensor Gas Scrubbing System: Multi-layer fabric filter with baking soda solution Power Supply: 20V, 3.25A regulated supply User Interface: OLED display and three selection switches
Software Architecture: The Arduino forms the technological core, transforming a complex chemical process into a user-friendly automated device:
Resource-Constrained Computing Implementation:
Hardware Constraints Addressed:
- Limited Processing Power: Arduino Nano (16MHz, 32KB flash, 2KB RAM) handles complex Faraday's law calculations in real-time
- Memory Optimization: Streaming data processing instead of data storage, efficient variable typing
- Power Budget: Total system designed around 65W constraint suitable for renewable energy
- Connectivity Independence: Edge computing with optional IoT, not dependent on cloud processing
Algorithm Optimization for Constrained Hardware:
Optimized real-time calculation - single operation, minimal memory massFormed = (current * elapsedTime * M * systemEfficiency) / (n * F);
Control Algorithm:
Reads sensor inputs (TDS, temperature, chlorine gas levels) Controls electrolysis timing based on Faraday's law calculations Implements safety shutoffs when gas levels exceed thresholds
Calculation Engine: Uses Faraday's law to determine production time: Time = (target_concentration × volume × n × F × efficiency) / (current × M) Where: n=2 electrons, F=96,485 C/mol, efficiency=74.4%, M=74.44 g/mol Safety Systems:
Continuous chlorine gas monitoring (stops at >5% concentration) Temperature monitoring (optimal 15-45°C range) Automatic process termination upon target achievement
Construction Process:
Electrode Configuration: Strategic placement with anode at bottom for optimal mixing Gas Scrubbing: World War II gas mask-inspired filtration system Circuit Integration: Custom PCB with Arduino Nano controlling all subsystems IoT Implementation: ESP32 handles Blynk cloud connectivity for remote monitoring
Challenges we ran into
Technical Challenges:
Efficiency Optimization: Achieving the 74.4% efficiency required extensive calibration and testing of electrode configurations and current densities. Safety Implementation: Developing a reliable chlorine gas scrubbing system that could handle varying gas production rates while maintaining user safety. Sensor Accuracy: TDS readings were initially inconsistent due to electric field interference from electrodes. We had to switch to calculation-based methods using Faraday's law. Temperature Management: Preventing sodium chlorate formation by maintaining optimal temperature ranges (15-45°C) required careful monitoring and process control. Real-time Calculations: Implementing accurate Faraday's law calculations in Arduino code while managing multiple sensor inputs and safety checks simultaneously.
Design Challenges:
Compactness vs. Functionality: Balancing the need for a portable device with comprehensive safety and monitoring features. User Interface: Creating an intuitive system that non-technical users could operate safely in resource-limited environments. Cost Optimization: Designing an affordable system while maintaining industrial-grade safety and efficiency standards.
Accomplishments that we're proud of
Technical Achievements:
74.4% System Efficiency: Demonstrated consistent high-quality bleach production with minimal waste Automated Safety Systems: Zero safety incidents during extensive testing with real-time gas monitoring Energy Efficiency: 65W power consumption (35% less than a 100W bulb) makes it accessible for off-grid use Multi-concentration Production: Successfully produces three different bleach strengths for various applications
Social Impact:
Cost Savings: Eliminated recurring bleach expenses for our household (~$15-25/month savings) Accessibility: Created a solution suitable for resource-constrained communities Scalability: Designed for both household and institutional use Water Security: Provided a sustainable method for water purification in areas with contaminated sources
Innovation Highlights:
Arduino Integration: Transformed complex electrochemistry into user-friendly automation IoT Connectivity: Remote monitoring capabilities via Blynk platform Real-time Processing: Live calculation of production parameters using Faraday's law Safety Innovation: Gas scrubbing system inspired by historical gas mask technology
What we learned
Resource-Constrained Computing Mastery: Embedded Systems Design: Deep understanding of hardware limitations and how to maximize functionality within strict constraints Edge Computing Architecture: Designing systems that process data locally without cloud dependency Algorithm Optimization: Writing efficient code that performs complex calculations on minimal hardware Real-time Systems: Implementing safety-critical systems with guaranteed response times on constrained processors Power-Aware Programming: Optimizing code for minimal energy consumption while maintaining functionality
What's next for Arduino-Controlled Electrolysis System for Bleach Production
Immediate Improvements:
Compact Design: Develop a more integrated circuit board attached directly to the electrolysis chamber Portability Enhancement: Add handle and improve filling/emptying mechanisms for better usability User Experience: Create pre-calibrated salt containers and improve the user interface Power System: Integrate rechargeable battery system for complete off-grid operation
Technical Enhancements:
Advanced Monitoring: Implement pH sensors and more precise concentration measurement Machine Learning Integration: Develop predictive algorithms for optimal production parameters Mobile App Development: Create smartphone app for enhanced remote monitoring and control Automated Maintenance: Self-cleaning cycles and electrode maintenance indicators
Scaling and Deployment:
Production Scalability: Test and optimize for larger batch production (2-5 liter capacity) Manufacturing Design: Develop injection-molded housing for mass production Field Testing: Conduct extensive trials in target communities across different geographic regions Regulatory Compliance: Obtain necessary certifications for household and medical facility use
Market Expansion:
Educational Partnerships: Collaborate with schools and universities for STEM education programs NGO Partnerships: Work with international development organizations for deployment in underserved areas Commercial Applications: Develop variants for small businesses, restaurants, and healthcare facilities Franchise Model: Create training programs for local technicians and distributors
Research and Development:
Alternative Electrode Materials: Research cost-effective alternatives to graphite electrodes Energy Optimization: Explore solar panel integration and energy recovery systems Process Enhancement: Investigate mixed oxidant solutions and advanced electrolytic processes Environmental Impact: Conduct comprehensive lifecycle analysis and environmental impact studies
Long-term Vision:
Global Deployment: Establish manufacturing and distribution networks in target regions Technology Transfer: Open-source components to enable local innovation and adaptation Policy Advocacy: Work with governments to integrate into public health and water security programs Continuous Innovation: Establish ongoing R&D program for next-generation water treatment technologies
This project represents just the beginning of democratizing essential chemical production through accessible technology, with the potential to impact millions of lives worldwide through improved water security and reduced healthcare costs.
Built With
- arduino
- arduinoide
- esp32
- iot
Log in or sign up for Devpost to join the conversation.