Introduction: Automated Seedling Nursery

What it does:
This is a device that waters and turns light on and off automatically for growing starter plants indoors. The advantages to this is that you can extend your growing season a couple of months by starting plants indoors when it would otherwise be too cold outside to do so and with very little oversight. I grew hundreds of tomatoes last year with this device and it works marvelously. A couple of disclaimers right from the beginning: I am a beginning Arduino user. Are there better ways to write the timer code? Absolutely. Does it get the job done? YES! You need to keep an eye on the water level in your drainage container about once a week. Other than that, this project is fairly straight forward.

Step 1:

List of materials:

1. Arduino microcontroller.

2. 2 relays (can be substituted for transistors if you know how to use them. I have not had much success with them.)

3. 1 12v power supply.

4. 1 or 2 small 12v water pumps.

5. Light source. LED or fluorescent.

6. Some wood to make a cabinet with or a set of size appropriate shelves.

7. Seedling starter trays. Larger ones with no holes in them and smaller ones with holes for drainage.

8. Small lengths of fish tank tubing.

9. 3 small buttons.

Step 2:

Prepare the seedling trays with the hoses. You need to cut holes for the fish tank tubing in the seedling trays and epoxy them in place. You could use other adhesives or hot glue but those methods are less reliable and are prone to leaks. Connect a length of hose from the water pump to the seedling trays and separate hoses at the bottom of the trays so water can run back out into the collector basin. When the watering cycle starts it will run for about 30 seconds (per the code and can be adjusted to preference.) When the cycle is complete, the water will sit in the trays for a time while it drains back out watering plants thoroughly. You want the drain holes at the very bottom of the tray so there is no standing water as this can rot your plant roots. Basically, the water gets pumped into the trays and drains right back out. Not rocket surgery.

Notice in the third picture how I've connected two chambers as low as I could get them and epoxied the two sides so water could flow between them. Also, my large trays all had holes in them so I took some epoxy and tiny pieces of fabric to close them up. I placed a small piece of fabric over the hole and then spread a small amount of epoxy around and into the fabric. Once the epoxy set up they sealed nicely. Place the smaller trays with the dirt and seeds inside the larger ones so you can remove them easily when it's time to pull them back out for planting. You won't be able to remove the bottom ones without disassembling the entire hose system.

Lastly you need to place a submersible pump into a water storage collector so exercise caution as you can't have bare exposed wires under water. Use some common sense here. Electricity, water, yeah. Keep wire breaks outside the collector or preferably, tie directly into the relay.

A final note about setting up the cabinet is it's best to trap the heat in from the lights and I wrapped all the open areas around mine with bubble wrap to keep the plants at a cozy 80 degrees.

Step 3:

Mount the light at least 12 to 16 inches above the seedling trays to allow plenty of room for the plants to grow. If your seedlings develop a long stem it means they are reaching and you aren't supplying enough light and need to get a brighter light source. Splice one end of the power supply into the relay as shown in the diagram.

According to the code, connect the trigger pin on the relay to pin number 6 on the Arduino for the pump. If you have a second pump, connect that one to pin 8. The code accommodates for 2 pumps but is only using 1. If you need to use a second pump un-comment the code where it's supposed to write high for the bottom pump.

In the second diagram I'm taking a little liberty here with the components but follow along and we'll get through this. The two orange relays were my only options in the simulator and are for breaking or connecting current, like switches. The third picture is of the actual relay I've used. They have an input and an output for the power routing through them and the same on the side with the LEDs. The pin labeled VCC needs to connect to the 5v power of the Arduino and the GND connects to the ground of the Arduino. The IN pin connects to the pins 6 and 7 for the light source and the water pump. If you have a 110v light you need to route 110v power from a power strip through the relay on the side with the screws. For the pump, it's likely 9v or 12v and you need to route one leg of that power supply through the screw side of the second relay.

The motor in the diagram is the only choice I had to represent the water pump.

The three push buttons are for changing settings in the Arduino. The button connected to pin A5 will advance the time 1 hour starting at 12:00 midnight. I generally just try and get this fairly close to the actual time because it's of little importance to be exactly precise.

The cycles button on pin A4 is the number of times the water pump will cycle per day. Generally, I found that once per day was plenty but if you wanted you can also cycle through the options of twice, four times, 8 times or back to once. Each time you press the cycles button it will advance the setting.

The A3 button changes how long the water pump will run per cycle. Default is 30 seconds I believe. It's been a year since I wrote this code so please keep in mind, I'm going from memory on some of this. pressing the button will add 30 seconds until you get to 150. Pressing it a 6th time will set it back to default.

I don't have an actual timer on the Arduino module so the device actually gets about 15 minutes behind each day. The best way I've found to handle this is just to press the hour button once every four days to add an hour and it will be caught back up. There are ways to circumvent this. Subtract 15 minutes worth of milliseconds from the time on the line:

if (deciTime > 8640000) {deciTime = 0;}

It still won't be exact unless you add the functionality of a timer to the setup but this worked just fine for me the way it was so I never got around to messing with it. If you come up with a clever solution I'd love to hear about it.

When you first turn the machine on, set the time approximately and the number of times per day to water and how long and you shouldn't have to change that again unless you need to adjust it. I generally cycle for 30 seconds once per day so the default settings pretty much worked fine for me.

Step 4:

There's really not much to the code except a lot of time checking to turn the lights on and off and cycle the water pump. Also there's debouncing for the push buttons when changing the settings.

Any mistakes that you find, please bring it to my attention and I'll be happy to fix them but this ran fine for me last year and I grew many many many plants in this nursery. Anything that's unclear also let me know and I'll do my best to clarify things. Hope you grow some terrific plants with this!


New photo for everyone following this project. Showing good progress for the little guys! 4/25/18

Another photo for everyone. Obviously, the bush beans that are growing so quickly will have to be pulled soon. I'll leave the tomatoes and continue documenting them for you. Notice the 82 degrees in the upper right hand corner of the screen. See how the bubble wrap holds the heat from the lights in? 4/27/18

Updated photo 4/30/18

Microcontroller Contest

Participated in the
Microcontroller Contest