Enginursday: SWIT Plant Monitor

Getting your plants up to Phant and digging in to IFTTT

Favorited Favorite 2

We have all caught a glimpse of how Internet of Things (IoT) is going to change our lives, with smart homes, cities, workplaces, etc. Earlier this month, the Netherlands became the first country to roll out a nationwide IoT network. Yay!

This is not just great news, but a big test for IoT. An implementation on such a large scale has never been done before, and we cannot wait to see how it works out.

KPN, the telecom company that has set up up the IoT network in the Netherlands, is a Low Rate (LoRa) mobile communications network that is also compatible with the existing phone network. You can read more about it here.

LoRa Technology

alt text

LoRaWAN™ is a Low Rate Wide Area Network specifically designed for wireless battery-operated Things in a network. It was designed for large-scale public networks with a single operator, and is not the best solution for a private network.

The LoRaWAN architecture is based on a star topology, where gateways are bridges relaying messages between end devices and the server. The server decides which gateway should respond to a transmission; the other gateways receive the transmission but can ignore it. This helps prevent the uplink-downlink collisions.

LoRaWAN offers very low data rates ranging from 0.3kbps to 50kbps. To maximize the battery life of devices, the central server manages the data rate and RF output for each end device individually using an adaptive data rate (ADR) scheme.

LoRaWAN is a great choice for a protocol if used for a public/open network. I had the misconception that it could work out of the box like WLAN (i.e., WiFi), but it is way more complex to set up. Now, with the use of this new technology across a public network serving the entire Dutch nation, LoRaWAN is up against its toughest challenge yet. I hope that it helps us identify the problems and challenges with a wide-area IoT network and helps us gear up for a future where everything is connected!

More on IoT communication protocols!

As a part of our IoT tutorial series, we have a new guide up on "Connectivity of the Internet of Things." This tutorial discusses the traditional and upcoming protocols and how they are being leveraged for IoT specifically.

IoT in Our Gardens

alt text

The world is becoming smarter and more connected, changing every aspect of our lives. We decided to pick on a small part of it by exploring how IoT will change our gardens!

There are already a bunch of sensor-laden products available that can monitor your soil, and pass the information to an app on your mobile. More complex systems may have irrigation systems hooked up to local weather forecasts to adapt and hone your watering schedule. Most of these devices are connected to the Internet, which means you can monitor your plants from practically anywhere.

This style of gardening is not exactly new. Farmers have been using similar technology for years to improve yields. However, this is the first time this technology is being leveraged for the average, everyday user. The center of this trend is data mining -- to turn the raw data acquired by connected devices from the sensors into valuable insights for more efficient gardening.

Here at SparkFun, the Software and IT team (SWIT) is excited about IoT and is taking steps to evolve with it. Timm McShane, the director of SWIT, had an idea in the back of his head about putting the small indoor garden we have here at SWIT up on phant.io and analyzing the sensor data so we could take better and more efficient care of it. Also, he wanted to make it easy on Paul, who waters and looks after these plants regularly.

This project would help put our tiny but very pretty garden on the cloud with the help of data.sparkfun.com and would save Paul unnecessary trips all the way from his office to SWIT just to come and check on the plants.

So, we decided to do this blog post for all those who 'dig' gardening! If you have a garden, or plan to have one soon, you might want to give this a read.

Introducing Our Plant Family

alt text

In the righthand corner, we have one of the most rugged and easy-to-grow houseplants ever. It has been hailed as the ‘devil’s ivy’ because it is impossible to kill. Give a shout out to the very green -- and very creepy -- Pothos!

In the lefthand corner, we have the very leafy and dense contender, which is known to ramble its way around. It is sometimes called the "Bear Grylls" of houseplants and can survive well in the most austere of conditions. I present to you ... the Wandering Jew.

Last but not least we have with us, all the way from Down Under, the tall and symmetrical beauty usually known to thrive perfectly indoors without much of anyone’s attention ... and infamous for thriving outdoors as well. It will make you feel like it's Christmas even during hard-hitting summer. Let’s hear it for ... the Norfolk Island Pine (eh there, mate).

After doing a little research, I found out more specific temperature and water information about our plants. This is key, as I will use them as reference (base) values in the code.

The Pothos requires moderate moisture, even during warmer months. It is important to know that it is tolerant even if not watered for days, but the stems will rot at soil level if given too much water. The optimum soil temperature ranges from 70 to 75 degrees Fahrenheit.

The Wandering Jew requires regular watering during the warmer summer months, but during the colder months the frequency of watering is reduced drastically. If watered too much during this time, the growth will slow or completely stop. This plant also requires warmer temperatures and can grow well within the 55 to 75 degrees Fahrenheit range.

The Norfolk Island Pine also requires frequent watering during warmer months. This is the growing season for the plant, when soil should be kept moist. During the inactive winter months we can water very lightly. The pine is known to have optimum growth within the temperature range of 60 to 65 degrees Fahrenheit.

Note: Since our garden is indoors, we know the temperatures will be regulated and will not change drastically to harm the plants, but for those of you caring for the plants in an outdoor garden, knowing soil temperatures is extremely important.

So the most important thing about having a garden is knowing your plants well. We know that you LOVE your plants, but too much love (i.e., water) can kill them!

The best way to determine if a plant needs water is to check the soil's moisture content at regular intervals. Obviously, plants are diverse and, therefore, so are their requirements. As the daylight and temperature change throughout the year, the way plants utilize and require water also changes.

Please note that some plants use more water temporarily as heating systems are turned on in the colder months.

alt text

So a basic plant monitor should measure the soil moisture and soil temperature.

I picked up SparkFun’s Soil Moisture Sensor and Waterproof Temperature Sensor, which is waterproof in the sense that the sensor is not spoiled by the moist soil.

Wanting to keep the cost of this project low, I decided to refrain from using other sensors we had in stock, like the pH sensor and the air humidity and temperature sensor. But you can definitely add them to your project and get more insight into your plants by having more data points.

The Particle Photon is one of the best for beginner to advanced IoT projects. It is tiny but powerful, has WiFi connectivity and is easy to set up with IFTTT.

alt text

We will use the variable stored in the particle cloud to trigger an IFTTT action and send Paul a tweet about when he needs to water the plants or if there is anything that needs his attention. Sweet, isn't it!

This project aimed to consume low energy and run on battery power. The SparkFun Photon Battery Shield is the perfect solution for this. It removes the need for designing a separate battery management circuit and comes with the headers already soldered on, so you can plug and play! A 2000 mAh LiPo battery is large enough to last a few days without needing to recharge. The photon is essentially ON just for taking measurements and sending the data up to phant; for most of its duty cycle it would be in Deep Sleep state. See the logged test data on our channel's data plots here.

Temperature Sensor - Waterproof (DS18B20)

Temperature Sensor - Waterproof (DS18B20)

SEN-11050
$11.95
25
SparkFun Soil Moisture Sensor

SparkFun Soil Moisture Sensor

SEN-13322
$5.95
15
Particle Photon (Headers)

Particle Photon (Headers)

WRL-13774
$19.00
30
SparkFun Photon Battery Shield

SparkFun Photon Battery Shield

DEV-13626
$13.95
7

Lithium Ion Battery - 2000mAh

PRT-08483
26 Retired

With just a few simple components and a few hours to put everything together, we can harvest the power of IoT to gather relevant data and then use it to grow our plants more effectively. We no longer need to constantly keep checking on them ourselves; if the plants need our attention, they will let us know! We can just sit back and enjoy watching our plants grow healthier and happier than ever.

alt text

Source: giphy

Do you have an IoT gardening innovation? Please share it with other enthusiasts in the comments field below.


Comments 15 comments

  • I gave up on "house plants" more than 30 years ago, when I discovered I have problems remembering to water cactii often enough to keep them alive. As I was reading this, I was thinking "hey, set up something so my plants can send me e-mail when they need water", until I got to "last a few days without needing to recharge". If I can't remember to water the plants, do you really think I'll remember to recharge the battery???!!!???

    • Try a terrarium. I have several that I haven't watered in almost a year. Including one with LED lighting, temp/humidity sensor, OLED screen and Arduino controller:

      https://flic.kr/p/pWTxX3

      https://flic.kr/p/pZ7XUQ

    • That's right!!! To reiterate people said it is one of the reason that 'SparkFun Battery Shield is awesome, as I can track the battery percentage and use it to trigger another IFTTT action! Maybe send a text for recharge battery notification!

    • The battery shield has a chip for "fuel gauge" to monitor the battery. So, not only could you have it send you an email to water the plants, but also an email to charge it. (Or if there is a convenient wall socket, leave it plugged in and the LiPo should act as your UPS for power outages. (As long as you have a battery backup on your WiFi...)

      • Yes! true. I like the idea of it being used as a backup! That way you do not miss out on data anytime. (Unless your WiFi's down!)

        • Well, there is an opportunity for enhancement. Program in a "no internet" cache system that stores data until internet is restored and then uploads the data. This will require you to keep track of time on the data collection unit and in addition to your data (soil moisture, soil temperature, battery level, etc.) also include a date/time stamp for when the data was collected from the sensors. Then when plotting the data from your cloud service of choice use the date/time stamp that you uploaded with the data instead of the automatic date/time stamp that the cloud service assigned when it received the data. Since it is a nominally internet attached project, use an NTP service to set the on-board clock, periodically resynchronizing to adjust for any onboard clock drift. (I know there is version of the Arduino RTC library that automatically takes care of synchronizing to an NTP server. I don't know if Particle has something similar.)

          See how simple projects can get complicated quickly? ;-)

    • Makes sense to use a wall wart indoors, but the battery setup would be handy outdoors. Others have used this setup with a small solar array input. Just add a bit of code to throw an alert if the battery gets too low (the shield has a 'fuel gauge') and it should be pretty user friendly.

  • Oops, I think LoRa is short for "Long Range", not "Low Rate"... the marketing guys at Semtech would be SO mad at you right now :)

    • Its funny how it has been referred to both as 'Long Range' and 'Low Rate', got me confused in the beginning as well. But then the lora-alliance used low power. I think they are referred as Low Power, Long Range WANs.

  • I always feel like it’s Christmas during a hard-hitting summer. Don't forget not everyone who loves Sparkfun is in North America.

  • Be warned Norfolk Pines do not like any form of current running near their roots, or 'leaves'. I learned this the hard way. Also they don't like static electricity any where near it either. Add to the list that Norfolk Pines hate: Cold (keep it away from drafts like near a door) and too much water.

    • Can you tell more about your experience with current and Norfolk pines?

      • They do fine if you keep them away from drafts, static electricity - including that crazy Tesla coil dancing circle [think borg regeneration light - trust me I killed one with that], Christmas Lights , Cats, Dogs, Kids, They don't like electricity near their roots, or wet feet/roots - or mold in their plating medium, or hard sunlight (they will burn). What they do like: They like their roots moist then let dry. They like indirect sunlight, and like to be left alone (meaning they don't like being brushed up against- that includes the UPS man - keep them away from all foot traffic, or anything that might want to eat them. - I know picky.) RE: Current - all I know is everytime I have had any form of current around them, they have died. They are very sensitive.

        • To be fair to the pines pretty much the same things could be said about me. I do like Christmas Lights and dogs, but otherwise... well I'm not a fan of the UPS man brushing up against me.

        • You killed a pine!

          peabody

Related Posts

Recent Posts

Enginursday: Pi To-Go

Creating Artemis

Tags


All Tags