WiFi accessible IoT plant monitoring system for your window sill

Similar projects worth following
This project is a wirelessly accessible system for monitoring the key environmental data related to assist in growing plants on your window sill.

By utilizing sensors and a wireless capable microcontroller to log soil moisture, temperature, humidity and natural sunlight, the AGI-ESP8266 is intended to be used by home owners in remote arctic communities to grow lettuce, kale and spinach on their window sills.

Food security in the Arctic is a major social issue, with most groceries and fresh produce needing to be delivered by air cargo; the fresh produce experiences major fluctuations in ambient temperature during transit.

What that means, is that a lot of fresh produce when it's placed on store shelves will already have begun wilting and the plants shelf life is significantly reduced as a result. This drives up produce costs at the grocery store.

This project aims to solve that by providing people with a means to grow their own.

In the DIY hacker community, the ESP8266 microcontroller is the ideal IoT device for logging data. AGI-ESP8266 is intended to assemble a cheap, robust system for logging temperature/humidity, ambient light and soil moisture data over a long period of time.

What this means for end users is that they can monitor all the necessary information needed to grow plants effectively, and efficiently.

Here is a description of the AGI-ESP8266's project goals:

  1. Phase One:
    The first phase of this project involved programming an esp8266 to utilize MQTT to pass sensor data to a wireless local area network host. This portion is complete and the available code is on the github repository on this page. Following the instructions there will get you a basic system to log temperature, humidity and ambient light via MQTT.
  2. Phase Two:
    The second phase is placing the system onto a constructed window sill planter that end users can build themselves using commonly available building supplies. I'm currently working on the best way to do this.
    Current Design: 1x4 planks cut to window size
    Advantages: Low cost, user customizable to window size.
    Disadvantages: Requires saw, drill, drill bits, wire cutters. Additionally, the 1x4 planks will warp in the sun.
    Next Design: 3D Printed PETG brackets on suspended aluminium aircraft cable.
    Advantages: Low cost, user customizable to window size, only tool needed is wire cutters.
    Disadvantages: 3D Printer required to print planter tray brackets.
    Phase Two revisions:
    - Add Water reservoir for passive soil temperature regulation and plant watering.
    - Add gold-plated soil moisture sensors for long term in situ corrosion resistance testing.

    LED grow lighting not required in current testing environment, but will be required in final area of deployment. Once all Phase Two revisions are complete, LED lighting control will need to be tested. Proposed method involves using a UL listed electronic outlet timer to control LED light bars mounted under planters.

  3. Phase Three:
    The third phase involves programming the esp8266 to be easy to use for end users. Involves programming multiple software clients for configuring the system for use by operators without access to the internet and little technical ability.
    Design goal: AGI-esp8266 reset button returns uC to default AP state. User connects to esp8266 wifi AP, then uses PC/Phone application to program system. End user runs MQTT software on their computer and/or phone to perform the data logging for plant sensors. Alternatively, cloud MQTT access also an option for users with internet access.
  4. Phase Four:
    Deployment to the arctic for testing this winter. Ship multiple AGI-ESP8266 sensors and all the necessary hardware to construct window sill planters for growing lettuce, watercress, kale, spinach and other leafy vegetables.

  • 1 × Adafruit ESP8266 Huzzah Wireless Microcontroller
  • 1 × DHT22 Temperature/Humidity
  • 1 × TSL2561 Sensors / Ambient Light
  • 2 × 3-6VDC Mini Submersible pump

  • Added a camera for timelapse photography

    hominidae3 days ago 0 comments

    I've added a Raspberry Pi and 8MP camera for doing timelapse photography of plant growth.

    I think it'll be necessary to track and show changes over time and correlating with sensor data.

  • Soil Moisture Sensor Unit Testing

    hominidae07/18/2017 at 21:14 0 comments

    I have setup an Arduino Uno connected to both moisture sensors. The objective of this test is to determine how well each unit functions in it's intended environment.

    As you can tell from the above image, I've taken a couple of lettuce seedlings and placed them into a pair of tin cans. I've aerated the bottom of the can by drilling small holes and adding a 3d printed spacer.

    The two sensors that I have chosen for testing are the DFRobot Capacitive Soil Moisture Sensor, and the DFRobot Resistive Soil Moisture Sensor. Here are the links to the two product pages respectively.

  • July Project Update

    hominidae07/14/2017 at 22:39 0 comments

    I've uploaded a new photo of the block diagram of the design I will be testing this month.|

    I am currently modelling a 3D printable pot design that has an hollow interior with nozzles at the top and bottom of the pot to facilitate the flow of water around the soil itself to provide passive cooling from a connected water reservoir.

    The general idea is that as the water moves around the soil, it transfers any residual heat or cold to the water maintaining the roots of the plants at room temperature.

    Additionally, a second pump is connected to the plant pots to water them using a 3D printed multi-way valve.

    I think this is actually a rather elegant solution. We'll also see which of the two moisture sensor designs works best long term. The single DS18B20 sensor will be used with the Homie framework to measure soil temperature.

    Not pictured is a water resistant sensor I will be adding to the water reservoir to log temperature as a comparative datum point to the soil's. The objective is to prevent the lettuce from bolting or wilting under the sun in the 32 degree's experienced sitting on the window sill.

  • Pump function test

    hominidae07/12/2017 at 04:03 0 comments

    Here is a test of the one of the mini submersible pumps I ordered last week. I picked up 10 feet of vinyl hose to connect to the 7.5mm connector on the submersible pump.

    I was thinking of using tin cans as a transfer medium for the plants from the seedling stage, however after a bit of testing I've found that the cans are rusting. Not ideal long term, however they would have worked nicely as a thermal heat exchanger.

    I am now looking instead at 3D printing a soil based vertical planter setup. The reason for this relates to simplicity, the horizontal shelves just aren't working out. The 1x4 boards warp in the sun, they'd also be quite difficult to level consistently for an end user.

    An update to the initial project sketch will likely be happening in the next week or so as I am still waiting on the soil moisture sensors to arrive.

  • Mini pumps arrived!

    hominidae07/05/2017 at 21:48 0 comments

    Okay, so I received the 10x Mini submersible 3-6VDC pumps that I ordered earlier this month.

    I have also confirmed they work with 3.3VDC.

    I am still waiting on the soil moisture sensors I have ordered, and when they arrive I will begin working
    on integrating them all into a single system.

    This brings me to another issue. We need more power.

    There are several solutions available. The first being a small solar panel/cell. However, the issue with that approach is that it involves taking up additional real estate on the window sill, which I am hoping will be primarily taken up with leafy greens.

    I think that a more elegant solution would involve mounting a small wireless power transmitter to a small wind turbine and having it transmit power through a glass window using a wireless charging coil. The entire setup could then be mounted to the interior and exterior window using neodymium magnets and soft pads.

    The advantages of such a setup would be that no major holes need to be drilled compromising the integrity of exterior insulation and violating possible tenant rental agreements in place.

    I am looking forward to setting this up. The system overall would resemble a complete window sill growing solution, with data points available for anything affecting plant growth and the possible means of adjusting those variables to increase growth and potential crop yields.

  • D1 Mini update

    hominidae06/28/2017 at 03:16 0 comments

    Got the D1 Mini working.

    However, one of the Wemos D1 Mini esp8266 microcontrollers is now dead. The D1 Mini, unlike the Adafruit Huzzah is not 5V tolerant.

    I attempted to connect the DS18B20 with 5V logic to one of the GPIO pins.

    It's fried. Luckily, I ordered two!

    Also, I am still waiting out on the water pumps and the soil moisture sensors.

    When they arrive, I'll integrate them.


  • Wemos D1 Mini ESP8266 Microcontrollers have arrived!

    hominidae06/21/2017 at 23:19 0 comments

    I ordered a pair of Wemos D1 Mini's from AliExpress.

    I will be using them to integrate and extend the Homie-ESP8266 project for my window sill greenhouse project.

    The gameplan going forward will be to evaluate the Wemos D1 Mini as a potential replacement for the Adafruit Huzzah ESP8266 microcontroller. Basically, I chose this board because it has a microUSB port which makes programming easier.

    Stay tuned for updates on that.

  • Made a quick visit to the hardware store...

    hominidae06/20/2017 at 00:58 0 comments

    One of the problems I'm currently facing is how I'm going to go about setting up the watering system and the heat exchanger using commercially available building supplies.

    This means I have access to copper pipe, plumbing supplies and the like.

    I have also ordered about 10 low voltage submersible mini-aquarium pumps. Here's a Link to the Aliexpress page I ordered them from.

    The general idea is that I will be using several voltage relay's or MOSFETS triggered by the ESP8266 microcontroller to supply power to the pumps.

    Now, the problem I have here is how to go about designing the heat exchanger. I can either take thin diameter copper tubing and run it through the existing plastic planter trays or run it in coils around the different soil sizes.

    I'm thinking of doing for the heat exchanger what I'm doing for the moisture sensors. Once the soil moisture sensors arrive, I will be testing them against each other to finding out which design emerges victorious.

    Therefore, I will likely setup two different systems. If anyone has better practical engineering suggestions, I would be happy to hear them.

    The first approach involves setting up a copper tube in a grid horizontally along the proposed aluminum aircraft wire prototype. Essentially, the copper tube will run inside and in between the planting tray and the plastic bottom. This would hopefully provide the most direct passive heating or cooling for the soil from the existing room temperature.

    I cannot understand how important this is, as my initial tests have revealed that the temperatures on my window sill reach upwards of 35 degrees celsius. (This kills the lettuce and presumably it will do the same with other leafy vegetables.)

    The second approach involves circulating water openly into a horizontally hung container and placing the commercially available planter trays inside that. However, this has a downside in that the tray itself would be airgapped from the water which means it's effectiveness as a heat exchanger is dubious.

    So, I'm thinking of setting up two small scale experiments to test this theory for each tray singularly.

  • Components ordered.

    hominidae06/17/2017 at 21:06 0 comments

    I have ordered the following soil moisture sensors for testing:
    -Gravity Soil Moisture sensor
    This sensor's surface is gold plated using an immersion electrolysis process. Compared to conventional soil moisture sensors, it should last longer. I'm expecting this to last longer than the Grove sensor.
    -Gravity Capacitive Soil Moisture Sensor
    This sensor uses capacitive sensing to detect soil mositure. I expect this sensor to work the longest.
    - Grove Soil Moisture Sensor
    This sensor uses a corrosive surface to detect soil moisture using resistive sensing. I expect this sensor will last the least amount of time before corrosion occurs.

    Additionally, I have also ordered several mini submersible water pumps from AliExpress.

  • Plant update

    hominidae06/14/2017 at 20:31 0 comments

    I posted two photos of the current setup. Thanks to the esp8266 sketch I noticed that the plants were getting far too hot so I adjusted by opening the window during the day. This dropped the temperature down by 5 degree's from 30 to around 25-26 degrees.

    Compare this to the red/orange plant tray. The lettuce in that container died as a result of being too hot during the day which likely promoted fungal growth/root rot.

    I've also eliminated the use of the clear plastic tray covers to try to avoid containing heat within the planters.

    If this batch goes well, I should have edible lettuce in approximately six weeks.

    Which brings me to my plans for a few revisions to Phase II:
    - Add a gold-plated capacitive soil moisture probe to the agi-esp8266 prototype (Looking at DFRobot for that)
    - Integrate a water reservoir to both cool the plant soil in the hot sun during the day as well as water the plants.
    - Integrate Homie-ESP8266 with contributions to the project for the various plant sensors OR integrating Arduino OTA updates and a default wireless AP mode for configuring the esp8266 uC.

    In the final setup in the desired arctic window conditions, a reservoir would likely serve the opposite effect of warming the soil by getting the plants up to room temperature and/or passively warming the soil by using bleedoff heat from a nearby heated air vent or a nearby radiator. Keeping the soil warm will likely be more effective than attempting to warm the entire plant from residual air temperature. An actual implemented system down the road will be the ultimate test of that. So, that will likely be a testing parameter for Phase III.

View all 21 project logs

  • 1
    Step 1

    See the Github page on the left-hand side for instructions.

    Currently, the process is a little complicated as it involves using the Arduino IDE to program the ESP8266 microcontroller, then setting up a Linux host to run an MQTT broker to receive data. I'm currently exploring ways to make all of this easier to work with for end users.

View all instructions

Enjoy this project?



hominidae wrote 06/05/2017 at 22:14 point

Currently looking at switching over to Homie for the software side.

Homie is a project for esp8266 microcontrollers intended to simplify development of IoT applications by providing an easy to use MQTT convention for multiple sensor types.

The reasoning behind this is the software looks mature and it supports multiple sensors. All I would then need to do is focus on developing an easy to use front end with instructions.

In addition, there are numerous similar projects to AGI-ESP8266. There is the Chirp! IoT sensor which performs soil moisture sensing, temperature/humidity and ambient light detection. Also, the GreenThumb device on Tindie which is also based on the ESP8266.

While these projects look great, I'm looking to construct hundreds of these sensors for deployment so keeping overall cost down is a priority. In the spirit of that, I am adding a document to the codebase to document bill of material and cost concerns.

The end goal is to deploy fifty prototype units with accompanying hardware (sans any bulky COTS materials needed) for as many people to implement by the 4th quarter of this calendar year, (Oct-Dec 2017).

  Are you sure? yes | no

hominidae wrote 06/04/2017 at 23:11 point

Things I will add this week:
- Soil Moisture sensors (Simple, primitive capacitive probes)
- Paho Android Client to both receive MQTT data and display it using a fancy graph
-  Integrate cloud functionality with MQTT

  Are you sure? yes | no

hominidae wrote 10/16/2016 at 04:56 point

Feel free to comment/ask questions here.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates