Input devices that can handle rough and tumble environments aren’t nearly as varied as their more fragile siblings. [Alastair Aitchison] has devised a brilliant way of detecting inputs from plumbing valves that opens up another option. (YouTube) [via Arduino Blog]
While [Aitchison] could’ve run the plumbing valves with water inside and detected flow, he decided the more elegant solution would be to use photosensors and an LED to simplify the system. This avoids the added cost of a pump and flow sensors as well as the questionable proposition of mixing electronics and water. By analyzing the change in light intensity as the valve closes or opens, you can take input for a range of values or set a threshold for an on/off condition.
[Aitchison] designed these for an escape room, but we can see them being great for museums, amusement parks, or even for (train) simulators. He says one of the main reasons he picked plumbing valves was for their aesthetics. Industrial switches and arcade buttons have their place, but certainly aren’t the best fit in some situations, especially if you’re going for a period feel. Plus, since the sensor itself doesn’t have any moving parts, these analog inputs will be easy to repair should anything happen to the valve itself.
If you’re looking for more unusual inputs, check out the winners of our Odd Inputs and Peculiar Peripherals contest or this typewriter that runs Linux.
Simple, elegant, well explained, and easy to implement
Fantastic idea. +1 to the vibration motor idea to give it the feel of water flowing.
Yup! Definitely an “I wish I had thought of that!” Project. Love it, and now want to find an excuse to use a giant plumbing valve as a switch in a project.
This is what Hackaday used to be. Nice.
That‘s exactly how the flipper buttons on mid 90s pinball machines work ;)
Next up, add a small speaker or piezo inside, so you can hear the hissing sounds as it’s opened and closed. Perhaps a vibration motor for that authentic water hammer thump too.
Add ESP32 and you’re on your way to become a chess grandmaster.
Imma add two!!
Haha nice
Now that’s a bespoke fader. Somebody should build a whole synth using light-tap pots.
Nothing new there. I used a photoresistor for the last 10 years to detect when a water tank is full. It’s mounted outside the (white/opaque) tank. Once it’s full it activates a relay to shut off the pump.
That’s… Not the same thing at all, though?
Thanks for sharing 10yrs later and after others….
That would be a gate or butterfly valve..
I think you’ll find it’s a ball valve.
The photo shows both
How do you deal with the LED fading over time and temperature?
The simplest way would be to reduce the average operating current, for example by driving the LED in pulses. A 1/1000 duty cycle would be plenty enough for the purpose.
If temperature variations were significant enough to have an effect on the LED intensity, I would probably place a secondary detector on the LED side and make relative measurements. Some careful placement would be needed to keep the secondary detector from being affected by the valve position (reflections).
Probably, I didn’t watch the video with the proper attention but, besides the basic idea, which is good, I find the use of an Arduino for such a simple task quite overkilling. A 555 would have already been too much :)
Personally, I’d probably go for some magnet and reed relay for reliable operations.
A reed, or any other electromechanical, relay has a finite life. And no scope for anything other than on/off.
Thank you for your reply. If the objective is to be able to recognise several positions of the handle, an Arduino start to make sense. Even more if you plan to use it for more sensors. For the finite life, I think that in the specific use case (escape room) it would not be a problem. On the other hand, the complex setup proposed could have some problems of reliability.
Photoresistors are increasingly hard to come by because of RoHS ban on Cadmium. You cannot find RoHS compliant photoresistors from the usual suppliers – I doubt they even exist.
https://uk.farnell.com/advanced-photonix/nsl-19m51/light-dependent-resistor-550nm/dp/3168335
That’s a CdS cell. Not RoHS compliant.
You are correct! My error. I assumed that it would be RoHS compliant as it’s sold by a pucker distributor. I hadn’t realised that all cadmium, regardless of percentage of the end component mass, is banned.
That’s a shame. Thank you for the correction.
Mind, you can still use Cadmium for some applications that are exempt from the ban, like weapons and aerospace, or industrial uses, but as a hobbyist and a consumer they’re not supposed to sell you any.
Admittedly Im not expert, but are you absolutely sure that RoHS forbids selling these components to hobbyists? I think it only applies when you want to sell products containing them to consumers. Its the same with lead solder. That is freely available to hobbyists and can be used by hobbyists and companies for prototypes without restrictions. However, products containing cadmium- or lead-containing parts cannot normally be sold.
I was denied the purchase of a lead solder reel a month or two ago, due to not being a registered professional…
All the leaded solder has been pulled off the shelves.
https://cpc.farnell.com/multicore-loctite/x-39-60en-2c-1-2mm-s-500g/solder-wire-x39-18swg-500g/dp/SD02680
If you try to order that spool, they’ll reply with “At the moment lead based solder can only be sold to professional accounts.”
It’s called a ballcock. “Lever valve” my arse
If you’re going to be pedantic, at least be right. It’s called a ball valve.
A ballcock is the valve in the toilet tank.
I was all ready to come here to complain about using a ball valve in any other way than fully open or closed, about how the flow isn’t happy about sharp corners and eats away at the seal, how the seal doesn’t like the unequal load and slowly creeps into the hole of the ball, becoming useless. Then I saw there was no liquid involved and this was a true hack.
I shall retire my anorak to the coatrack, and take my leave now
I’ve done something similar using a ToF distance sensor pinging off the ball inside the valve. This eliminates the need for electronics on both sides of the valve, which can be an advantage in some installations.