Laboratory One Research Blog

Indoor Agriculture Part 1 - Grow Lights on a Schedule

May 27, 2018

Grow Light System

This first installment on Indoor Agriculture focuses on building a Grow Light system which runs on a schedule. We will use an Arduino Uno to run a relay connected to an LED array, and use a Raspberry Pi Zero W to manage the day/night cycles via serial connection. The day/night schedule should be adjustable. In the past, I’ve used an outlet timer to do this. While this is fine, our Indoor Agriculture will eventually be fully automated. With this in mind, we will pursue a digital solution.

Bill of Materials

Item Price
5V 2-Channel Relay Module $ 9.99
LED Grow Light $ 29.91
Arduino Uno $ 11.98
Raspberry Pi Zero W $ 15.95
Micro SD Card $ 14.73

Constructing the Circuit

Build the circuit as illustrated by the following diagram. Make sure your circuit makes sense for the components you’ve choosen.

Grow Light Circuit

Test the Circuit

  1. Clone the following git repository: Indoor Agriculture
  2. Upload the grow_light.ino program onto the Arduino Uno.
  3. Follow the instructions to setup the python software on the Raspberry Pi Zero W.
  4. Run the program
  5. Send 1 to turn the grow lights on
  6. Send 0 to turn the grow lights off

Setup the Day/Night schedule

  1. Configure the DAY_HOURS and NIGHT_HOURS variables in the .env file.
  2. Run the program.

Next steps

That’s it! Simple. But we’re not done yet. We still need to:

  1. Build a light mount
  2. Build a ROS system to manage the lights at a high level.

Stay tuned for part 2.

Peter Chau

Written by Peter Chau, a Canadian Software Engineer building AIs, APIs, UIs, and robots.