Automatic Toilet Flusher

So I have a (possibly) unique project here. What I would like to be able to do is automate the flushing of a toilet, once it has been used.

The reason for this is because I manage a function centre which has several urinals. There is a 'uric acid' sensor in each of these, attached to a flushing relay & solenoid, so that when the uric acid sensor detects a certain level of uric acid, it will flush the toilet.

Needless to say, they have stopped working, and each uric acid sensor costs $500 or so, and, as fate would have it, one of the relays has also stopped working - a cost of $489 for this. So, for the sake of saving $1500, I figured there must be a good Arduino setup I could take advantage of.

I have already purchased some waterproof ultrasonic sensors (, but the beam is too broad to be useful - the toilets are too close to have enough separation in beams.

Ideally, I would place the sensor (whatever that turns out to be), above the person as they stand there to do their thing. The ceiling is around 2.4m so when someone stands, there is a distance of around 500mm - 700mm between the top of their head and the ceiling. A laser/photo-resistor is not an option as I only have limited install options - mainly directly overhead. Also, I don't want any visible light as when there is a function on, there are drunk people and they tend to be attracted to bright little dots and want to mess with them - or at least their source.

If anyone knows how I might solve this problem, I would be very happy!

I have considered:

Infrared laser diode - but don't know how to apply this, I assume a reflector/receiver is necessary.

IR Temp Sensor - no idea on spread of detection

Laser Sensor/Detector - this might be the best option, though I dont know for sure.

Many thanks!

I'm guessing that educating the guests to flush the toilet after they had a pee didn't work?

I've seen urinals which flush automatically and I think the sensor (pointing out from the wall at say belly or chest height) were probably infra red.

Those automatic flushing (infrared) are not that expensive - around USD 200 or so, and that comes with all the parts in a nice waterproof case, well protected and good looking, ready to be built in.

No fancy uric acid detection, but simple flushing the moment someone has been in front of the urinal, presumably to take a leak.

I guess you can do it cheaper - if you consider it a hobby project so your time is free.

The sensor you’re probably thinking of would be a (short range) PIR sensor (infrared motion sensor - those are normally mounted facing forward). Or alternatively you could place an ultrasound sensor in the ceiling, that can also handily detect whether there’s someone as the distance to the floor suddenly becomes a lot less.

My opinion? Fix it right. It's the cost of doing business. And maintenance, whether routine or not, should be allotted for.

There are also safety issues where liquids are concerned - you must ensure faults cannot create problems !!

I'd use a readily available product - you aren't figuring in packaging , support etc .

im more interested as to which genius suggested to build some urine sensor for the urinals..

the normal IR sensors would do a good job.. some without the red light too..

u can buy some sharp ir if u want. the are relatively inexpensive. they have short, med, and long range.

theres a SharpIR library online as well.

Worth a look - time of flight sensor.

Before IR was the norm, urinals would simply flush every half hour or so. The ones in my college dorm did that.

Ones down under use an in-ceiling valve (battery operated) with a sensor poking through the ceiling.

Battery seems to last for quite a long time as they operate much the same as the water control valves in garden timers. i.e. miniature latch/unlatch coil.

INTP: Before IR was the norm, urinals would simply flush every half hour or so. The ones in my college dorm did that.

I recall decades ago, the mechanism on those long urinals where we all stood together (ie not the individual ones) was a triangular trough along the top which was constantly filling. It was on a pivot and as it filled the CoG moved outside the pivot and it fell over and emptied. Then its own (empty) weight brought it back upright. The engineer in me loved that.

dougp: Worth a look - time of flight sensor.

This is perfect! Thanks!!!