Plumbing Valves As Heavy Duty Analog Inputs

A diagram showing an LED on the left, a lever-style plumbing valve in the center, and an Arduino Uno on the right.

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.

36 thoughts on “Plumbing Valves As Heavy Duty Analog Inputs

  1. 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.

  2. 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.

    1. 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).

  3. 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.

      1. 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.

        1. 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.

      1. 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.

        1. 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.

  4. 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

  5. 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.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.