When you have a fresh cut Christmas tree, it is very important to keep it watered. The unfortunate thing that happens when the tree dries out is the needles fall off, causing the tree to be ugly and making quite the mess under the tree. The dangerous thing that happens with a dry tree is it becomes an extreme fire hazard.
I find that remembering to keep the tree watered is sometimes a problem for me, and when I do remember to water it, I have difficulty seeing the water level in the tree stand because it is under the tree.
To solve these problems, I needed something that could remind me to put water in the tree stand when it was needed, as well as something to sense the level and indicate it locally, so I wouldn’t overfill and make a mess.
The heart of the system is an Arduino MKR1000. The on-board Wi-Fi of the MKR1000 very much simplifies the communications link from the project to internet. For remote monitoring, alerts and triggering, I chose myDevices Cayenne, an IoT project builder.
The sensor is a very inexpensive analog water sensor that outputs a value from 0 to 1024. All sensors are different and you should do a test to find what values are output depending on the water level on your sensor.
The range of values I found for my sensor are:
- 0-249 near empty or dry
- 250-349 low
- 350-389 good
- > 390 full
I mounted the breadboard on the side of the tree stand so I could see the level LEDs while adding water. Of course, the water sensor is on the inside at the appropriate level.
I set up a very simple dashboard in Cayenne that indicates the level via a gauge that also changes color depending on the value. These colors and values are the same as the LEDs on the local display.
The real power of Cayenne is in its ability to set up triggers and alerts. I entered settings to send me both text messages and e-mails.
Now when the water level in my Christmas tree stand gets low, I am alerted via e-mail and text messaging, and while filling the stand, I have level indicators right on the stand so I now know when to stop adding water.