By John Gavlik
Two important elements for good growth are moisture and light. The Plant Monitor Kit monitors both, and alerts you to when one or the other is less than optimal. In the end, we can’t guarantee a thriving plant with this kit, but at least you’ll have a better than fighting chance for growing it successfully.
The hardware consists of TinyShields (tiny circuit boards), Wirelings (even tinier boards), and assorted cables. In Figure 1, the block diagram details each one in the kit and how it relates to the overall system.
Figure 1 – Block diagram for the Plant Monitor Kit.
The TinyScreen+ with OLED and Wireling adapter shields are joined with mating connectors. The other interconnecting lines between the major blocks are the five-wire cables that allow everything to be attached together without soldering (with five-pin connectors). The numbers on the block diagram (0, 1, 2, and 3) indicate the Wireling adapter ports.
Next comes the software.
The software or — more specifically — the firmware is written in Arduino’s version of C++. Since we encourage you to view what goes on inside the TinyScreen+ processor, you’re free to modify the code to your desires. After all, it’s your kit. It’s also included in the downloads with this article.
Portions of the firmware (specifically the important variables) are listed in the sidebar Changing Variables in Code for you to modify to your needs. You can then recompile the code and load it in.
Perhaps the most striking feature of the Plant Monitor Kit is the OLED screen (Figure 2), which is the top part of the TinyScreen+ TinyShield.
Figure 2 – OLED screen display.
Among other things, it gives the kit the color graphic features that makes understanding what’s happening to your plant a simple matter.
Compare these graphics to just seeing numbers. If there’s a problem with the soil moisture or light, the OLED display visually alerts you to it with colors and plots that beat simple numbers, including flashing warnings when things aren’t up to par. Plus, there’s the buzzer that sounds to make you aware of “minimum conditions” as well. But we digress.
The OLED is a 96 H x 64 V 16-color pixel display in a one square inch package. It also has four buttons (two on each side) that allow you to change the time as well as the soil moisture limit and lux plot range. Then, there’s the power slider switch, which is also on the side.
At the heart of the Plant Monitor Kit are the two moisture sensor Wirelings (Figure 3).
Figure 3 – Wireling sensors.
They both feature an ATtiny25, a high performance/low-power AVR eight-bit controller, and moisture is detected using capacitance to measure the dielectric permittivity of the surrounding medium (a.k.a., dirt).
Again, your kit comes with two of them: one for each plant you want to monitor or both for a large potted plant. When inserted into the dirt, the ATtiny25 micro detects and transfers the surrounding moisture level to the TinyScreen+ processor using the I2C protocol via the Wireling adapter TinyShield.
It also comes with a five-pin connector that connects to the main unit’s Wireling adapter with no soldering.
Next comes the ambient light sensor Wireling that uses the TSL2572 chip that detects the light coming to the plants (Figure 3 again). It’s all packaged on a small 10x10 mm board with the standard five-pin Wireling connector on it. And, of course, you get the connecting cable as well.
Light — both indoor and sunlight — are measured in “lux” which can vary quite a bit from single digits in very low light (0-9 lux) to thousands (1,000+) in direct sunlight. So, we give you the ability to adjust the lux plot to match the light that strikes your plant.
A buzzer alerts you to any problems with your plant’s health and well-being. It generates three separate tones: one beep at 2,700 Hz for moisture sensor #1; two beeps at 3,000 Hz for moisture sensor #2; and three beeps at 3,300 Hz if the light levels are below minimums.
To find out what’s really going on, simply view the OLED screen to see exactly what’s up; you’ll see “red” when things aren’t right.
Moving up the electronic food chain, we have the Wireling adapter board that connects all these external sensors to it by way of the supplied five-pin connectors (Figure 4).
Figure 4 – Wireling adapter and TinyScreen+.
The Wireling adapter then plugs into the TinyScreen+ Tinyshield that features an Atmel SAMD21 32-bit ARM processor (the same one used in the Arduino Zero) running at 48 MHz with 256K Flash, 32K RAM, a USB port, a real time clock (RTC), power management, battery charger and, at the top, a 16-color 96 H x 64 V pixel OLED screen all packaged into one square inch.
To keep the battery charged, simply plug in the supplied USB cable to a USB wall adapter (Figure 5) that’s available nearly anywhere (not supplied).
Figure 5 – USB AC adapter (not supplied).
You probably have some laying around for your smartphones; they’ll work fine. If you’re worried about power failure, a LiPo battery keeps the RTC at the right time even when the USB wall adapter is out of its socket (up to a few hours, that is).
Just plug the battery into the connector on back of the TinyScreen+ TinyShield as no soldering or wire cutting is needed.
While it won’t water your plants for you just yet (at least this version won’t), the Plant Monitor Kit still does the important work of letting you know how your plants are doing and what they need from you.
It starts with inserting the two moisture sensors into the dirt (refer back to Figure 1). Using a capacitive approach, these sensors report the relative moisture content of the soil to the TinyScreen+ microcontroller via the Wireling adapter using the I2C protocol.
Then comes another I2C input from the ambient light sensor that monitors the amount of light the plant receives. This sensor should always be facing towards the light for the best readings.
Finally, if something needs attention (like more water or light), the buzzer sounds between 4 pm and 5 pm: one beep for soil monitor #1; two beeps for soil monitor #2; and three beeps for low light.
All these peripheral devices (Wirelings) communicate via I2C protocol to the Wireling adapter shield that, in turn, communicates this combined information to and from the TinyScreen+ processor. All except the buzzer use I2C; instead, the buzzer simply uses a pin on the Wireling adapter shield to activate it if the sensor readings are below minimums.
On the side of the TinyScreen+ TinyShield, there’s a slider switch that turns power on and off. Simply slide the switch down to turn it on. The OLED screen will illuminate as in Figure 2.
The first thing you want to do after you turn your unit on is to set the time. For this, you have two choices: Am/Pm or 24 hour time. While the unit has a battery, it’s not a dedicated battery backup for the clock. So, you’ll need to do this everytime you turn it on.
It’s simple, so here’s what to do:
The buzzer sounds between 4 Pm and 5 Pm – once every 10 seconds – to alert you to the following:
If either one of the soil moisture levels are below minimums, i.e., below the white line, the buzzer will sound. Also, if the total lux value for the day is below what it should be, the buzzer will also sound.
To turn the buzzer off:
The soil #1 red rectangle should begin flashing, so let it flash until it stops (about 10 seconds — this is normal). The buzzer will remain off until the following day between 4 Pm and 5 Pm, and will remain permanently off if the soil or light conditions are fixed before then.
At the top of the OLED screen is the time display “in color” (Figure 2):
There wasn’t room for the date, so it’s left out.
Soil Moisture #1 and #2
These icons look like the soil moisture Wirelings on either side of the screen. The horizontal white line divides the display into red (below the line) and green (above it). If either of the icons are “in the red” after 4 pm (16:00:00 military time), the buzzer will sound with one or two beeps depending on which one(s) are below minimums. The ones pictured here look okay.
The LUX display is the rectangle in the middle between the soil icons.
The LUX value just above the rectangle always displays the real time LUX value that the sensor detects. It shows 11 here.
Inside the LUX rectangle is another number between 10 and 1000 that represents the top LUX value for the plot inside the rectangle. You can change this value from the default 10 lux (at turn-on) up to 1,000 lux in increments of 10. The above image shows 40.
Also, inside the rectangle, the LUX plot is displayed as a series of 48 vertical lines going from bottom to top or somewhere in between depending the LUX level. Each line represents the “average” of received lux for each 15 minute interval between 6 Am and 6 Pm – green for morning and blue for afternoon. Remember, this is the “average” value over 15 minutes and usually doesn’t reflect the “real time” lux value.
In the morning, there’s usually very little light, so the LUX value is normally single digits between 0 (no detectable light) to 9.
As the morning progresses into afternoon, the LUX value increases, and the resulting line plot may “clip” at the top as seen on the right.
To see the entire LUX plot, simply push the bottom right button until the LUX rectangle flashes “red.” Then, push the top left (+) or bottom left (-) buttons to adjust the lux number in the upper-left corner (the one that says 10 now).
Again, this number inside the rectangle is the maximum lux value for the plot and the green/blue line plot will automatically adjust to it. Once again, the number above the rectangle is the real time lux value (19 in this case).
A new lux plot is generated every day between the hours of 6 Am and 6 Pm and it remains there for the entire evening. The lux plot is reset every morning one second before 6 am and a new plot is started.
If the total daily lux is below minimums after 4 pm, the buzzer will sound. The software adds up the total lux for the day and compares it against a fixed value in the firmware.
If it’s below this value, the buzzer will sound. You can only change this fixed value by digging into the code and changing it there. See the sidebar Changing Variables in Code for details on how to do so.
Here’s a lux plot from a day where there were some significant interruptions to the light (lux) levels due to rain in the morning and afternoon, along with sun and clouds in between the showers. As you can see, the LUX line plots reflect this weather system perfectly.
By viewing the vertical line plots (green for morning and blue for afternoon), you can see when the sun was shining and also when clouds were blocking the sun.
Depending on the kit you purchase, it may come with its own plastic container that houses the TinyScreen+ and Wireling adapter (assembly and gluing required). All the electronics are contained in it, and it has slots on the sides to allow access to the four five-pin Wireling cables, ON/OFF switch, pushbuttons, and USB connector.
All together it makes for a rugged electronic package that you can place on the dirt or in the pot somewhere with the OLED facing up as shown here. The plastic enclosure assembly manual is included with the article downloads.
If the USB port is connected to a computer, then you can see the real time soil moisture and lux data. There are basically two ways to do this: using a Terminal or Microsoft Excel program or MakerPlot (Windows only — sold separately in the Nuts & Volts store) that plots these values and also shows their values on meters.
The data output comes in four separate plots:
The logical extension to the Plant Monitor Kit is putting the data on the web. We’ve got you covered here (at least in hardware) with either the BLE TinyShield or the WiFi TinyShield (Figure 6).
Figure 6 – BLE and Wi-Fi shields.
Just plug either one into the TinyScreen+ processor and Wireling adapter stack and you’re all set.
This is where your DIY skills come into play as you’ll need to create the Arduino code as well as an “app” for them. Let us know if you do so and (with your permission) we’ll feature it at www.tinycircuits.com so that others can learn from you.
What’s In The Zip?
Plant Monitor Plastic Enclosure Assembly Manual