Twitter icon
Facebook icon
LinkedIn icon
Google icon
Reddit icon
StumbleUpon icon
Del.icio.us icon

Digital Garden with Hail Protection

Added to IoTplaybook or last updated on: 04/03/2020
Digital Garden with Hail Protection

Story

I live in a part of the country where hail and severe weather are commonplace during the summer months. I was getting frustrated every year when my wife's garden was getting demolished by the nightly hail storms losing our entire haul of vegetable goodies!

I decided to do something about it. I threw together a quick solution using a couple of linear actuators bolted onto a frame I built around the garden (approximately 12ft x 12ft garden). The linear actuators would pull a heavy-duty tarp over the garden when a storm was approaching. Here is a quick view of the roof in action:

Digital Garden with Hail Protection

Hail protection in action

Things used in this project

Hardware components

 

linear actuator 60"

 

×

2

Firgelli Auto

 

12V (Marine) Deep-Cycle Battery

 

×

1

 

 

BTS7960B 43A Motor Driver High-power Module

 

×

2

Amazon

Grove - 2-Channel SPDT Relay

Seeed Grove - 2-Channel SPDT Relay

 

×

1

Seeed

 

Dual Row 5 Position Screw Terminal Strip

 

×

2

Amazon

Raspberry Pi Zero

Raspberry Pi Zero

 

×

1

The Pi Hut

Adafruit

CanaKit

Grove - Barometer Sensor (BMP280)

Seeed Grove - Barometer Sensor (BMP280)

 

×

1

Seeed

 

DC Momentary Reversing Rocker Switch (double pole double throw)

 

×

1

Amazon

 

Newpowa 20W Monocrystalline 20 Watts 12v Poly Solar Panel Module

 

×

1

Amazon

 

Renogy Wanderer 10 Amp 12V/24V PWM Negative Ground Solar Charge Controller Regulator

 

×

1

Amazon

 

Cylewet 6Pcs V-153-1C25 Micro Limit Switch

 

×

4

Amazon

 

Adafruit INA260 High or Low Side Voltage, Current, Power Sensor

 

×

1

Adafruit

Software apps and online services

Raspbian
Raspberry Pi Raspbian
 
 

Raspberry Pi

 
IOT MQTT Panel (Mobile App)
 
  Google Play
 
Adafruit IO
 
  Adafruit io

Hardware Assembly

The guts
The guts

The two motor controllers at the top were there to interface to the linear actuators to the PI. I had both software and manual control of the roof. The manual control of the roof used a two-way rocker switch pictured at the bottom. The manual rocker switch control was active by default. When the PI was going to run the motor controllers it would deactivate the rocker switch, hence the need for the relay which is lit up in the picture.

I threw in a BMP280 temp/pressure sensor for good measure.

I actually planned to use a bunch of soil moisture sensors and rain detection sensors to report more status of the garden/weather but ran out of time before the storm season arrived. Version 2 of this will also incorporate an automatic watering system by recirculating rainwater by pumping water out of a bucket through sprinkler hosing attached to the roof crossbar. Big dreams...

Software Control

Software control of the garden was accomplished by using a Raspberry Pi and MQTT to communicate via Adafruit IO to reach the mobile app on my phone:

The MQTT app on my phone
The MQTT app on my phone

Power

The whole system was powered by a 12V Marine deep cycle battery. I kept it charged by using a solar panel. I also wanted to measure power to make sure I had enough current to drive the actuators and to verify battery status. I used a current sensor to keep an eye on it and reported it through the app.

Roof Status Detection

I needed a way to determine the status of the roof (open, closed, or unknown) and also a way to turn on/off the linear actuators when the roof crossbar was in its final open or closed position. Otherwise, they would tear the frame apart.

Additionally, the linear actuators worked independently of each other so it was possible they would be out of sync and wouldn't close/open completely. In practice, the linear actuators were always out of sync so this became a real problem.

I solved this problem by using 4 limiter switches, one on each of the four corners, to detect when the crossbar would be triggering (resting on) each of the switches.

Code

RogyGarden - git clone

ndrogness / RogyGarden

Digital Garden with hail protection — Read More

Latest commit to the master branch on 1-26-2020 - Download as zip

Credits

Nick Rogness

Nick Rogness

 

Hackster.io

This content is provided by our content partner Hackster.io, an Avnet developer community for learning, programming, and building hardware. Visit them online for more great content like this.

This article was originally published at Hackster.io. It was added to IoTplaybook or last modified on 04/03/2020.