Categories
TUTORIALS

Prototype of Smart Water Aeration System: Using an Arduino Turbidity Sensor and a DC Motor

Introduction

The goal of our group project is to set up a smart CSO water purification system with a combination of four different types of water quality sensors, a simplified aeration installation, and active carbon. In this tutorial, we will use a turbidity sensor to monitor the quality of water (click here to know more about turbidity and here to know about the sensor we use), and a DC motor to represent the aeration system (a real aeration system is usually too costly, and one of the core parts is a vent which is driven by a motor). The motor will automatically be triggered once the water quality hit the standard line.

Contents

  • Part list
  • Set up and wiring
  • Run the code
  • Test video

Part List

Set up and wiring

Looking back at the tutorial for motors, we know that the dc motor in the Arduino Kit performs best with a voltage no less than 5V.  However, the Arduino can only output a voltage a little bit below 5V, and that is why we will add an external 9V battery to ensure the power source.

The turbidity sensor module should be connected to Arduino only using three pins: 5V, GND and A0. Be careful when you are connecting the sensor to the adaptor — the cable would only work when it is connected in the following way:

Pictures below are a wiring photo and a Fritzing diagram shows how the circuit is wired.

Wiring

Circuit Diagram

Run the Code

There is an “analog-digital” switch on the turbidity sensor adaptor which switches between analog mode and digital mode. According to the official guide, when in analog mode, the output value decreases at high turbidity. When in digital mode, the output pin goes high when the turbidity reaches a threshold value, set by the onboard potentiometer.  In this tutorial, we want to know the NTU of the water, so we will use the analog mode.

The same official guide gave this graph with an equation that relates the voltage from the sensor to turbidity:

Note that this equation is only applicable when the sensor gives out around 4.2 (±0.3)volts at no turbidity.  If your sensor does not give the right reading, pry open the sensor and carefully turn the trimmer until you could get a 4.2V output when the sensor is in clean water.

(I did not pry open my sensor, because it worked well. The photo above is from this website.)

Upload the following code to your Arduino:

Your serial monitor will be delivering the reading like this (when the sensor is not dipped into the water) :

Test Video

Here’s the Smart Water Aeration System in action:

 

2 replies on “Prototype of Smart Water Aeration System: Using an Arduino Turbidity Sensor and a DC Motor”

Leave a Reply

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