Simple Urinal Automatic Flush System

Thread Starter

Wilter.Flow

Joined Apr 7, 2018
8
I'm new to the components needed to do this. I'm still learning the basics so if anyone can help me do this project, I would highly appreciate it.

I'm building an Automatic Urinal System Flush that will sense the person for a duration and flush at the same duration.
For example, If a person is detected for a given period say for example, 10 seconds, after that if the person leaves, it will flush for approximately 10 seconds. The time should be a variable depending on how long it detects a person.

I'm using this diagram:

5V Supply Voltage > PIR Sensor > Op Amp (as Comparator) > 555 timer > Decade Counter (4017) > NPN Transistor (BJT for switch) > Relay > Water Pump.

Note: The PIR Sensor is not the Module type. I think it is IRA-E700

If you want clarifications please ask me about it. I would really appreciate it. I don't know how to make the circuit for Comparator up to the Decade Counter. Thank You in Advance
 

BR-549

Joined Sep 22, 2013
4,938
May I ask.....why does the flush time need to be proportional to urinating time....or standing time?

Urinating time....draining time....vary.......but why does flush time need to vary?

There could be a line.
 

Thread Starter

Wilter.Flow

Joined Apr 7, 2018
8
May I ask.....why does the flush time need to be proportional to urinating time....or standing time?

Urinating time....draining time....vary.......but why does flush time need to vary?

There could be a line.



That's a good Question. I want to make this because the commercialized automatic urinal system is costly and has only a 3 seconds duration of flushing. Not all the residue of the pee is not washed away due to short flushing time duration. And because the water pump I'll be using has a slow motor speed so if the duration time of water pump is fast, It won't flush the urinal properly.

I already bought a water pump so changing the water pump is not necessary for me. Thank You for your reply. =)
 

AnalogKid

Joined Aug 1, 2013
8,327
Not much detail to work with, so I'm *guessing* that the 555 is operating as a 1 Hz oscillator, and the 4017 is counting the number of seconds. But then what? To count the number of seconds a body is standing there, then count the number of seconds the pump is running, wouldn't you need two counters, and a comparator to determine when the water time equals the body time?

OR, a single up/down decimal or hex counter with carry/borrow output(s):

Counter is at zero, waiting > detect body > start counting (up) seconds > detect no-body > start pump > start counting down > detect zero > stop pump > wait

I assume that there is a maximum pump time, such as 9 or 15 seconds, or 9 or 15 counts of whatever the oscillator period is, that cannot be exceeded no matter how long someone stands there.

ak
 

Thread Starter

Wilter.Flow

Joined Apr 7, 2018
8
Not much detail to work with, so I'm *guessing* that the 555 is operating as a 1 Hz oscillator, and the 4017 is counting the number of seconds. But then what? To count the number of seconds a body is standing there, then count the number of seconds the pump is running, wouldn't you need two counters, and a comparator to determine when the water time equals the body time?

OR, a single up/down decimal or hex counter with carry/borrow output(s):

Counter is at zero, waiting > detect body > start counting (up) seconds > detect no-body > start pump > start counting down > detect zero > stop pump > wait

I assume that there is a maximum pump time, such as 9 or 15 seconds, or 9 or 15 counts of whatever the oscillator period is, that cannot be exceeded no matter how long someone stands there.

ak


Yes that's closer to my project. I can add any component if necessary. But can you show me how to do the circuit? Thank You very much. =)
 

BR-549

Joined Sep 22, 2013
4,938
That is a terrible algorithm. Just measure the needed flush time and set for all flushes.

Do you have plenty of water and pump power?

What happens for just tinkles? Maybe you should count pee'ers first......then flush every 3.
 

Thread Starter

Wilter.Flow

Joined Apr 7, 2018
8
That is a terrible algorithm. Just measure the needed flush time and set for all flushes.

Do you have plenty of water and pump power?

What happens for just tinkles? Maybe you should count pee'ers first......then flush every 3.


I'm sorry if my algorithm got on your bad side. Thank you anyways =)
 

BR-549

Joined Sep 22, 2013
4,938
If you are really serious, you will need to program it. You can do it in a day with an arduino.

Unless you have an oddball motor.....there are relays/controllers to control it, with the arduino....off the shelf.

"switching motors with arduino" on google will give tons of results.

It's a pain in the ass to set up......but once you do....you can change all variables with ease. And of course then you start thinking....what else you can do with it.
 

falade47

Joined Jan 24, 2017
153
What if the person is there for up to 45 seconds. Don't you think you should just set a standard time let's say 15 seconds and you don't have to work your head much on that.
 

Colin55

Joined Aug 27, 2015
519
By the time you muck around with a 555 and 4017 and hundreds of components, you might as well use a 35 cent PIC12F629 and a few surrounding components. At least with a micro you can change all the parameters without having to change any of the components and you can sell the project without anyone being able to copy it.
It's piss-easy to use a micro. I have used one with my eyes closed.
 

Colin55

Joined Aug 27, 2015
519
You are pissing-uphill if you think you can design a circuit around a 555 and 4017. What you do is flush for 3 seconds and every 10th flush lasts for 10 seconds.
 

AnalogKid

Joined Aug 1, 2013
8,327
The circuit can be broken down into three relatively independent sections:

Body detector
Count up / count down Timer and control logic
Pump driver

I have a preliminary circuit for the timer and control logic, but it has only 4 other components (plus decoupling) besides the oscillator and the counter. I'm trying to get it up to "hundreds of components", but that is difficult for me.

ak
 
Last edited:

AnalogKid

Joined Aug 1, 2013
8,327
- OR -

One dual rail-to-rail opamp.

One opamp as a Howland current pump, input coming from the body detector. One opamp as a comparator, output going to the relay driver. Between the two is an integration capacitor. The circuit impedances would be fairly high, the cap would have to be low-dissipation, low-leakage, and the opamps would have to be high impedance, low bias current, and above average "precision". Maybe a precision CMOS opamp, if that isn't an oxymoron.

The first time I saw a multi-minute integrator as part of a timing system was in 1970. The french fry timer at McDonalds wasn't just a timer. One died and I tore it apart. First, all tubes inside. Second, it had a temperature probe in the vegetable oil, and integrated the total heat energy over time to determine doneness.

ak
 
Top