Water Purification for Drinking

From Sensors in Schools
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

  • The provision of clean drinking water is often severely limited in developing countries.
  • After natural disasters potable water infrastructure is often damaged which also limits potable water supplies.
  • A range of technologies are able to produce clean drinking water from contaminated water.
  • In a low carbon and resource constrained future solar distillation is a tried and proven way of producing clean drinking water for commmunities.
  • Distillation systems are also useful in treating wastewater because they can evaporate all water leaving behind a salt for waste disposal.

F-cubed Technology

  • F-cubed is a local manufacturer of solar distillation systems.
  • Solar distillation panels are approx 1.2m x 3m
  • Each panel can produce up to 20L of potable water per day.
  • A 25-50W solar PV panel is required to power a small water pump.
  • The water pump is rated at 23 Watts and operates at 12 Volts.

Mechanism of Operation

  • Dirty water is pumped to the top of the F-cubed panel. The pump uses a solar PV panel (no battery) to pump the water during the day when the sun is shining.
  • The water is dispersed across a black felt mat.
  • Water runs down the panel through the pores of the black felt mat mainly by the action of gravity.
  • As the drity water travels down the panel it is heated by the sun and some of the water evaporates.
  • Evaporated water rises and then condenses on a clear plastic film that covers the top of the F-cubed panel.
  • Condensed water droplets roll down the inside of the clear plastic film and collect at the bottom of the panel. This water is very clean and pure due to the distillation process.
  • The distilled water exits the F-cubed panel and is collected as clean water.
  • Dirty water also exits the F-cubed panel. This is the water that has not evaporated. It is collected separately and can be pumped back into the F-cubed panel to be distilled again.

F-cubed Brochure from web site

Monitoring the Performance of the Solar Distillation Panel

  • We need to develop some environmental sensors so we can monitor the performance of the solar distillation system.
  • Some examples are provided:
    • Amount of clean water produced - use load cells (similar to a bathroom scale) to measure the mass of water produced [1]
    • Measuring the conductivity, temperature and pH of dirty and clean water - Distilled water will have very low conductivity. Conductivity is a measure of salts and other impurities in water [2]
    • Monitoring the voltage of the solar panel - Measuring the voltage of the solar PV panel and pump circuit will tell us how long the pump is running during the day.
  • Luckily we can measure and test all these parameters using the Raspberry Pi and Arduino.
  • The Arduino Uno is a small microcontroller that is ideal for prototyping small electronic circuits.
  • At school it will be easier to develop all systems within the classroom and then relocate them into the field where the F-cubed solat distillation system will be located.
  • All that is required is power for the Raspberry Pi and WiFi access so that data from the Raspberry Pi can be sent to the internet (cloud).

Monitoring the Conductivity of a Solution using the Atlas Conductivity Probe

//This code was written to be easy to understand.
//Modify this code as you see fit.
//This code will output data to the Arduino serial monitor.
//Type commands into the Arduino serial monitor to control the EC circuit.
//This code was written in the Arduino 2.0 IDE
//This code was last tested 10/2022


#include <SoftwareSerial.h>                           //we have to include the SoftwareSerial library, or else we can't use it
#define rx 2                                          //define what pin rx is going to be
#define tx 3                                          //define what pin tx is going to be

SoftwareSerial myserial(rx, tx);                      //define how the soft serial port is going to work


String inputstring = "";                              //a string to hold incoming data from the PC
String sensorstring = "";                             //a string to hold the data from the Atlas Scientific product
boolean input_string_complete = false;                //have we received all the data from the PC
boolean sensor_string_complete = false;               //have we received all the data from the Atlas Scientific product




void setup() {                                        //set up the hardware
  Serial.begin(9600);                                 //set baud rate for the hardware serial port_0 to 9600
  myserial.begin(9600);                               //set baud rate for the software serial port to 9600
  inputstring.reserve(10);                            //set aside some bytes for receiving data from the PC
  sensorstring.reserve(30);                           //set aside some bytes for receiving data from Atlas Scientific product
}


void serialEvent() {                                  //if the hardware serial port_0 receives a char
  inputstring = Serial.readStringUntil(13);           //read the string until we see a <CR>
  input_string_complete = true;                       //set the flag used to tell if we have received a completed string from the PC
}


void loop() {                                         //here we go...

  if (input_string_complete == true) {                //if a string from the PC has been received in its entirety
    myserial.print(inputstring);                      //send that string to the Atlas Scientific product
    myserial.print('\r');                             //add a <CR> to the end of the string
    inputstring = "";                                 //clear the string
    input_string_complete = false;                    //reset the flag used to tell if we have received a completed string from the PC
  }

  if (myserial.available() > 0) {                     //if we see that the Atlas Scientific product has sent a character
    char inchar = (char)myserial.read();              //get the char we just received
    sensorstring += inchar;                           //add the char to the var called sensorstring
    if (inchar == '\r') {                             //if the incoming character is a <CR>
      sensor_string_complete = true;                  //set the flag
    }
  }


  if (sensor_string_complete == true) {               //if a string from the Atlas Scientific product has been received in its entirety
    if (isdigit(sensorstring[0]) == false) {          //if the first character in the string is a digit
      Serial.println(sensorstring);                   //send that string to the PC's serial monitor
    }
    else                                              //if the first character in the string is NOT a digit
    {
      print_EC_data();                                //then call this function 
    }
    sensorstring = "";                                //clear the string
    sensor_string_complete = false;                   //reset the flag used to tell if we have received a completed string from the Atlas Scientific product
  }
}



void print_EC_data(void) {                            //this function will pars the string  

  char sensorstring_array[30];                        //we make a char array
  char *EC;                                           //char pointer used in string parsing
  char *TDS;                                          //char pointer used in string parsing
  char *SAL;                                          //char pointer used in string parsing
  char *GRAV;                                         //char pointer used in string parsing
  float f_ec;                                         //used to hold a floating point number that is the EC
  
  sensorstring.toCharArray(sensorstring_array, 30);   //convert the string to a char array 
  EC = strtok(sensorstring_array, ",");               //let's pars the array at each comma
  TDS = strtok(NULL, ",");                            //let's pars the array at each comma
  SAL = strtok(NULL, ",");                            //let's pars the array at each comma
  GRAV = strtok(NULL, ",");                           //let's pars the array at each comma

  Serial.print("EC:");                                //we now print each value we parsed separately
  Serial.println(EC);                                 //this is the EC value

  Serial.print("TDS:");                               //we now print each value we parsed separately
  Serial.println(TDS);                                //this is the TDS value

  Serial.print("SAL:");                               //we now print each value we parsed separately
  Serial.println(SAL);                                //this is the salinity value

  Serial.print("GRAV:");                              //we now print each value we parsed separately
  Serial.println(GRAV);                               //this is the specific gravity
  Serial.println();                                   //this just makes the output easier to read
  
//f_ec= atof(EC);                                     //uncomment this line to convert the char to a float
}