This project started with developing a simple water tank monitoring system.
In the Github repository learning folder you'll find a fully blown stand-alone sketch that was designed to run on battery and does a daily save to FLASH of key data so statistical information on water use can be presented. After rigorous development and testing of this water tank monitoring sketch we realized that there was other equipment we should be monitoring.
This led us to developing this "Hybrid" system bridging a backyard Multi-Node MESH Network to a Blynk node.
Uniquely, with Blynk you get a user friendly system for mobile App integration.
Block Diagram
____________________________________________________________
The Reasoning Behind each Nodes Logic:____________________________________________________________
Septic System (Node:4)
The system that we had installed when we redeveloped the property is large enough for a residence with up to 10 people and because of this the "Recirculating Textile Filter" is external to the septic tanks. The filter is fed by a pump and recirculates by gravity.
The system all works fine until there is heavy rain (which is often these days) and the runoff groundwater that enters the system will over burden the pumps and it triggers a "Water Level Alarm". When this occurs to help the system we go out to the end of the dripper lines and open the end valves which allows free flow of water and helps the system recover to normal levels.
My idea is to add a "bypass" valve back at the main outlet on the tanks that can be either manually or automatically opened when this occurs.
We figured that while we're doing this we may as well also setup alarms for level alarm bulb and pump failures.
__________________________________________________________
House Water Tank Node:3
As we said at the beginning this is where we started. We figure if you are taking the time to watch the water level in the tank you might as well present some statistical information as well.
Information that will be presented is;
Water Level as percentage full
Water Available in liters
Water Used in last 24 hours
Average daily water usage based on 30 day averaging
How many "Days of Water" available based on average usage
The latest version of this nodes firmware uses a waterproof ultrasonic module with a waterproof temperature sensor to measure the water level. You get a more accurate distance measurement when you adjust the speed of sound for the environments ambient temperature that you are measuring within. (Side note: All environmental conditions have an effect on Speed of Sound, IE Temperature, Air Pressure and Humidity)
In an attempt to further improve the accuracy we have implemented a error tolerance factor (2mm) and when doing a smoothing array measurement before averaging the array each reading value is tested and if it's outside the allowed tolerance it's treated as a failed read and repeated. Extensive testing found that 2mm was the best value for less than a 10% read failure. Furthermore it was also discovered that when a read error occurred it was always long meaning it would show less water than what exists. There are timeouts and logs that can be seen but worst case so far is 2 consecutive distance read fails before success and no (10 read fails) read timeouts. FYI: 2mm of water level is approximately 18liters of water.
To achieve the statistical data for water usage we save daily key values to SPIFFS in case of power outages.
There is no lighting near the water tank so there is relay control for a yard lighting system on this node.
____________________________________________________________
Garage with internal access Node:2
This node came about because I'm getting a little forgetful these days.
Being a rural property there is all sorts of wildlife...... ducks, birds, hedgehogs and MICE! As the weather cools the mice look for warmer living conditions and if you happen to leave a door open and it doesn't need much they feel the warm air of the house and see it as an invitation to their new winter home.
You can't keep them out of the garage as you have to come and go with the car but the internal door needs to be monitored as if you forget that after bringing in the groceries you'll find you have uninvited guests.
Till now we've just used the standard spring traps but we're not fans of killing them so wanted to make some kind of "Humane Trap" so we can just relocate those that get caught.
We've designed a dual IR beam system that runs on an ATTiny85 and feeds the garage node with a state. This means it's stand-alone and of course it provides system feedback when connected to the mesh node.
The beams are mounted at each end of a cardboard tunnel. There is a servo at the front end of the tunnel for the trap door. As a mouse passes the first IR beam the trap ARMS and D1 will come on as a solid indicator. When the mouse breaks the second beam the servo is attached and not until both beams are unbroken does the trap door close. That's in case a second mouse enters as they often travel in pairs. Once the trap door closes the solid state light starts to blink, the output goes HIGH and the output LED turns on. You'd now get this state back on the kitchen node and in the Blynk app.
Here's what V1 of the mousetrap looks like in the ARMED and TRAPPED state.
For ease of relocation the trap is two pieces, the tunnel which provides the trap and a box with a manual sliding door. There is a locating ring on the box for the trap and when we set the trap the sliding door is opened. Once a mouse is caught you just slide the box door closed remove the trap tunnel and take the mouse far from the house for release.
We have also integrated "Garage Door" Open or Close functionality that can be done locally on the garage node, with a button on the kitchen node or in the Blynk App.
____________________________________________________________
Kitchen Node:1 and Gateway to Blynk Cloud App
This station is Command Control and Monitoring. While key alarms and control are available on the Blynk App, All data can be viewed on the OLED display plus there are LED's that show key states at a glance and a servo driven water level meter. A future plan is to add a servo Barometer with LED's that give a weather forecast. We've already got the functionality for this in Weather Predictor Project here.
All Nodes run the "Time" library and Blynk pushes "epoch time" to all MESH nodes. This allows for time of day decisions as well as seasonal decision adjustments.
Functions you can do from the kitchen node are;
- Operate the Garage Door
- Toggle the Bypass valve Position on the Septic system
- Switch the yard lights On or Off
- When Screen is On the Encoder button toggles between auto and manual screen rotation. When the screen has timed-out (3 min) the Rotary encoder button will wake the screen into auto rotate mode.
- A slide switch to boot into MESH OTA update mode
- An SD CARD for MESH OTA updates
At a glance looking at the kitchen State LED's you can see:
- Yard Light State
- Bypass Valve State
- Mouse Trap State
- Door in Garage left Open too long Alarm (so the mice don't get into the house)
- Septic Level Alarm
- Septic Level Bulb Failure
- Septic Pump Failure
____________________________________________________________
This project is very much still a work in progress and we are awaiting parts to complete some of the functionality. That said the best way to describe the system is a video to show a brief outline of what the first deployment will look like
Comments