Skip to main content

Smart Plants

Loading...

As we all know, there are two things that are absolutely necessary to keep plants alive: water and light.

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 indoors farming solution, but there many other capabilities that 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

For this system, we need a pump, a tank, and growlights.

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, but 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 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 ready and wired up, we are going to go over 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.

In the image above, there is 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 really make the irrigation and lighting extra hands off, we can create schedules for each action! This is done 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, make sure to check this tutorial, this other tutorial, block documentation, and the feature documentation.

Demo

Now 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

Obviously, there are many features value that can 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 plants health, the list goes on...