Automatic Toilet Flusher


Closed Thread
Results 1 to 40 of 99

Hybrid View

  1. #1
    Join Date
    Jul 2007
    Posts
    67

    Default Automatic Toilet Flusher

    Hi everyone maybe you can help me out

    My room mates never flush the toilet and no matter how much I yell at them
    they still do not flush the toilet.

    I want to build an automatic toilet flusher so all they have todo is pass there hand by it or just have a timer when it detected someone.

    Here's what I have an idea of what I need

    1 servo

    1 Pic micro controller 16F627A

    1 Ir receiver

    1 Ir led

    and I already know the resistors and caps I need.

    Should I go with a different approach for programing or do you think that this sounds like a pretty solid toilet flusher?

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Talking 1st idea : Change the room mate !!!

    Hi,

    2nd Idea :

    " My room mates never flush the toilet and no matter how much I yell at them
    they still do not flush the toilet."

    Is it really their duty to do that ...


    Now, talking electronics ...

    the "industrial" toilets flushers work like that ... and some I know ( mainly highway and hospital toilets ) use the 16F628 chip !!!

    the only difference is commercial ones use an electro-valve.


    Interesting point ...

    Think to what happens if mains failure lasts a bit ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Lightbulb The mechanical side...

    Quote Originally Posted by Techbuilder View Post
    Hi everyone maybe you can help me out

    My room mates never flush the toilet and no matter how much I yell at them
    they still do not flush the toilet.

    I want to build an automatic toilet flusher so all they have todo is pass there hand by it or just have a timer when it detected someone.

    Here's what I have an idea of what I need

    1 servo

    1 Pic micro controller 16F627A

    1 Ir receiver

    1 Ir led

    and I already know the resistors and caps I need.

    Should I go with a different approach for programing or do you think that this sounds like a pretty solid toilet flusher?
    Hi Techbuilder,

    No sense “re-inventing the wheel”.
    To get an idea of various ways, already in use.

    Paste this:
    automatic flush infrared

    Into here:
    http://www.google.com/patents

    It is perfectly legal and acceptable to adopt patent ideas for your own use, but not for resale or distribution.
    (Edit: For the record. The above statement is incorrect. It is NOT “legal and acceptable to adopt patent ideas for your own use”. The law allows some very special exceptions but I was in error stating this so broadly. Thanks to tenaja for correcting my mistake. –Adam-)

    You can get an idea of what is needed to “do the job”. The whole mechanical side may be a problem.

    -Adam-
    Last edited by Pic_User; - 30th January 2008 at 16:47. Reason: Mis-stated fact
    Ohm it's not just a good idea... it's the LAW !

  4. #4
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Here is another idea.

    Install all your IR equipment there.

    But, connect the circuit to the door lock.

    If the toilet is NOT flushed, the door remains locked.


    This way, your roomies will learn to listen to you and also will learn to flush it.

    When they eventually flash, play an MP3 saying "AHAA !"


    --------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  5. #5
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi,

    On Monday, Lego celebrated the 50th anniversary of the day
    it filed its first patent for the iconic plastic brick....

    Lego Mindstorms NXT automatic toilet flusher:
    http://www.battlebricks.com/roboflush/index.html

    Link to the video:


    Best regards,

    Luciano
    Last edited by Luciano; - 30th January 2008 at 14:37.

  6. #6
    Join Date
    Jul 2007
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    lol that would be funny to lock them in


    Although the patents didn't have the simplicity I was looking for

    I know the mechanical way I want to set it up I just don't know what would be easier to program.

    Any ideas?

    I was thinking about purchasing the Sharp GP2D12
    but instead I already have an IR receiver and IR Led.

    What do you think the best approach is?

  7. #7
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Techbuilder View Post

    I was thinking about purchasing the Sharp GP2D12
    but instead I already have an IR receiver and IR Led.

    What do you think the best approach is?

    Best or simpliest ???

    for "private" use the sharp module will HIGHLY simplify the thing ( and the programming ! ) ...

    looking to the cost ... an IR Led, plus a phototrans. will make it.

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  8. #8
    Join Date
    Jul 2007
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    Well I do want the simplest
    but I don't have very much money either.

    I have a book that kind of describes what I want to do but it is in assembly or c,
    I can't tell but it's not in basic.

    What would you describe the level of difficulty of the programming going with the cheap option?

  9. #9
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Pic_User View Post
    It is perfectly legal and acceptable to adopt patent ideas for your own use, but not for resale or distribution....
    Actually, this is not a true statement. Sure, it is highly unlikely you will get caught or sued, but if you do get caught, you may find yourself in court (or settling).

  10. #10
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    948


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Techbuilder View Post
    Hi everyone maybe you can help me out
    Here's what I have an idea of what I need

    1 servo

    1 Pic micro controller 16F627A

    1 Ir receiver

    1 Ir led

    and I already know the resistors and caps I need.

    Should I go with a different approach for programing or do you think that this sounds like a pretty solid toilet flusher?
    Well, you seem to be on the right track except that you need a solenoid valve to make this viable. Instead of the servo, you fit a solenoid valve in series with the flush outlet; of course you have to remove the manual flush valve. This will work on a direct inlet pipe only. No cisterns here.

    The other 'political' approach is to do what my little kids do. "If you don't flush, next time, I will not flush"

    JF

  11. #11
    Join Date
    Jul 2007
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    I wouldn't need a solenoid if I have the servo

    Here's how the servo is

    (it's a rough sketch)
    Attached Images Attached Images  

  12. #12
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Smile Royal Flush...

    Hi Techbuilder,
    A regular hobby servo actuating the flush handle, may not have enough torque. I guess the force needed depends upon the toilet model.
    -Adam-
    Ohm it's not just a good idea... it's the LAW !

  13. #13
    Join Date
    Jul 2007
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    Handle only requires 1 to 2 pounds to press down
    And a hobby servo can do that easily.

    That's why I decided to go with that

  14. #14
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    948


    Did you find this post helpful? Yes | No

    Default

    If you think a servo will work, why not try it out? I have a hunch though ....

    JF

  15. #15
    Join Date
    Mar 2006
    Location
    Pennsylvania, USA.
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    Take a look at the Parallax website, they have some tutorials that you can download. One of them gives an example of using the Basic Stamp freqout command to drive an infrared emitter, and then collecting the signal if it is reflected back by an object in close proximity. The neat thing about their approach is that they demonstrate that by changing the modulated frequency you can determine a relative distance to the object. So, no one in the room, no reflection, someone approaches the toilet, wait, they leave, then gosub flush. I would suggest that you also monitor the temperature of the water feed line into the toilet. If unused, the water temperature will be close to room temperature. If you sense a drop in temperature while the infrared sensor senses someone close, or shortly thereafter, then that person flushed, (your fresh water should be colder,) and you don't waste any water flushing a second time.

    I'm sure that the infra-red information is in the 'Toddler' robot section of the Parallax site, and I think it appears in a few other places. You'll have to experiment to find the maximum range. Radio-Shack now carries some Parallax sensors, they have a passive infra-red motion sensor, I believe that it's only seven or eight dollars. Might be worth a look.

    Good luck!

    Jerry.
    If your oscilloscope costs more than your car...

  16. #16
    Join Date
    Jul 2007
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    That's kind of want to do

    What I want is just an IR sensor that reads when a hand has been passed by it and turns the servo all the way to the left (or right) and flushes the toilet.

    I made a drawing
    Attached Images Attached Images  

  17. #17
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Smile Infrared Proximity Sensor...

    Some ideas about this here:
    Infrared Proximity Sensor
    http://www.g9toengineering.com/AllSa...dproximity.htm

    -Adam-
    Ohm it's not just a good idea... it's the LAW !

  18. #18
    Join Date
    Jul 2007
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Pic_User View Post
    Some ideas about this here:
    Infrared Proximity Sensor
    http://www.g9toengineering.com/AllSa...dproximity.htm

    -Adam-
    This is exactly what I am talking about

    but how hard would it be to interface with a PIC?

  19. #19
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hi Techbuilder,

    I really like your determination to build something. BUT, if they won't flush the toilet, what makes you think they'll wave their hand in front of a motion sensor that'll cause the toilet to flush? Here's an idea---get an under the carpet pressure pad and hook it up to an 12Fpic. Get a pretty pink toilet mat to pu over the pad. The system will sit in a WHILE/WEND loop until the USER is off the pad then it activates your solenoid to flush the toilet. Oh my gosh. I can feel the idea juices starting to flow. Is it exciting. Keep going and let us know your progress. I love this idea stuff.

    HTH,

    BobK
    Last edited by BobK; - 2nd February 2008 at 01:59. Reason: grammar check

  20. #20
    Join Date
    Jul 2007
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    Hey Pic_User or anyone

    Is it difficult to interface the that link that you gave me to a pic?

    All I want it to do is when it comes in contact, to rotate the servo all the way to the right or all the way to the left.

  21. #21
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Smile Google....

    Quote Originally Posted by Techbuilder View Post
    Hey Pic_User or anyone

    Is it difficult to interface the that link that you gave me to a pic?

    All I want it to do is when it comes in contact, to rotate the servo all the way to the right or all the way to the left.
    Hi Techbuilder,

    search Google:
    IS471FE
    Find this (second hit):
    http://document.sharpsma.com/files/L...ce-opic_AN.pdf
    On this Sharp application note:
    Light Detecting Device-opic
    Search for:
    IS471FE
    Page 5 tells us:
    the parameters of the IS471FE
    Page 24 shows us the internal / external hook-ups of the IS471FE
    <IMG SRC="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2326&stc=1&d=120200443 9">
    Mostly it looks like it will operate with 5V DC input.
    It has “open collector” output.
    It has a built in 10k “pull-up” resistor.

    so it LOOKs like you could use a circuit like this:
    <IMG SRC="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2325&stc=1&d=120200428 1">
    Thanks to:
    Garrett Hamilton–Smith, Raihan Khondker, and Will Norris,
    School of Information Technology and Engineering, University of Ottawa
    http://www.g9toengineering.com/AllSa...dproximity.htm

    -Adam-
    Attached Images Attached Images   
    Ohm it's not just a good idea... it's the LAW !

  22. #22
    Join Date
    Jul 2007
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Pic_User View Post
    Hi Techbuilder,

    search Google:
    IS471FE
    Find this (second hit):
    http://document.sharpsma.com/files/L...ce-opic_AN.pdf
    On this Sharp application note:
    Light Detecting Device-opic
    Search for:
    IS471FE
    Page 5 tells us:
    the parameters of the IS471FE
    Page 24 shows us the internal / external hook-ups of the IS471FE
    <IMG SRC="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2326&stc=1&d=120200443 9">
    Mostly it looks like it will operate with 5V DC input.
    It has “open collector” output.
    It has a built in 10k “pull-up” resistor.

    so it LOOKs like you could use a circuit like this:
    <IMG SRC="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2325&stc=1&d=120200428 1">
    Thanks to:
    Garrett Hamilton–Smith, Raihan Khondker, and Will Norris,
    School of Information Technology and Engineering, University of Ottawa
    http://www.g9toengineering.com/AllSa...dproximity.htm

    -Adam-
    Thanks, would it be hard to compile a code to detect using this method?

  23. #23
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Default like a push button

    Hi Techbuilder,

    You could consider the module like a push button. Your program would need to watch for a low or 0 (zero) to know someone / some thing had come close to the sensor module.

    -Adam-
    Ohm it's not just a good idea... it's the LAW !

  24. #24
    Join Date
    Jul 2007
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    Ohh ok

    I get it

    So if I want to change the range to about 6 inches would that be done by changing the resistance to the IR leds?

  25. #25
    Join Date
    Oct 2005
    Posts
    18


    Did you find this post helpful? Yes | No

    Default

    Maybe this can work better in case it is only code problem
    Loop:
    If IRLED1 =1 then
    for a=1 to 100 'allow several pulses for the servo to reach the requested position
    Pulsout 0,140 'could be 100=1ms to 200=2ms
    pause 10
    next a
    else
    pulsout 0,150 '150=1,5ms middle position
    pause 10
    endif
    Goto Loop



    Also check your servo if it is damaged since you power it with 9V instead of the usual 5V most RC servos work.

    Bill

  26. #26
    Join Date
    Jul 2007
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    Thanks

    I appreciate it

    Although the servo was modified along time ago for continuous rotation,
    Although it still works

    5volts is actually low for a servo, that's the lowest amount of voltage you can imply.
    In the book I own PIC basic projects
    it has a servo page and it states that servos can run from 5vdc to 9vdc and 5volts was not recommended.

    I tested it out and it works fine

    I believe for it to be the sensor

  27. #27
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Post the code you are currently trying.

    Write the code to make a pin high or low output. No pulses for testing and use an LED instead of the servo.

    What is the voltage at the sensor out put when connected to the PIC?
    Dave
    Always wear safety glasses while programming.

  28. #28
    Join Date
    Jul 2007
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    Doesn't RBO and RB1 and so fourth supply 5+ to the pin?

  29. #29
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Techbuilder View Post
    Doesn't RBO and RB1 and so fourth supply 5+ to the pin?
    Yep, at roughly 25mA per pin, at MOST! Try to draw any more than that, and you'll end with a pin that won't supply squat.

  30. #30
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Techbuilder View Post
    Doesn't RBO and RB1 and so fourth supply 5+ to the pin?
    In your case RB0 is an input so it is looking for 0 volts to 1.2 volts for a LOW and 3.6 volts to 5 for HIGH. It is best to use a pull up or pull down resistor so the pin will be 0 or 5 and not floating around. Another part or two but I like using external pulls and not rely on the internals.

    So, when the sensor is sending its high signal to the PIC and connected to the PIC, what is the voltage.

    Try making the pin high or low with out the sensor.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Automatic 240V / 110V selector
    By The Master in forum Off Topic
    Replies: 5
    Last Post: - 13th October 2008, 00:33
  2. LCD automatic management?
    By ruijc in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 26th September 2008, 11:24
  3. Automatic VB6 to pic serial connection
    By arniepj in forum Code Examples
    Replies: 13
    Last Post: - 10th January 2008, 07:57
  4. Automatic turn off
    By AMay in forum Schematics
    Replies: 22
    Last Post: - 6th February 2006, 12:31

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts