The Raspberry Pi takes over a greenhouse

Lead Image © macrovector, 123RF.com

Raspberries Out Back

Keeping up with a garden is a lot of work. Luckily, with a Raspberry Pi, you can automate your greenhouse.

Professional gardening operations are known to employ modern technology, but you can also put technology to work to automate a small greenhouse in your backyard. With the use of a Raspberry Pi, a variety of sensors, and a few actuators, the yields from your plants will increase, and you will save time.

The greenhouse project described in Raspberry Pi Geek issue 7 [1] has been in operation for a year now, which is long enough to show its strengths and weaknesses. The update described here for the greenhouse automation project provides additional capabilities and eliminates some of the weaknesses observed in the original design.

A number of good reasons for redoing the project presented themselves. The first problem is that the housing for the electrical components is too small. This makes it difficult to expand the design. Moreover, the components are crowded together in the housing, so changing out a defective part requires dismantling most of the setup. The Raspberry Pi also has reached the limits of its capacity as a control center. In particular, it lacks an analog input on the GPIO needed for collecting data from the environment.

New Hardware

To compensate for a lack of space in the current control box, the control electronics can simply be moved to a more generously sized box. An electrical control box is a weatherproof piece of equipment made from metal. The box I use is large, at 30x40x21cm (~12x16x8 inches), and weighs in at a hefty 9kg (~20 lb). Therefore, the mounting apparatus has to be suitably robust.

The apparatus is made from two wooden posts, each with a diameter of 80mm (~3 inches), and a wooden base to which the electrical control box can be mounted using M8 machine screws. This robust construction should make it through both hot summer temperatures and the cold of winter without suffering damage (Figure 1).

Figure 1: A sturdy electrical control box serves as the new home for the Raspberry Pi gardener.

All of the wires run from the interior of the housing through watertight cable connections to the outside; a terminal block makes for fast and easy exchange. The box has plenty of room inside to lay a wire harness. These modifications contribute to a more flexible design for the entire greenhouse control apparatus and make it possible to expand the design.

The Raspberry Pi is still used as the brains of the operation, but with several improvements. The most important of these is the migration of communication that occurs from the Rasp Pi, the actuators, and the sensors to an I2C bus. This project was easy to accomplish, and was made inexpensive and convenient thanks to the many semiconductors available on the market.

At this point, all of the limitations imposed by the GPIO on the project fall away – specifically, the restricted number of I/O ports and the lack of an analog interface. All of the control components, including the Raspberry Pi, the power supply, and I/O and measurement modules, each sit on one board connected to the backplane. With this flexibility in putting the switches together, it is easy to change out components that fail.

At first glance, this way of installing components might seem more complicated. However, you will find that the work is worth it when it is time to perform maintenance. To start, I will take a look at all of the components and introduce them in detail. You can find all of the circuit diagrams referred to in this article online [2].

New Construction

The expression "backplane" might sound complicated at first, but it is really just a breadboard on which each individual connection for a pluggable connector is linked to all other pluggable connectors. This means, for example, that a wire on pin 1 of the first connector leads to all of the other pin 1s in the rest of the connector locations. Figure 2 shows a finished backplane for the greenhouse control that was made from a simple 160x100mm (~6x4-inch) Eurocard [3].

Figure 2: The simple and economical backplane built for the greenhouse control makes it easy to perform maintenance on the project.

Another unique feature of the backplane used in this project is that all of the pins are linked in a row. This means 25 lines are available for communication with peripherals from the 50 pin connections of each plug. The current construction uses just a fraction of the pins. Therefore, the project has ample room for expansion. Table 1 shows the current pin assignments on the bus from top to bottom.

Table 1

Pin Allocation

Pin

Assignment

1

+5V

2

+3.3V

3

I2C SDA

4

I2C SCL

5-24

Unassigned

25

0V (GND)

The main advantage of the design is price. The components are available in any electronics store for very little money. The two-row plugin connectors make the entire construction considerably more stable than would be the case with the one-row alternative. Bus systems that have been prepared with an eye to all possible details are expensive by comparison and would increase the project cost.

Buy this article as PDF

Express-Checkout as PDF

Pages: 6

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Building a Raspberry Pi greenhouse

    A greenhouse environment has to be just right. The temperature can't climb too high or sink too low, and the plants need water. Why not put your Raspberry Pi to work as the gardener?

  • Android Pi

    Your Android device can be a versatile companion for Raspberry Pi. We describe some useful apps to help you make this happen.

  • PHP on Raspberry Pi

    Getting started with PHP on Raspberry Pi is easy. We show how to build a simple PHP app to control an LED.

  • An interactive Advent calendar

    An Advent calendar during the Holiday season is a lovely tradition, but the calendars on the market are rather ordinary. We describe a Rasp Pi project that lets you create an innovative and unique Advent calendar.

  • Getting to know the Raspberry Pi I2C bus

    When the Rasp Pi GPIO connection capabilities are insufficient for your project, you can turn to the industry-standard I2C data bus to communicate with actuators and sensors.