During a chat with a friend, I realized water leakages are a big problem. My friend had to replace all the furniture in his basement, just because a pipe had broken while he was at work.
This project is similar to the one I published for the Microsoft IoT contest but this one is based on Arduino, not on Raspberry. My point of view is the following: instead of centralizing many responsibilities on a big platform (like RasPi, DragonBoard or a PC), I prefer to delegate simple responsibilities to simple devices (like Arduino and others). They will do what they are supposed to do and, as an option, they will connect over the network to other (simple or complex) devices to offer advanced services. In case of network failure, they still continue to do what they are supposed to do.
Basically, it monitors water leakages and it triggers actions like closing the main water entry, depending on the fault detected.
It also publishes messages to an MQTT Broker. The idea is that the device has to manager water locally but is also involved, along with other devices, in a bigger system that manages Home Automation.
Main water entry is located on the bottom. The first device is installed by city water supply services to control water pressure. I installed the part on the top of the picture. The motorized valve (in blue) is installed in parallel with a manual valve. In this drawing, the manual valve is opened and the motorized valve is therefore bypassed. It is useful in case of power outage. In normal mode, the manual valve must be turned off.
There is a DC motor (12v) within the valve and it turns clockwise or counter-clockwise depending on polarity. There is a feed-back loop that indicates whether the valve is effectively On or Off. To turn it On, just apply a positive voltage to the upper-left connection.
From left to right: the AC plug, a reset button, some LEDs to display statuses, connectors (to sensors, to motor), an Ethernet and a USB interface.
- LED1: Steady Red = water detected locally, Blinking Red = water detected remotely, Off = no water leakage
- LED 2: Steady Yellow = unable to control motorized valve, Blinking Yellow = unable to reach MQTT broker, Off = all good
- LED3: Steady Blue = all good, Blinking Blue= motorized valve is closed Off = system is down or not powered
Here is a sensor, located where I think water could leak:
Here is the what's under the hood:
The AC/DC power supply I'm using has two outputs: the first one is 12V DC and is used to feed the motorized valve (controlled by two relays that controls motor rotation) and the second one is EXACTLY 5V DC, to feed the Arduino. That's why I'm feeding directly on the 5V circuit, not the Vin that requires at least 6V DC. Once the AC/DC is connected, you should NEVER ( I said NEVER) plug neither the Arduino DC jack nor Arduino USB cable. If you still want to debug over USB, setup a home-made cable WITHOUT the power lines, keep just the data lines. By the way, the link between AC housing and AC/DC power supply is 110V. Do not touch, ever!