Pages: [1] 2   Go Down
Author Topic: Automatic Toilet Flusher  (Read 3162 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Sr. Member
****
Karma: 4
Posts: 310
Posts: 40382
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A distance sensor senses if someone is present.  Once they leave, a servo pulls a fishing line which flushes the toilet.  



This is a proof of concept version 1.0, it could be made to look prettier.  
Ingredients:
1 servo
30 lb test fishing line
IR distance sensor http://www.sparkfun.com/commerce/product_info.php?products_id=242

Here's a different version that inspired me, it was made with legos: http://www.dexterindustries.com/Project-eFlush.html#

Tips if you make your own:
I made the end of the lever towards the handle a bit shorter so that the force would be spread out over a greater distance, resulting in less strain on the servo.
The mechanism has to be secured, because it wants to push upwards and to the side.  I put a piece of wood underneath the lip of the lid to keep it from moving upwards.  I also have a piece going down in the back to keep it stable.  Maybe you could use a strap from front to back to hold it in place.  

Code:
#include <ServoTimer1.h>
ServoTimer1 servo1;

int sensor=0;
int sensorPin=5; //distance sensor on analog pin 5

int PreparingToFlush=0;

void setup() {
  Serial.begin(9600);          
  servo1.attach(10); //servo data line on pin 10
  servo1.write(3);
}


void loop() {
sensor=analogRead(sensorPin);



if (sensor > 100){ //if distance sensor detects someone
  delay(2000);  // wait
  sensor=analogRead(sensorPin);
  if (sensor > 100){ // check again to make sure someone is actually there
  PreparingToFlush=1;
  }
}

if (PreparingToFlush==1){ //if a person has been detected
  if (sensor < 100){ // if the person has now left
  
  servo1.write(175); //FLUSH
  delay(5000);
  servo1.write(3);
  delay(1000);
  
  PreparingToFlush=0;  //reset the trigger
}
}  
  
  delay(10);
}
« Last Edit: September 24, 2010, 10:52:06 pm by Big_Oil » Logged

Offline Offline
God Member
*****
Karma: 1
Posts: 733
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Someone ALWAYS beats me to it!!! I was going to do this, but never got around to it... Good work!
Logged

0
Offline Offline
Sr. Member
****
Karma: 18
Posts: 401
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Probably needs some refining; but you did it  smiley-wink

The place of Aduino is definitly ... anywhere  ;D ;D ;D
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Looking good, sir.  Where will the ass wiping mechanism be attached?
Logged

Central Europe
Offline Offline
Edison Member
*
Karma: 7
Posts: 1220
Use the Source, Luke.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Where will the ass wiping mechanism be attached?
That's stage 2. Here's a demo version being tuned in the lab:



Korman
« Last Edit: September 26, 2010, 01:46:38 pm by Korman » Logged

0
Offline Offline
Sr. Member
****
Karma: 4
Posts: 310
Posts: 40382
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sigh.
Logged

UK
Offline Offline
God Member
*****
Karma: 13
Posts: 903
Twitter: @simonmonk2
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Nice.

We definitely need to see a video of this working - with suitable editing of course.
Logged

--
My New Arduino Book: http://www.arduinobook.com

Mercer, PA USA
Offline Offline
Jr. Member
**
Karma: 2
Posts: 55
Arduino & Led's Rock:-)
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

for version 2 you should just have the servo string pull sideways/up on the middle/bottom of the chain that hangs down inside the toilet off the handle arm so you can't see it and can still use the handle as normal but the servo could also flush it
Logged

Ca, USA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 95
Slow learner, ME in a programmers world
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

make sure your board is rust proof and the wood is water proof just in case of any splash diarrhea explosion damage. it would suck to have poo marks everywhere smiley-sad

Other than that, looks good
« Last Edit: October 07, 2010, 03:26:01 pm by T86157 » Logged

0
Offline Offline
Sr. Member
****
Karma: 4
Posts: 310
Posts: 40382
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Good thinking wediggers.  I saw that someone did something like that: http://toolex.blogspot.com/2008/05/arduino-flush-o-matic.html

I was concerned that the moisture might disable the servo.  I'll try it anyway and put my servo on the line for the sake of progress.  I think I'll replace their wire mounting setup because it lifts the lid up a bit, some strong fishing line would lay flat and keep the lid tight.  
Logged

0
Offline Offline
Sr. Member
****
Karma: 4
Posts: 310
Posts: 40382
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think I've made this project as simple as possible.  There is no apparatus needed to flush it.  I mounted the servo inside the toilet tank by just tying a knot in the servo wire.  



The knot is outside the porcelain lid so that the servo does not fall into the tank.
The fishing line is connected to a hook, which you can use to hook onto the chain inside the toilet tank.  If you need the line to be tighter you can just hook lower down on the chain.  
I wrapped the servo wire around the servo and taped it so that the wire wouldn't pull out or damage something internally, but maybe that part is not even necessary.
I have had the servo inside the tank for about a week now and so far it is still working fine, despite the moisture.  
Here it is hanging in the tank:



I have also made some adjustments to the code:
Code:
#include <ServoTimer1.h>
ServoTimer1 servo1;

int sensor=0;
int sensorPin=5; //distance sensor on pin 5

int PreparingToFlush=0;

void setup() {
  Serial.begin(9600);          
  servo1.attach(10); //servo data line on pin 10
  servo1.write(3);
  
 // digitalWrite(3,HIGH);
}


void loop() {
sensor=analogRead(sensorPin);

Serial.println(sensor);


  
 if (sensor > 90){ //if distance sensor detects someone
  delay(2000);  // wait
  sensor=analogRead(sensorPin);
  Serial.println("Sensing");
  if (sensor > 90){ // check again to make sure someone is actually there
  PreparingToFlush=1;
  digitalWrite(13, HIGH);
  
  Serial.println(sensor);
  }
}

if (PreparingToFlush==1){ //if a person has been detected
  if (sensor < 60){ // if the person has now left
  delay(1000);
  sensor=analogRead(sensorPin);
  if (sensor < 60){
  
  servo1.write(175); //FLUSH
  digitalWrite(13, LOW);
  delay(9000);
  servo1.write(3);
  delay(1000);
  
  PreparingToFlush=0;  //reset the trigger
}
}  
}  
  
  
  delay(10);
}
« Last Edit: October 15, 2010, 08:42:16 pm by Big_Oil » Logged

Netherlands
Offline Offline
Sr. Member
****
Karma: 1
Posts: 290
(:-)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What does the misses say?


Looks cool by the way!
« Last Edit: October 16, 2010, 11:20:03 am by wortelsoft » Logged

NYC
Offline Offline
Full Member
***
Karma: 0
Posts: 129
The singularity is near!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I know my wife will like it. She is quite tired of the children forgetting to flush. They are very lazy.

But seriously, has anyone ever had trouble with an overflowing toilet? The float shut-off value in the tank failed and the water overflowed from the top of the tank. It was clean water, but the flood caused over $10k in damage. I was thinking about building some kind of moisture alarm.
Logged

Netherlands
Offline Offline
Sr. Member
****
Karma: 1
Posts: 290
(:-)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The toilets I now (here in the Netherlands) have a hollow tube which is pulled up by lever to flush.
But when the water level rises to much, the water will go over the top of the tube and into toilet.
So you can not get an overflowing toilet.
Logged

Central Europe
Offline Offline
Edison Member
*
Karma: 7
Posts: 1220
Use the Source, Luke.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This concept with the hole at the top to prevent overflows seems to be too modern for our brothers in the United States of America. After all, it has been invented and pretty standard in continental Europe for only the past 70 years.

Korman
Logged

Pages: [1] 2   Go Up
Jump to: