Skip to main content

Smart Plants

Loading...

As we all know, two things are absolutely necessary to keep plants alive: water and light. This article is short, but feel free to jump straight to the demo.

We want to create a system that can autonomously keep our green friends alive, and as such, we require the following features:

These two features are the bare minimum for a smart indoor farming solution, but many other capabilities can be added to the system, such as:

System overview

The following is a simple diagram of how the TPS will control different components to provide our plant with the light and water it needs.

Illustration of a TPS connected to a water container with a pump and a grow light.

Hardware

Requirements

We need a pump, a tank, and grow lights for this system.

The grow light we used is similar to this one. The original lamp had a manually operated switch on the cable, but we took it out to control the lights directly through the TPS using the #16 and #17 Tibbits (PWM open collectors and PWM outputs).

To water the plant, we used a cheap, small submersible pump (similar to this), mostly used for small fish tanks and aquariums. However, for a professional application, you should retrofit an industrial pump.

To provide water for the pump, we used an off-the-shelf container with a soft, plastic lid.

Retrofitting

Part of the challenge in this project (and most industrial solutions) is to be creative and work around existing parts, so we inspected the lights and wired them up to the TPS.

A light controller next to two PWM Tibbits and a water pump next to a relay Tibbit.

Wiring

Have a look at the following schematic to see how the TPS should be wired to the system's peripherals.

A wiring schematic demonstrating how to wire a TPS with 2 PWM Tibbits and a Relay Tibbit. Each output line of the Tibbit #17 (PWM outputs) is connected to each of the light strips' power input (red line), while the power input line of the PWM Tibbit is connected to Tibbit #10 via a red wire. Each Tibbit #16 output line (white line with black borders) is connected the white wire of each of the light strips.
tip

While we used two #10 Tibbits (we have a lot of spare 1A wall adapters lying around), Tibbit #25 or Tibbit #33 + a high current adapter are a better choice due to the high energy requirements of the grow lights. Additionally, an external power source can (and should) be used for the pump.

Logic

Now that our hardware is wired up, we will review the controller's logic.

Fundamentals

There are three main actions that our system should be able to do:

  1. Activate the water pump
  2. Turn the lights ON
  3. Turn the lights OFF

Check them out in the image below!

Logic flow chart for a smart agricultural system. The chart displays commands to activate a water pump, turn light on, and turn lights off.

The image above has a new block called "Delay". This block is used to "queue" the execution of a second block. In other words, it means that "t" seconds after the first block is executed, the second block will be executed.

Manual control

For convenience (and testing), we will add some button actions.

AppBlocks logic flow for buttons. Button 1 is mapped to the 'activate pump' command. Button 2 is mapped to the 'turn lights off' command. Button 3 and 4 decrease and increase brightness levels by an arbitrary percentage.

We will also add a slider on the web console to conveniently adjust brightness on the go.

Web console created by AppBlocks showing a single slider to control grow light brightness.

Schedule control

Now, to make the irrigation and lighting extra hands-off, we can create schedules for each action using the "On Scheduled Event" block.

AppBlocks logic flow for schedule events. The 'watering schedule' block is connected to the 'activate pump' command. The 'lights on' block is connected to the 'turn lights on' command. The 'lights off' schedule is connected to the 'turn lights off' command.
tip

For more information on schedules, check this tutorial, this other tutorial, the block documentation, and the feature documentation.

Demo

Here's a video of the actual system at work (plus some pictures).

Close-up of the Tibbo Project System as an indoor farm controller.

Next Steps

Many valuable features can still be added to this system, and we have a lot of learning materials:

  1. Temperature sensors
  2. Humidity sensors
  3. CO2 sensors
  4. Leak detection
  5. Water level monitoring
  6. Soil humidity sensors
  7. Access control systems
  8. Ingress monitoring
  9. Nutrient supply control
  10. Display information about the plant's health, the list goes on...