Thanks for purchasing (or otherwise choosing to build) the Garduino Shield. These step-by-step instructions will help you get your Garduino up and running.


Checking your Kit

Here's what your basic kit will include:

Included with the basic kit is the following:

The deluxe kit is the same as the basic but also includes:

A 6" planter as the main shipping package (instead of the Altoids-style tin; less waste!)
2 extension cords (to be controlled by the relays)
~8' of 1/4" plastic irrigation tubing
A submersible mini pump, rated at 66 gallons per hour

If anything is missing, contact us and we'll fix that.


Assembling the PCB

Click on the text for more detail and video of the assembly step!

  1. Cut the 36-pin header strip into 4 headers, 2 6 pins long and 2 8 pins long, and attach them to the Garduino. The longer end of the pins should be down, and you can set the pins in your Arduino to make assembly easier.

  2. Attach the 2 relays to the top of the Garduino Shield. Use a generous amount of solder to ensure a strong connection.

  3. Attach the 3 terminal board connectors, with the flat end facing away from the circuit board. Again, use a generous amount of solder for a strong connection.

  4. Attach the 2 diodes, with the white stripe aligning with the white stripe on the circuit board. After you've attached the diodes, trim the excess leads from the back of the circuit board with a nail clipper or wire cutter.

  5. Attach the LED to the circuit board, making sure that the indentation in the LED matches the indentation in the LED symbol on the board. Trim excess leads.

  6. Attach the 4 resistors to the circuit board, placing the smaller, 220-ohm resistor in the upper right spot, and trim excess leads.

  7. Attach the photocell, leaving most of the leads above the board so you can move the photocell to receive full sunlight, and trim the excess leads.

  8. Attach the thermistor to the board, and trim the excess leads.

  9. Attach a small piece of electrical tape to the bottom of the Garduino shield below the terminal board connectors. This prevents the USB connector on the Arduino from shorting out the terminal board connector.

  10. Insert the Garduino onto your Arduino, and congratulate yourself: you've finished assembling the core of your Garduino shield!

Creating the Moisture Sensor

  1. Cut a piece of wire, about 2' long, and strip ½" off the ends.
  2. Wrap 1 end of the wire around the head of the nail.
  3. Cover the wire-nail connection with a generous amount of solder.
  4. Repeat to create a second nail-wire combination.
  5. Connect the other end of the wire running to one of the nails to a middle lead of the terminal board connector.
  6. Tighten the wire into the connector by turning the screw clockwise.
  7. Repeat for the other moisture sensor.

Modifying the Extension Cords

  1. Cut four 10" lengths of 22-gauge wire and strip ½" off each end.
  2. Look at your extension cord’s plug: one prong is larger than the other. Split the 2 wires of the cord apart, then cut the wire that runs to the smaller prong, and strip 1" off each side.
    TIP: The correct wire is the one without ridges running along its length. Don’t worry if you cut both wires; you can just splice the other wire back together.
  3. Solder a 22-gauge wire to each side of the split cord wire.
  4. Wrap each individual solder joint with electrical tape, and then wrap the set of wires with another piece of tape.
  5. Repeat for a second extension cord. I labeled one 'water' and the other 'light' to help myself keep them straight.
  6. Connect the wire running to the end of the water extension cord with female plugs on it to the uppermost terminal board slot.
  7. Connect the wire running to the end of the water extension cord that connects to the wall to the other slot on the upper terminal board.
  8. Connect the wire running to the end of the light extension cord with female plugs on it to the lowermost terminal board slot.
  9. Connect the wire running to the end of the light extension cord that connects to the wall to the other slot on the lower terminal board.

Creating the Sprinkler Hose

  1. Tie a tight knot in one end of the irrigation tubing.
  2. Use a needle or one of the moisture sensor nails to poke holes in the irrigation tubing wherever you'd like water to be emitted.
  3. Connect the non-knotted end of the tubing to the pump.
  4. Submerge the pump in water; tape over holes anywhere water flow is greater than you'd like and poke additional holes where you'd like more water to be emitted.

Programming Your Garduino

If you're brand-new to Arduino, check out at least the first few lessons of Ladyada's awesome Arduino tutorials here first.

Here's the latest revision of the code for the Garduino:

//include the datetime library, so our garduino can keep track of how long the lights are on
#include <DateTime.h>

//define analog inputs to which we have connected our sensors
int moistureSensor = 0;
int lightSensor = 1;
int tempSensor = 2;

//define digital outputs to which we have connecte our relays (water and light) and LED (temperature)
int waterPump = 7;
int lightSwitch = 8;
int tempLed = 2;

//define variables to store moisture, light, and temperature values
int moisture_val;
int light_val;
int temp_val;

//decide how many hours of light your plants should get daily
float hours_light_daily_desired = 14;

//calculate desired hours of light total and supplemental daily based on above values
float proportion_to_light = hours_light_daily_desired / 24;
float seconds_light = 0;
float proportion_lit;

//setup a variable to store seconds since arduino switched on
float start_time;
float seconds_elapsed;
float seconds_elapsed_total;
float seconds_for_this_cycle;

void setup() {
//open serial port
//set the water, light, and temperature pins as outputs that are turned off
pinMode (waterPump, OUTPUT);
pinMode (lightSwitch, OUTPUT);
pinMode (tempLed, OUTPUT);
digitalWrite (waterPump, LOW);
digitalWrite (lightSwitch, LOW);
digitalWrite (tempLed, LOW);

//establish start time
start_time =;
seconds_elapsed_total = 0;

void loop() {
// read the value from the moisture-sensing probes, print it to screen, and wait a second
moisture_val = analogRead(moistureSensor);
Serial.print("moisture sensor reads ");
Serial.println( moisture_val );
// read the value from the photosensor, print it to screen, and wait a second
light_val = analogRead(lightSensor);
Serial.print("light sensor reads ");
Serial.println( light_val );
// read the value from the temperature sensor, print it to screen, and wait a second
temp_val = analogRead(tempSensor);
Serial.print("temp sensor reads ");
Serial.println( temp_val );
Serial.print("seconds total = ");
Serial.println( seconds_elapsed_total );
Serial.print("seconds lit = ");
Serial.println( seconds_light);
Serial.print("proportion desired = ");
Serial.println( proportion_to_light);
Serial.print("proportion achieved = ");
Serial.println( proportion_lit);
//Serial.print("proportion achieved = ");
//Serial.println( proportion_lit );
//turn water on for 10 seconds if moisture_val is less than 800, turn it off, then wait a second
if (moisture_val < 850)
digitalWrite(waterPump, HIGH);
delay (10000);
digitalWrite(waterPump, LOW);
delay (1000);

//update time, and increment seconds_light if the lights are on
seconds_for_this_cycle = - seconds_elapsed_total;
seconds_elapsed_total = - start_time;
if (light_val > 600)
seconds_light = seconds_light + seconds_for_this_cycle;

//cloudy days that get sunny again: turn lights back off if light_val exceeds 900. this works b/c the supplemental lights aren't as bright as the sun:)
if (light_val > 900)
digitalWrite (lightSwitch, LOW);

//turn off lights if proportion_lit>proportion_to_light, and then wait 5 minutes
if (proportion_lit > proportion_to_light)
digitalWrite (lightSwitch, LOW);
delay (300000);

//figure out what proportion of time lights have been on
proportion_lit = seconds_light/seconds_elapsed_total;

//turn lights on if light_val is less than 600 and plants have light for less than desired proportion of time, then wait 10 seconds
if (light_val < 600 and proportion_lit < proportion_to_light)
digitalWrite(lightSwitch, HIGH);

//turn on temp alarm light if temp_val is less than 850 (approximately 50 degrees Fahrenheit)
if (temp_val < 850)
digitalWrite(tempLed, HIGH);


Note the inclusion of the datetime library, which you can install from here. Unzip to the 'libraries' folder of your arduino directory and you'll be good to go.

Grow Away!

Attach your pump and light systems, and grow away! Check your seed packets (you saved them, right?) to see how many weeks until your plants should be ready for harvest (The included swiss chard seeds should take ~50 days from planting to harvesting). But don’t be surprised if they’re ready sooner than that! If they seem to be growing too slowly, check your watering and lighting routines.

Expanding From Here

I don’t expect this beta Garduino to get everyone gardening and save the world; that’s an exercise for readers to solve with their improvements. But here
are some initial ideas:

If many people start recording the efficiency and convenience of this automated approach to gardening, then maybe we can even grow more food of better quality with less energy. Happy Garduino-ing!