Arduino Shades of Grey Water
Provoked by this year's HackADay Prize theme of saving the planet, this cheap hillbilly DIY Arduino grey water recovery and hands free faucet design was built with focus on cost efficiency. The necessary components of this project totaled less than 40$US and expended no more than 4 man (not woman) hours. The additional LCD display reveals the seconds of operation and volume in liters of grey water saved. Multimedia and coding below is of the prototype model.


// Arduino Shades of Grey Water
// Vije Miller

#include "LiquidCrystal.h"
#include "CapacitiveSensor.h"

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

CapacitiveSensor sinkcap = CapacitiveSensor(6, 7);

const int floatswitch = 8;
const int sinkrelay = 10;
const int tankrelay = 9;

const int sinkled = 14;
const int tankled = 15;

int count = 0;
int floatstate = 0;
int sec = 0;
int lit = 0;

void setup() {

Serial.begin(9600);

pinMode(sinkrelay, OUTPUT);
pinMode(tankrelay, OUTPUT);
pinMode(sinkled, OUTPUT);
pinMode(tankled, OUTPUT);

pinMode(floatswitch, INPUT);

lcd.begin(16, 2);
lcd.print("Initializing...");
delay(100);
lcd.clear();
}

void loop() {

long sinkrun = sinkcap.capacitiveSensor(30);
floatstate = digitalRead(floatswitch);
// Serial.println(sinkrun);
// Serial.println(floatstate);

if (sinkrun > 2500) {
digitalWrite(sinkrelay, HIGH);
digitalWrite(sinkled, HIGH);
} else {
digitalWrite(sinkrelay, LOW);
digitalWrite(sinkled, LOW);
};

if (floatstate == LOW) {
digitalWrite(tankrelay, HIGH);
digitalWrite(tankled, HIGH);
++count;
} else {
digitalWrite(tankrelay, LOW);
digitalWrite(tankled, LOW);
};

sec = (count / 8);
lit = (count * 0.055);
lcd.setCursor(0, 0);
lcd.print("Seconds");
lcd.setCursor(8, 0);
lcd.print(sec);
//Trouble Shoot Sensor
//lcd.setCursor(12, 0);
//lcd.print(sinkrun);
lcd.setCursor(0, 1);
lcd.print("Liters");
lcd.setCursor(8, 1);
lcd.print(lit);

delay(175);
}

Archive
http://hackaday.com/2015/05/30/50-shades-of-gray-water-reuse/
https://hackaday.io/project/5711-arduino-shades-of-grey-water
http://blog.atmel.com/2015/06/02/creating-an-automated-grey-water-and-hands-free-faucet-system-for-40/
https://blog.adafruit.com/2015/12/22/arduino-shades-of-grey-water/

22:10:34 62-015