Overview


Here, we presented a hardware system designed to support the bioremediation of heavy metals using genetically engineered E. coli. The system integrated Reaction, Filtration & Separation, and Disinfection Tanks, all controlled by an automated ESP32 microcontroller, allowing for remote monitoring and high automation. The modular design ensured safety, environmental friendliness, and cost-effectiveness, making it suitable for wastewater treatment plants. By optimizing heavy metal removal efficiency, this hardware provides a scalable and practical solution for industrial applications.


1. Background

1.1 Current Heavy Metal Removal Methods

Heavy metal pollution is becoming increasingly severe worldwide. Heavy metals like mercury (Hg), lead (Pb), and cadmium (Cd) are discharged into the environment through wastewater, posing long-term threats to ecosystems and human health. These pollutants spread through water bodies, leading to secondary pollution of soil. Residents in affected areas are exposed to these heavy metals for extended periods, which can result in chronic poisoning, neurological diseases, kidney dysfunction, and increased cancer risk.

Traditional physical and chemical treatment methods, such as chemical precipitation, adsorption, ion exchange, and electrochemical methods, have certain effects on removing heavy metals but face the following major challenges:

Large Consumption of Materials: Methods such as adsorption and chemical precipitation involve high usage of consumable materials, which need regular replenishment, further increasing costs.

Introducing Extra Pollutants: Traditional methods can introduce extra pollutants, such as aluminum chloride in chemical precipitation, which require additional treatment and can lead to further environmental issues.

High Energy Usage: Processes like electrochemical treatment often demand substantial energy, making them less sustainable and more expensive over time.

1.2 Bioremediation

With increasingly strict environmental regulations and heightened public awareness of environmental protection, there is an urgent need to develop a highly efficient, low-cost, and environmentally friendly technology for heavy metal removal. Bioremediation has emerged as a promising solution. This method not only reduces the use of chemical reagents but also lowers costs and significantly reduces the risk of secondary pollution, making it a key focus in industrial wastewater treatment research.

We engineered E. coli to express rice metallothionein (OsMTI-1b) for metal binding and a urease gene cluster from Sporosarcina pasteurii for Microbiologically Induced Calcite Precipitation (MICP). In tests, the strain expressing both genes demonstrated the best overall performance, achieving maximum removal rates of 85.78% for cadmium and 98.98% for lead. Our engineered DH5α strain is scalable, eco-friendly, and ideal for use in industrial wastewater treatment plants. Here, we built a hardware system for our bacteria to ensure high heavy metal removal rates, providing wastewater treatment plants with a ready-made solution as a compelling option for integrating our technology in the real world.

2. Goals

Our hardware has the following goal to achieve.

2.1 Basic Goals:

Safety:

Requirement: All wastewater treatment operations must be safe for both the operators and the surrounding environment, without producing toxic by-products.

Achievement: The equipment must be designed using non-toxic and harmless materials to ensure that no harmful by-products are released during the treatment process. A sealed system should be designed to prevent any pollutant leakage, while also providing protective measures for operators, such as safety manuals and emergency protocols.

Environmental Friendliness:

Requirement: The system should reduce reliance on chemical reagents through the use of biotechnology, thereby avoiding secondary pollution.

Achievement: Use proteins and enzymes to remove heavy metals, reducing the use of chemical reagents. Avoid the use of potentially hazardous chemicals, ensuring that the by-products of the reaction are harmless to the environment.

Cost Control:

Requirement: The system should adopt a modular design, making the equipment and operational costs relatively low, enabling its promotion and use in small and medium-sized enterprises.

Achievement: Choose inexpensive, durable materials to lower production and usage costs while ensuring treatment efficiency.

Stability:

Requirement: The equipment must operate stably under different wastewater conditions, consistently and effectively removing heavy metals.

Achievement: By integrating an automated control system, treatment parameters can be adjusted to ensure stable long-term operation.

2.2 Advanced Goals:

Efficiency Improvement:

Requirement: The efficiency of heavy metal removal should be significantly enhanced, enabling the system to efficiently handle high concentrations of heavy metals, particularly hazardous ones like mercury, lead, and cadmium.

Achievement: Utilize optimized reaction time and stirring mechanisms to ensure that heavy metals in high-concentration wastewater can be quickly and effectively removed.

High Automation:

Requirement: The equipment should be highly automated, capable of automatically controlling the wastewater treatment process, minimizing manual intervention, and allowing for remote monitoring and control to improve processing efficiency.

Achievement: Use intelligent control algorithms and a web-based remote control platform to reduce manual intervention and achieve fully automated operation.

Adaptability:

Requirement: The system should be capable of handling various types of heavy metal wastewater and maintain high removal efficiency under different industrial wastewater conditions, adapting to different wastewater compositions.

Achievement: Design a system capable of treating various types of heavy metals, with the reaction tank and filtration system offering diversified adjustment capabilities to adapt to different types of heavy metal wastewater.

Compatibility:

Requirement: The system should be compatible with and easily integrate into existing wastewater treatment plants, enhancing heavy metal removal without major modifications.

Achievement: The overall structure of the hardware is designed similarly to current wastewater treatment facilities, with inlet and outlet connections, as well as sludge discharge openings compatible with current facilities.


3. System Design

 

3.1 System Architecture

Physical Layer (Reaction, Filtration, and Disinfection):

Reaction Tank: A stirrer ensures that heavy metals and bacteria in the wastewater fully react, maximizing treatment efficiency.

Filtration & Separation Tank: A water pump transfers water and separates sediment, ensuring that clean water flows to the next stage.

Disinfection Tank: A UV lamp disinfects the treated water, eliminating any remaining bacteria.

Control Layer (ESP32 Control System):

Using the ESP32 microcontroller, the system controls each physical layer via Wi-Fi and a web interface, supporting remote monitoring and operation to ensure automated system performance.

Application Layer:

Provides a user interface for remote access and control of the device. Communication with the system is achieved through WebSocket, allowing control of the stirrer, water pump, and UV lamp.

Figure 1. Preliminary process flow diagram of heavy metal precipitation, separation, and disinfection.

Figure 2. System architecture.

3.2 Functional Flowchart

Figure 3. Functional flow chart of our heavy metal removal system.


4. Part Design & Build

4.1 Reaction Tank

The Reaction Tank is where our engineered bacteria and the heavy metal-containing water are introduced. In this tank, the bacteria convert heavy metal ions into precipitates through Microbiologically Induced Calcite Precipitation (MICP).

The reaction tank consists of a stirring structure, water pumping, and aeration modules. The stirring motor we used is a gear reduction motor with a 23.1 reduction ratio, and the control module is a PWM MOSFET control module.

Figure 4. Gear motor that provides power for stirring

Figure 5. Photo of the Reaction Tank.

 

4.2 Filtration & Separation Tank

In the Filtration & Separation Tank, the heavy metal precipitates produced by the bacteria, along with the bacteria themselves, coagulate and settle at the bottom, allowing them to be separated from the water.

Inclined Plates/Tubes Sedimentation

The sedimentation efficiency is improved primarily by increasing the sedimentation area and reducing the distance that particles need to settle. Therefore, we introduced inclined plates/tubes to facilitate sedimentation. The inclined plates/tubes are arranged at an angle of approximately 60°, and water flows vertically through the inclined tube area, with suspended particles sliding down along the inner walls of the tubes. Since the particles only need to settle a short distance to reach the inclined surface, the sedimentation speed is accelerated. Additionally, the inclination of the plates/tubes creates a larger effective sedimentation area within the same tank volume, thereby also improving the efficiency of particle separation.

Figure 6. Schematic diagram of sedimentation when water flows through an inclined tube.

Figure 7. Schematic diagram of the design of repeated inclined plates.

Iterations

Version 1

The tank and the inclined plates were made of acrylic. Material is cut into panels using laser cutting. The panels were then assembled using glass glue. The entire process was done manually, so the alignment of the inclined plates was not perfect.

Figure 8. Version 1 of the Separation Tank.

In tests, we found it not working well. To connect with a PVC outlet, there is a small horizontal surface at the bottom of the tank. After a simple test, it was found that sediments accumulate at the corner, making it difficult for them to flow down into the outlet.

Figure 9. Test of Version 1 of the Separation Tank. Sediments accumulated in the circled area.

Additionally, the size of the first version of the Separation Tank was too large. When the water from the Reaction Tank was pumped in, it just filled the Separation Tank, leaving no room for water flow. As a result, we updated the design.

Version 2

Based on the experience from Version 1, Version 2 was built by 3D printing. Inclined plates were replaced by tubes to further increase the surface area, and the volume was designed to be 1 liter. 3D printing allowed for a smoother structure between the funnel and the outlet to avoid unwanted accumulation of sediments.

Figure 10. Perspective view of Version 2 of the Separation Tank. The red arrows show the direction of water flow.

Figure 11. Front view of Version 2 of the Separation Tank.

Figure 12 Top view of Version 2 of the Separation Tank.

Version 2 did not undergo actual sedimentation testing because the printed object was not transparent, making it impossible to observe the water flow and sedimentation. We only tested it with pure water and observed unstable water flow, likely due to the wide space between each row of tubes.

Version 3

Based on the two previous versions, Version 3 has a transparent surface with a honeycomb structure for the inclined tubes. The spacing between the honeycomb tubes is tight and orderly. A connecting vessel structure is used between the water inlet and the tank to ensure that the water flows through the inclined tubes from the bottom to the top.

Figure 13. Perspective view of Version 3 of the Separation Tank.

To observe the water flow and sedimentation in detail, we used transparent materials to 3D print the funnel this time. After printing, the object was polished, resulting in a clear transparent surface. The honeycomb-like inclined tubes were printed using standard PLA material. A 100-micron mesh filter was added at the outlet to filter out small particles floating on the top, serving as the final filtration.

Figure 14. Filter at the outlet of the Separation Tank.

Figure 15. Version 3 of the Separation Tank.


4.3 Disinfection Tank

The core of the Disinfection Tank is a UV lamp. We selected a submersible sterilization UVC lamp commonly used in wastewater treatment. The Disinfection Tank is wrapped in aluminum foil to prevent UV exposure to humans. The UV lamp requires a ballast to operate, and the control method involves using a relay to connect to 220V AC power.

Figure 16. The UVC lamp and the ballast.

Figure 17. The appearance of the Disinfection Tank.

4.4 Control System

We designed a Webapp interface for remote control. According to the system architecture diagram mentioned earlier, the WebSocket protocol is used for communication. The commands from the mobile interface are sent to the device.

The logic flow of the control system is as follows:

System Initialization: The ESP32 is initialized and connected to Wi-Fi.

Waiting for Control Input: The system establishes a WebSocket connection and waits to receive commands from the remote Web interface.

Executing Commands: Adjust the PWM of the stirring motor to control the stirring in the reaction tank.

Control the switching direction of the water pump: the forward direction transfers water to the filtration tank, and the reverse direction pumps air into the reaction tank to supply oxygen to the bacteria, maintaining their activity.

Control the on/off state of the UV lamp for disinfection.

Continuous Monitoring: The system continuously monitors the input and maintains the device in a preset operational state, cyclically executing each operation until manually stopped.

Figure 18. The flow chart of the control system of the heavy metal removal device.

 

4.5 Circuits

The motor of the peristaltic pump rotates forward when power is supplied in the forward direction and reverses when the polarity is reversed. The reaction tank requires aeration to provide sufficient oxygen for the bacteria, maintaining their activity. In reverse mode, the pump supplies air to the reaction tank. A circuit is designed to control the motor's direction. The motor is a 12V DC motor, and two relays are used to achieve this control. The control logic is shown in the table below.

Relay A

Relay B

Motor

HIGH

HIGH

Stop

HIGH

LOW

Forward rotation

LOW

HIGH

Reverse rotation

LOW

LOW

Stop

Figure 19. Double relay motor direction control circuit diagram.

Figure 20. Circuit diagram of the heavy metal removal device.

 

4.6 Application Interface

To better control the heavy metal treatment and sediment separation biological device, a simple mobile WebApp interface was designed. The main controls are buttons. The first is a slider input for adjusting the PWM value, which controls the speed of the stirring motor. The second button controls the direction of the peristaltic pump. The final button controls the UV lamp, which sterilizes the filtered water. The WebApp interface communicates via WebSocket.

Figure 21. Mobile application interface.


5. Test

5.1 Preparation

In this hardware test, we ideally needed 8 liters of heavy metal-contaminated water to add our bacteria into. However, we think it was too dangerous for our team to handle such a large volume of dangerous liquid. In small-scale wet lab experiments, we have already determined that the heavy metal carbonates precipitated by our engineered E. coli via MICP have a diameter of around 200 μm. So, for safety reasons, we chose to use calcium carbonate powder with a similar particle size (180 μm) as a substitute for the heavy metal precipitates in the hardware test.

Figure 22. 80 mesh (approximately 180 μm in diameter) calcium carbonate powder.

To prepare for testing, we assembled the Reaction Tank, Filtration & Separation Tank, and Disinfection Tank into a complete heavy metal removal device, as shown in Figure 23 below.

Figure 23. Front view of the complete heavy metal removal system.

Figure 24. Electronic devices in the heavy metal removal system.

Before beginning the comprehensive test, we separately tested the pump-controlling dual relay module and the UV lamp.

Video 1. Dual relay test.

Video 2. UV lamp test.

5.2 Comprehensive test

Step 1: 100g of calcium carbonate powder was added to the reaction tank. The first step was to start the stirring. The speed can be controlled via a slider on the application interface, as shown in Video 3.

Video 3. Stirring motor activation in the Reaction Tank.

Step 2: To maintain the activity of the bacteria in the Reaction Tank, oxygen needs to be supplied. Our peristaltic pump can be controlled in reverse to pump air into the reaction tank. The motor direction can be controlled via the application interface. Aeration can be seen in Video 4.

Video 4. Starting aeration by reversing the peristaltic pump.

Step 3: The sediments in the Reaction Tank floated up and the peristaltic pump started to rotate forward. The water was pumped into the Filtration & Separation Tank with inclined tubes.

Video 5. Pumping water from the Reaction Tank and Filtration & Separation Tank.

Sediments settled inside the inclined tubes and quickly accumulated in the funnel and at the outlet. Details can be seen in Video 6.

Video 6. Sediments settling.

Step 4: The UV lamp was activated via the application interface to sterilize the filtered water.

Video 7. UV sterilization.

See Video 8 for the full process of our heavy metal removal system.

Video 8. Heavy metal removal system.

Step 5: After filtration and sterilization, the treated water was taken to examine for cleanliness. In Video 9, the water appeared clear, and the sediment has been effectively removed.

Video 9. Water quality checking.


6. Conclusion

In this experiment, our biological wastewater treatment device successfully validated its functionality, demonstrating key highlights:

The Reaction Tank features adjustable-speed stirring and aeration to enhance bacterial activity, ensuring optimal reaction results. It is also equipped with a mobile phone remote control for easy operation. The Filtration & Separation Tank shows excellent sedimentation performance, with the honeycomb-like structure enabling sediments to quickly settle into the bottom funnel, while a mesh filter at the outlet ensures thorough filtration. Finally, the Disinfection Tank uses a UV lamp, controlled by the mobile phone, to thoroughly sterilize the treated wastewater, resulting in clean treated water with no visible sediment.

In conclusion, we successfully developed a device suitable for use with our engineered E. coli to effectively remove heavy metal ions from water. This device is scalable and applicable in real-world settings, as it is designed to be compatible with existing wastewater treatment plants.


7. Future Improvements

Higher Intelligence Level: We plan to introduce sensors to further monitor key parameters in the reaction process, such as heavy metal concentrations and pH levels. This will enable real-time adjustment and automated processing, making the system more intelligent.

Industrial Wastewater Validation: The next stage will involve testing the system's performance in real industrial heavy metal-polluted wastewater to validate the device's effectiveness in more complex environments.

Modular Upgrades: Based on the tests, future versions will further optimize the structure of the tanks, and software upgrades will enhance control precision and system integration.

*Attachment

Hardware Source Code.pdf