pad
GlassespadThe Works of
pad
splash Dickson Chow
pad
Designpad Photographypad Talk to Me
pad
pad
Plant Friends MKII
pad

Article Date: July 13th, 2014.
Updated: August 4th, 2014.

What is Plant Friends?

Plant Friends is a plant environmental monitor system. It monitors the soil moisture, air temperature, and air humidity of your indoor plant(s) and will alert you via email and SMS when your plants are thirsty. The system is battery operated, wireless, Arduino and Raspberry Pi based and comes with an Android app. The app enables you to look at the real-time and historical data (temperature, humidity, soil moisture) on your phone.

Plant Friends is based on my original proof-of-concept project which you can see here. In this article, I'll show you how you can build your own Plant Friends system! This is what it looks like:

The Sensor Node




The Base Station




The App




How does it work?

Here is a diagram to show how Plant Friends operate:

The (many) sensor nodes consists of a Moteino (an Arduino clone with an RF transceiver), a soil moisture sensor, a humidity sensor, temperature sensor and a battery meter. Once the sensor node collects the sensor readings, it transmits the data via the transceiver over the 915mhz ISM band to the base station.

The base station houses another Moteino, which acts as a gateway to recieve the RF signals, and a Raspberry Pi where the data is logged into a MySQL database and serves the data to the Plant Friends mobile app. The Plant Friends app is an Android app, written in Processing, that displays the senor node data in a pretty way. :)

 

I love plants! Lets do this!

AWESOME! This tutorial is aimed at users slightly above the beginner level. I'll assume you have some basic experience with Arduino hardware and Arduino IDE (like making LEDs blink, installing libraries, etc.), basic knowledge of the Raspberry Pi (install Raspbian OS, etc.), and you know how to handle a soldering iron!

Before I send you off on a shopping spree, lets outline some goals for the system as it will dictate how the system operates. For my Plant Friends system, I wanted the following things:

1. Remind me to water my plants. Alert me via email and/or SMS.

2. Be able to monitor multiple plants. I have plants in different rooms in my home so I'd like to be able to monitor all of them at once.

3. I like to shuffle my plants around so the system needs to move freely. This means minimal wires and reasonable size. To do that, the system needs to run on batteries which leads to my next point.

4. The system needs to be low power. I want the system to run on a set of batteries as long as possible so I don't have change them out often. Because, lazy. I feel 4 – 6 months between each battery swap is reasonable.

5. Android app. Because even bathroom scales have one nowadays. I'm kind of a stats junkie so being able to look at the data from my phone is a plus.

7. Low maintenance! Again, lazy.

8. Some sort of enclosure to organize and protect the electronics.

 

Who is this Moteino fellow?

For this project, we will not be using the official Arduino boards (ie. UNO, etc). Instead, we are using an Arduino clone called the Moteino.

The Moteino is made by Felix at lowpowerlab.com. It uses the same ATmega 328p chip as the official Arduino UNO boards, works the same way but with a few big advantages: It comes with an optional radio transceiver allowing us to transmit and receive data wirelessly, the board measures at a small 1.3 x0.9 inch, and the whole system runs on 3.3 volts which means compact size, low power and long battery life. The transceiver can expand to support 256 nodes in 256 possible networks!

Go ahead and get a little familiar with the Moteino. http://lowpowerlab.com/moteino

 

Add to Cart

Lets do some shopping.

The Sensor Node Enclosure

Base Station Enclosure

The Plant Friends enclosures are constructed out of laser cut bamboo. I designed it so all the pieces snap together and does not require any glue. The sensor node enclosure houses the Moteino, the sensors and the batteries. The base station enclosure houses the Raspberry Pi and gateway Moteino.

There are a few options to get the enclosures:

1: Get are pre-cut ones from my shop. These come in flat sheets where you assemble them:
http://dickson.bigcartel.com/

2. If you have access to a laser cutter, you can buy my templates at my Ponoko shop. These are already laid out into sheets ready to cut:
http://www.ponoko.com/showroom/dicksonchow

3. If you want to modify, remix and come up with your own version based on my designs, you can grab them on my GitHub:
https://github.com/dicksondickson/PlantFriends

 

 

1x Plant Friends Sensor Node Circuit Board

This is my custom designed circuit board for the Plant Friends sensor nodes. Everything uses easy to solder through-hole parts with proper through-holes to accommodate a Moteino. All the sensors for the sensor node will sit on this board. If you prefer a more DIY solution, scroll down for the protoboard.

You can get the PCB at my shop. Ships internationally:
http://dickson.bigcartel.com/

 

1x Protoboard 3cm x 7cm

For those of you that prefer a DIY solution, these 3cm x 7cm green protoboards for work well for the sensor nodes. The components that make up the sensor node, including the Moteino, will sit on this board.
Get it on eBay.

 

1x Plant Friends Soil Probe

This is my custom designed soil probe for Plant Friends. It is gold plated and LEAD FREE so its safe to use with any plant including those grown for food. The length is 82mm / 3.25 inches so it is perfect for deep planting pots. The gold plating will resist corrosion much better than other types of metal plating and last much longer! You can use two nails if you wish but getting this will simplify things.

You can get these probes at my shop. Ships internationally:
http://dickson.bigcartel.com/

 

Alternative Soil Probe

This is an alternative soil probe that you can get on eBay. But be warned, these probes might contain LEAD. If you are growing food, I suggest you use my custom designed probes listed above or use two nails as the probe. I won't be covering the nail method in this article, so Google is your friend!
Get it on eBay.

 

2x Moteino with RF Transceiver

I am using an earlier version of Moteino with the RFM12B - 915mhz transceiver. You'll need at least two of these for Plant Friends. One will be the sensor node, the other will reside with the Pi which will act as a gateway. If you want to make more sensor nodes, buy more.

Lowpowerlab.com Store - https://lowpowerlab.com/shop/index.php?_route_=moteino-r4

NOTE: Felix released new Moteinos that has the option to use the newer, higher power RFM69W transceiver. The newer transceiver will give you longer range but at the cost of higher power consumption. I haven't used the newer radios but I suspect you'll need to make minimal changes in my Plant Friends code to work with the RFM69W. Keep in mind the RFM12B and RFM69W cannot talk to each other so pick a radio and stick with that.

 

1x USB to Serial TTL FTDI Adapter.

You'll need this to upload sketches to the Moteino.
L
owpowerlab.com Store - https://lowpowerlab.com/shop/index.php?_route_=FTDI-Adapter
Adafruit
- https://www.adafruit.com/products/284

 

1x Raspberrypi Model B

We are going to use a USB WiFi adapter for this project so either model A or B will work fine. I recommend the B because it has more RAM and the Ethernet port will give you some flexibility.
Adafruit - https://www.adafruit.com/products/998

 

1x 8+ gig SD Card for The Pi

Take your pick. I use a Sandisk SD cards. As of the time of this writing, 8gig and 16 cards are about $10-$15. 16gb size ones seem to hit a sweet spot so get that.
Get it on Amazon.

 

1x USB WiFi Adapter for The Pi

I'm using this one from Adafruit and works very well
Adafruit
: https://www.adafruit.com/products/814

 

1x 5V 1 Amp Power Adapter for The Pi.

1 amp minimum power adapter is required for stable operation. Make sure to get a good, LONG micro USB cable while you are at it. I recommend a length of 6 feet / 1.8 meters so you have some flexibility on where to locate the base station.
Adafruit
- https://www.adafruit.com/products/501

 

1x DHT11 Humidity and Temperature Sensor.

This is an air temperature sensor and air humidity sensor in one. You'll need one for each sensor node. If you are making multiple sensor nodes, get more. Adafruit - https://www.adafruit.com/products/386

 

1x AA Battery Holder (holds 4 AA batteries)

The Plant Friends sensor nodes uses 4 AA batteries in series configuration. I am using this type. You'll need one for each sensor node.
Get it on eBay.

 

4x AA Rechargeable Batteries

I recommend using rechargeable batteries because it is better for the environment. Sanyo/Panasonic Eneloops win hands down.
Get it on Amazon.

 

2x LEDs, Any Color, 5mm Size

I personally like white LEDs but you can pick any colour. We'll need two, one for the sensor node and one for the gateway.
Get it on eBay.

 

1x PN2222 NPN Transistor

In our effort to optimize battery life, we will use this to turn on/off the humidity sensor. 1 per sensor node.
Adafruit
- https://www.adafruit.com/products/756

 

Resistors

If you don't have a resistor kit already, eBay is good place to get multi-value resistor kits for CHEAP.
100 ohm resistors – 1 for each node.
10k ohm resistors – 3 for each node.
56k ohm resistors – 1 for each node.
220 ohm resistors
– x2. One for each node and one for the basestation.

 

2.54mm Male and Female Pin Headers

We'll need this for the sensor node. The moteino will have the male headers and the protoboard will have the female headers. Guess what happens next.
Get it on eBay.

 

Wires

Use whatever you have. I salvaged an old mangled CAT 5 cable for the wires inside.

 

Android Phone / Tablet to Run The Plant Friends Android app.

I am using a Nexus 4 so anything equivalent or greater in CPU power will work well.

 

1x Ethernet Cable for Initial Setup of The Pi.

No keyboard or monitor needed. We will setup everything via SSH. The Pi will run headless and wireless once we have everything setup.

 

Roll up your sleeves...

To make this build more manageable, we'll break the system down into three parts: the sensor node(s), the base station, and the mobile app. We will concentrate on building each section and then bring everything together into a working system.

 

Get the source.

Get my full Plant Friends source code over at GitHub first! https://github.com/dicksondickson/PlantFriends

 

 

pad
Robot

padEverything Copyright © 2014 Dickson Chow and their respective owners.

pad