Inspiration

In 2013, the Humble Roots Project was born out of a need to grow medical cannabis indoors legally, using sustainable, organic, pesticide-free cultivation methods capable of producing consistent yields, in both quality and quantity.

Medical cannabis patients and caretakers who have determined that investing in their own garden is financially sound and healthy still face several challenges: cannabis can be tricky to grow, requires constant care and a well-controlled climate in order to thrive.

While commercial greenhouse automation controllers are well-suited for this task, they're also expensive, proprietary, closed source solutions. Small scale growers typically resort to using 'low-tech' or 'no tech' solutions (i.e lights and irrigation on timers, climate control using a basic thermostat and humidistat) at the risk of losing entire crops.

The Humble Roots Project was built to fill the gap between commercially available automation systems and low-tech solutions. By automating the control of key processes, and by following some basic best practices, the Humble Roots Project empowers gardeners with the knowledge and the tools needed to reduce certain classes of risks, to minimize manual labor and to conserve precious resources, such as water and power.

To mitigate the steep learning curve associated with cannabis cultivation, the Humble Roots Project aims to provide recipes for growing different types of plants. A recipe is a complete plan for managing the growth cycle of a plant from seed/clone to harvest, including variables such as watering and feeding schedules, lighting schedule, temperature and humidity control, among others. The recipes are meant to educate and guide the budding gardener, as well as allowing a master grower to experiment with and fine-tune the quality and consistency of her yields.

Indoor Growing Basics

In order to understand the components of the Humble Roots Project, it is worth covering the basic requirements for indoor growing, such as:

Garden Space

An indoor garden should be a secure, insulated space that keeps out moisture, heat and cold, pests and unfiltered air. Here, the Humble Roots Project is a 9' x 12' ft indoor garden space built inside of a home car garage. The following diagram provides a simplified view of the Humble Roots garden space as it is organized today. It will be referenced when discussing the integration of the environment with the devices, hardware and software used to control it. The space is reconfigurable and uses parts commonly available on-line or from local hardware stores and nurseries.

The elements that need to be considered when setting up an indoor garden space are: thermal efficiency, lighting efficiency, water treatment, water conservation and air quality control.

Thermal Efficiency

When designing an indoor garden, it is important to make sure the room has high thermal efficiency. Thermal efficiency is important because it has a direct impact on the resources dedicated to heating and cooling the garden space.

For the Humble Roots Project, the garden is located in a room elevated above ground to prevent the floor from getting too cold during the winter months. The floor, the walls and the ceiling are filled with R21 insulation material. The insulated material is sandwiched between two plastic moisture barriers. The door is made of metal, can be locked and seals tightly with its frame. Because the room is well insulated, it allows for semi-passive cooling and saves a great deal of energy in the process since an air conditioning unit is not required. Passive cooling relies on a temperature differential between cool outside air and warm air inside of the room. A fan draws cool air inside the room while exhausting warm air.

Running the system at night, when lights are on, ensures that the temperature difference between the two zones is adequate for passive cooling. It also makes operating the garden cheaper since the cost of grid power drops dramatically during off-peak hours.

Louvers automatically lift when air enters the space and shut themselves off afterward, preventing light, air and smells from leaking in or out of the garden. This makes the room ideal for growing and curing cannabis after harvesting. We will see later how software contributes to achieving a climate equilibrium and further contributes to saving energy.

Lighting Efficiency

The largest power consumer in an indoor garden is the lighting. For that reason, it is important to ensure that it is as efficient as possible: as much light as possible needs to be usable by the plants while keeping the amount of heat produced by the light down to a minimum.

The Humble Roots Project uses two LED lamps, totaling 885 Watts, to illuminate the ~4.5' x 4.5' planted area from above and from one side. The room is painted flat white, from floor to ceiling, making for a very bright environment, maximizing the lamps' output.

LED lights were chosen for their efficiency: they're engineered to only emit light in the blue, red, IR and Ultraviolet (A) parts of the spectrum, which plants thrive on. Nearly all of the green portion of the spectrum is eliminated as it is useless for photosynthesis and therefore, saves energy. These lamps produce little heat, which makes passive cooling possible.

The power of the lamps is sufficient to penetrate through canopy foliage and promotes heavier growth even in the lower parts of the plants.

Finally, LED lamps do not require electronic ballasts, further reducing heat, wiring complexity and potential failure points. Efficiency and reduced part count both help offset the higher cost of LED lamps compared to other lamp types.

Water Treatment and Conservation

Water management in an indoor garden is often the most problematic aspect that needs to be addressed: first, cannabis plants are particularly sensitive to water quality. Second, managing water indoors can be a labor intensive task if there's no infrastructure in place to ease the process.

In the Humble Roots Project, a copper pipe brings cold city water into the garden space. Another PVC pipe leading to the sewers is used to drain out the gray water out of a sump.

City water quality varies greatly depending on where you live but even good quality city water invariably contains additives, such as Chlorine or Chloramine as well as other minerals that will negatively impact cannabis plants. If left unfiltered, these minerals and metals can lead to toxicity or deficiencies in the plants. Therefore, it is wise to 'scrub' city water with a carbon filter or a reverse-osmosis system before using it in a cannabis garden.

There are efficiency trade-offs to be considered with different water treatment methods: for instance, a reverse-osmosis system produces some 'waste water' and carbon filters eventually need to be replaced.

While Chlorine just evaporates when left to air out for a few days, Chloramine takes much longer to dissipate and that water can be problematic to store in the meantime and can add unwanted humidity to the air.

Carbon filtering and reverse-osmosis have both been used successfully as part of this project. The operation of the reverse-osmosis system is controlled through a solenoid valve and an ultrasonic distance sensor monitoring the water level in a holding tank.

Assuming that water has been properly conditioned, it still must be applied with care: too much water will prevent the root system from accessing oxygen, stunting and eventually killing the plant. Too little water and the plant will starve, dry out and die too. Accurately tracking and maintaining an optimal moisture level in the growing medium is not only beneficial to the plants, it is also beneficial to our drought-stricken environment: by using smart irrigation techniques, one can grow a very healthy patch of plants with less water per day than is required to flush an average toilet just once. A custom irrigation system was built to meet this goal, combining a soil moisture probe buried root-deep in one of the pots with a water distribution 'network' going to each plant. Software determines when to irrigate and how much.

Some growing techniques consume larger amounts of water than others: for instance, growing with a hydroponic system, except Aeroponics, requires far more water than growing in soil, regardless of scale. For this reason, the Humble Roots Project favors soil as its growing medium. A good soil mix retains just the right amount of moisture, is well oxygenated and provides a strong buffer against sudden pH fluctuations. Soil can also be re-used when cared for and amended properly.

The run-off water coming from irrigating the plants, from the reverse-osmosis system and from the dehumidifier drain into a 'sump', made from three 5-gallon buckets linked together. When the water reaches a defined level, as measured by an ultrasonic distance sensor, it is automatically pumped out to the sewers.

Once combined with nutrients, the pH balance of the water is extremely important to test and adjust, regardless of the growing medium: it affects the availability of nutrients to the plants and the plants' ability to uptake water. This is addressed in the grow recipes driving the automation. It also ensures that the run-off water pumped out to the sewers is as close to being pH neutral and as nutrient-free as possible.

Air Treatment

Maintaining excellent air quality is vital to grow a healthy garden: filtering out contaminants such as spores, pollens, dust, mites, is key to preventing a host of problems that can quickly destroy a crop. For that reason, in the Humble Roots Project, all the air entering the garden is filtered through a MERV 12 box filter. Similarly, it is also critical to maintain an optimal range for air temperature, relative humidity and CO2 levels, as they also impact the growth of the plants and the amount of resin produced by cannabis flowers.

Air temperature within the grow room is controlled by a powerful in-line fan exhausting hot air through an activated carbon filter, scrubbing the air and removing odors in the process. Note that the filter is mounted outside of the room: this is slightly less efficient than mounting the carbon filter on the inside, but the gain in space is worth the small efficiency trade-off in this case.

A constant air flow is maintained within the room, thanks to a fan circulating air around the plants.

The relative humidity within the room is controlled through a small dehumidifier unit, keeping molds, such as Powdery Mildew and Botrytis, from being able to develop.

Controlling air moisture levels also improves the performance of the activated carbon filter by preventing carbon particles from 'clumping' together when excessively humid air passes through it.

It's worth mentioning that relative humidity sensors built into consumer-grade appliances often lack in accuracy. The Humble Roots Project takes this issue into account by using precise sensors so that inexpensive consumer appliances can be controlled accurately.

Plants And Growing Medium

To make the most of the light available to them, each plant is potted in a 3.5 gallon bucket, allowing for a healthy root system and foliage to develop but not so large that competition for light resources becomes an issue. A screen mesh helps with training the plants to grow uniformly wherever light is available and helps support the stems during the flowering phase of the growth. The 'planter buckets' are inserted in water collection buckets, all leading to a sump through gravity and flexible tubing.

The Control System

Humble Roots Project Architecture

The control system of an indoor garden is what allows a gardener to work “smart” instead of working hard. In addition, a control system is vital for ensuring consistent harvests in both quality and quantity.

The Humble Roots Project regulates the functions of the garden thanks to the following elements:

ts=1435942194
node=40&rssi=-73&t=clm&bat=3.75&low=0&pwr=0&tmp=25.63&rh=53&ts=1435942199
node=20&r=2&cmd=act&s=1&tok=R3adA
node=20&r=2&cmd=act&s=1&tok=R3adA&tx=ack&ts=1435942199
node=20&r=0&cmd=act&s=0&tok=Dgn1B
node=20&r=0&cmd=act&s=0&tok=Dgn1B&tx=nack&ts=1435942200
node=20&r=0&cmd=act&s=0&tok=J0rpP
node=20&r=0&cmd=act&s=0&tok=J0rpP&tx=ack&ts=1435942200
node=20&rssi=-62&t=rly&bat=5.00&low=0&pwr=1&r=0&s=0&ts=1435942200
node=4&rssi=-54&t=lvl&bat=1.77&low=1&pwr=0&cm=23.99&ts=1435942203 

Python, MQTT, Arduino and life at 433 MHz

These technologies were chosen for a simple reason: they're inexpensive, open, well documented and capable of running just about anywhere without being bound to a specific vendor platform: considering the constant stream of development boards coming on the market, it seemed wise for this project to abstract the underlying hardware and the operating system as much as possible. Python, MQTT and Arduino all support this goal.

The choice of using 433 MHz radios from HopeRF deserves a more in-depth explanation: the application doesn't care what the underlying communication link is and from that standpoint, WiFi and Bluetooth would work equally well. For instance, you could mix and match or swap out the Moteino nodes for Particle cores, LightBlue beans, AirBoards or any other flavor of 'IoT' board without the rest of the application knowing about it.

However, in this instance, using HopeRF RFM69x 433 MHz radios had several benefits over the alternatives: because they operate at a lower frequency, these radios work well against obstacles while consuming very little power during transmissions (16mA to 45mA) and can be put to sleep to conserve power. Yet, they maintain a very good range, appropriate for indoor and outdoor applications on our 'homestead'. WiFi alternatives consumed too much power (~150mA) to be viable for extended battery-powered scenarios. Bluetooth Low Energy sips power just like the RFM69x radios, but it operates at 2.4 GHz which doesn't work well in point-to-point topologies with no line of sight between transceivers. Since cost was a concern, deploying a mesh network to work around obstacles was out of the question, even though the HopeRF radios can be configured to work in a mesh topology if necessary. ZigBee, Xbee, and Z-Wave transceivers were disqualified for the same reasons as the Bluetooth LE option and the HopeRF radios emerged as the best wireless solution given the constraints of this project.

Hardware

Sensors

To make the Humble Roots Project as easy as possible for others to reproduce, readily available hardware sensors were used (see the Project Repository for the bill of materials). The criteria for selecting the sensors were: precision, reliability, durability, availability and cost.

Measuring Relative Soil Humidity

Because all the plants have the same genetics, the same age, use the same soil mix, are planted in identically-sized pots and receive the same amount of light, they tend to behave in the same way as far as water consumption goes. Therefore, one analog capacitive soil moisture probe is used to measure the relative humidity of the soil within a single pot representative of the rest of the plants, which substantially reduces hardware costs and complexity.

The probe used by the project is a closed hardware sensor unfortunately but it has key advantages over several open hardware alternatives: the probe responds extremely fast to relative humidity changes and cannot corrode in the soil since there's no exposed metal parts.

Most importantly, the probe is thin and entirely waterproof and can be buried deep into the soil where the plant's root ball is densest. Burying the probe well below the soil's surface provides excellent visibility into the actual relative humidity of the soil and in return, ensures that the irrigation system can be controlled accurately. The probe and the wireless Moteino node reading it are both powered via a MightyBoost power supply backed by a Li-Po battery.

Measuring Relative Air Humidity and Temperature

As mentioned above, the relative humidity of the air as well as the ambient temperature must be controlled accurately to prevent potentially serious problems from developing in the grow room. To this end, a Moteino WeatherShield. featuring an I2C Si7021. temperature & humidity sensor as well as a BMP180. atmospheric pressure sensor were used to measure air quality. The node is powered by a PowerShield. supply also backed by a Li-Po battery. The temperature data is used to drive the vent fan while the relative humidity data drives the dehumidifier.

Measuring Water Levels

In order to determine the level of water in the sump and water holding tanks, inexpensive, yet accurate HC-SR04 ultrsonic sensors are used to evaluate the distance between the surface of the water and the sensor: the shorter the distance returned by the sensor, the higher the water level. For the sump, a rule determines when the water level requires activating the pump draining the water to the sewers. For the water holding tank, another rule determines if the solenoid valve controlling the reverse-osmosis filter should be activated. In both cases, the sensors are powered through 5V phone charger supplies feeding the sensors and the Moteino nodes. They will eventually make use of Li-Po backed power supplies as well.

Actuators

For the actuator nodes, a couple of custom devices needed to be created: when the project started, suitable alternatives were unavailable at affordable prices or had inadequate power specifications for the tasks at hand. Now that countless 'IoT' devices have flooded the market, it may be possible to substitute these custom devices with 'off the shelf' solutions and some software integration work but for the time being, that topic is out of scope.

The Relay Switch Box

The 'relay switch box' can control six different appliances, which can be turned ON or OFF through mechanical relays, up to 16A @ 240V. A single power cord connects the mains to the switch box.On the inside, a 5V power supply is used to energize the relays and powers the Moteino node driving their operation. This switch box was initially controlled through a custom 'I2C over Ethernet' interface for which the Moteino node was a simple drop-in replacement, leaving some extra space and holes in the case. Panel-mount outlets are supported by a custom laser-cut aluminum plate, ensuring that the case is sturdy and can handle the force applied when inserting and removing power plugs. The switch box case is made of flat white laser-cut acrylic, which maximizes the amount of light reflected toward the plants.

The Valve Switch Box

To ease working with solenoids, a custom board was designed, capable of driving eight N-Channel Power MOSFETs. In the context of this project, a single 12V / 3A solenoid valve is needed to manage the reverse-osmosis water filter, making for simple power requirements and eliminating the need for heat sinks on the MOSFETs. A recycled 12V / 5A laptop power supply turned out to be ideal for powering the solenoid and the micro-controller at the same time since the voltage regulator on the Moteino board accepts DC inputs up to 16 volts. A single 470uF electrolytic capacitor decouples the Moteino controller from its power supply, preventing brownout-induced resets whenever a solenoid is energized.

Recipe-Driven Automation Rules

All automation operations in the project are driven through a set of rules generated from plant growth models called 'recipes'. A recipe breaks down the growth cycle into time periods of varying durations. For each day within a specific period of time, the recipe provides all the relevant parameters driving the climate control system, the irrigation, the light cycles as well as the exact feeding schedule for the plants. Some of these parameters are used as automation rules while others are directed to the gardener via notifications about what needs to be done on a given day. The interface used to create the recipes is a simple spreadsheet at the moment but a mobile application is in the works.

The parameters defined by the recipe result in JSON rules driving the automation and alerts.

	"clm": [{
		"enabled": 1,
		"node": "climate",
		"value": "tmp",
		"on":  {"op": ">",  "setpoint": 24.0, "cmd": "node=relay&cmd=act&r=vent&s=on"},
		"off": {"cmd": "node=relay&cmd=act&r=vent&s=off"},
		"alert": {"op": ">=", "setpoint": 30.0, "title": "High temperature alert"}
		},
		{
		"enabled": 1,
		"node": "climate",
		"value": "rh",
		"on":  {"op": ">",  "setpoint": 54.0, "cmd": "node=relay&cmd=act&r=dh&s=on"},
		"off": {"cmd": "node=relay&cmd=act&r=dh&s=off"},
		"alert": {"op": ">=", "setpoint": 56.0, "title": "High humidity alert"}
		}],
	"timers": [{
		"enabled": 0,
		"task": "light",
		"value": "ts",
		"time": {"from": "18:00", "to": "06:00"},
		"on":  {"cmd": "node=relay&cmd=act&r=light&s=on"},
		"off": {"cmd": "node=relay&cmd=act&r=light&s=off"}
		}]

Dashboards

Collecting long-term data provides several benefits for gardeners such as real-time monitoring of the climate and systems operating the grow room, ongoing analysis of energy efficiency, tuning growth recipes to improve yields from harvest to harvest are some of the most common applications.

Being able to 'rewind' time is also invaluable for troubleshooting purposes: the context provided by the data not only eliminates guesswork, it enables peer reviews and allows for the discovery of patterns that could otherwise be difficult to detect.

The Mobile Interface

A mobile interface allows a gardener to monitor or control the conditions in the garden from a remote location. The mobile interface is minimalist at the moment but it is sufficient to cover fundamentals such as SMS alerts and reporting on the current state of the system on demand. Basic operations such as pausing the ventilation system are easy to configure because they also rely on URL-encoded text commands used throughout the project.

The mobile interface for the release of the project was pieced together by combining IFFF's “Do Button” application together with PushBullet. Behind the scene, the Notify process discussed above integrates with the PushBullet API and handles the communication between the control system and mobile device(s).

A dedicated native “Humble Roots” mobile application is in the works but in the meantime, there's enough functionality in this simple interface to afford some peace of mind while away from the garden.

Conclusion

As of June 2015, the Humble Roots Project has been a living experiment for the past 2.5 years. It has gone through several iterations of hardware and software, incrementally reducing complexity along the way.

With each iteration of the project, a new crop of medical cannabis was successfully grown, enabling recipes to be crafted for the following strains: White Rhino, Dr. Who, Trainwreck, Grand Daddy Purple and two other hybrid Indica strains dubbed Enigma Girls due to their unknown origins. This last point is important: modeling plant growth into recipes works well and is repeatable given similar genetics.

Finally, thanks to commonly available sensors, some 'home automation' components, and following simple horticultural best practices, it is possible to build a well-controlled indoor garden, ideally suited for producing high-quality cannabis, sustainably, every time.

Hopefully, the Humble Roots Project will inspire others in the medical cannabis community to participate in crafting and sharing recipes for their favorite strains...