Disclaimer : Spanish is my native language (I apologize for writing errors). I'm an arduino enthusiast and I'm not an expert.
This instructable is a prototype to save or take advantage of the already used water (from washing machine and so ...).
How it works ? There are two water capacitive sensor; one of them is for sensing the WC water repository level, and the other one is for sensing the tank water level. Once the WC water repository is empty, the system has to check the tank level; if there is enough water to be pumped to the WC, a relay is turned on in order to start the water pumping; if there isn't enough water in the tank, the system has to notify of that (in this case using a LED), and the relay is not turned on.
Step 1: What Do You Need?
What you need ?
- 2 LED
- 4 100 Ohm resistor
- A silicone tube (the lenght depends on the distance between the tank and the WC)
- An arduino mini (uno or pro should work as well)
- Cable (the lenght depends on the distance between the arduino and the WC and the arduino and the tank)
- 1 channel relay (Im using a 2 channel relay)
- Aquarium water pump (probably you can use other more sophisticated pump)A case for the controller (I made one of acrylic).
Step 2: Wiring
Lets go with the wiring and hardware section.
Wire the water pump
The water pump wiring is the most simple part; the image 1 shows how it's wired; basically you need to connect one side of the power cord to relay's common port, the other socket side has to be connected to the normally open port.
The sensors wiring.
The second image shows how to wire both sensors; It;s simple; one cable has to be connected to power (5v), the other wire has to be connected to ground via 100K resistor and to A0 in order to close the circuit once the water touches both wires.Do the same for the other sensor, connecting it to A1 this time.
The notification LEDs
Finally, in order to get notified about the levels, I'm using to leds; the wiring is shown in the last 3rd. image. Connect the anode (the longer, positive leg) of your LED to digital output pin 5 on your board through a 100K resistor. Connect the cathode (the shorter, negative leg) directly to ground; do the same for the last LED, this time connecting it to digital output pin 6. (The picture does not reflect the connections to proper pins; please update your code or your wiring).
Step 3: Coding
The code is simple. Just sense each minute for WC water level. If the WC water level is below EMPTY_THRESHOLD, then read the tank level in order to know whether the tanks has enough water to be pumped or not; if theres enough water, the relay is turned on and the water begins to flow until the WC water level is marked as full. The LEDs shows when water level is empty.
Step 4: Final Result
I made an acrylic case in order to keep the controller safe, but any tipe of case that fits the circuits should be great.
Hope it helps and any suggestion is welcome.