Looking for help designing an automated cannabis microgrowery

Hi! I'm a bit of an arduino noob. I'm looking to set up a system where an arduino controls lighting, fans, and irrigation for three separate compartments containing cannabis plants in different stages of growth.

As far as I can work out, the system will need:

  • An arduino (not sure which one has enough I/O for this job)
  • 3 sets of PC fans
  • 3 sets of CFL lights & fittings
  • 3 solenoids for sending water to the plants
  • 3 soil moisture sensors
  • 3 pH sensors
  • 3 humidity sensors
  • 3 light sensors
  • Some way of rolling a cloth up/down over one compartment to simulate night-time in that compartment - I don't know what I'll need to achieve this
  • Power supply for everything

The idea is there's 3 compartments in a shelf, each of which needs water dripping and lighting along the ceiling, fans somewhere on the sides, and plants on the bottom. A water tank will sit above the whole thing.

I'm a programmer, so I don't need help with that side of things. However, I would like help with any of the following:

  • Parts recommendations
  • Circuit diagrams/diagramming tools
  • Advice from anyone with a similar system

I'm especially interested in any suggestions on how to roll a cloth screen down over a compartment on a timer - flowering cannabis needs 12 hours of darkness per day.

Thanks!

Before we help you, I think you should tell us which country & state you are in. We wouldn't want to be seen as encouraging you to break the law there.

I'm in a country where it's legal to grow for personal use - mods will be able to confirm with my IP.

o3893347:

Before we help you, I think you should tell us which country & state you are in. We wouldn't want to be seen as encouraging you to break the law there.

I'm in a country where it's legal to grow for personal use - mods will be able to confirm with my IP.

so, you chose not to offer information.
but expect us to offer information freely ?

[RantMode. ON]
I work in the repair an maintenance industry.
since the legalization in some states, the cost of labor has almost doubled in those states and the quality of work has dropped to half.
what used to be done in an hour, now takes 2.
based on my experience, this alteration of society is very destructive to the civilization.
you do not chose to be sociable and open
and you want others to do your work for you.
you reinforce my experience with this societal change.
[RantMode,OFF]

South Africa.

Ok then.

Next step is to give more detail about the sensors and other components listed in the OP. Please give links for components you already have or have chosen, and what specifications you need for those you don't have, so we can recommend.

Great, thanks for helping.

I have basically nothing yet, I'm about to start ordering things. I'm thinking I'll need a Mega 2560 because of how much I/O I need. As far as other parts go I'm looking for recommendations - the only thing I've really settled on so far is the Vegetronix VH400 as the soil moisture sensor, although I'm happy to change this out too.

So you're growing in soil? I expected hydroponic.
What is the purpose then of the pH probes? They don't tend to do well in soil. You could put one in your supply water.
I miss some form of fertiliser supply.
You list CFL lights (why not LED? More efficient). Then why the need of a removable cloth for night-time? Just switch off the light.

I didn't realise pH probes don't do well in soil... I may have to go without in that case. I will manually fertilise. I went for CFL over LED because they're broadly similar in efficiency as far as I understand it, but I find CFL prettier to look at, and the whole thing will be visible in my lounge. I need the moving cloth because I don't have 12 hours per day of darkness in my lounge.

From experience, regardless of what you think you need, your wants and desires will change as your skills grow.

I would ask if you have 3 units that are all the same, why not make one and then 2 copies ?
instead of one larger project.

parts depends on your wallet.
the NANO/UNO/MEGA could do this, watch the total pin count
the capacitive style soil moisture sensors are higher in cost than the resistance style, will last much longer.
Solenoid valves are based on water quantity.
a large valve could deliver too much too fast.

A tiny pump might cost less and you can use drip tubing. this would need to
drip tubing and fittings, or fish tank tubing and fittings.
Be careful so it is installed so it does not siphon. the biggest problem since the water is above.

Solenoids often require pressure to operate. you would need to get a low pressure solenoid.

Relay boards to control the lights. they do not take much power and could be used for solenoids and pumps as well.

Add to the list, water tank high and low level switches
some form of alarm in the even things get out of control.

we always advise to make a sketch of the project, wires, power consumption, voltages, etc
and tally the power requirements for each voltage.
then determine if you need more or larger power supplies, or if you can move some things to other voltages.

Thanks Dave.

I thought about 3 copies, but I think I could cut down on cost and complexity by sharing things like the arduino and the water tank.

I'll look into water pumps and drip tubing instead of a solenoid, that sounds more elegant.

An Arduino is cheap (a few USD worth each for a Nano/Pro Mini which are more suitable for permanent projects than the Uno) so you don't save much cost.

Complexity, that depends. Three independent units is less complex than one unit that has to handle all three. I don't see the need for communication between them.

PC fans: the 4 pin type are easier to use with Arduino. They have their own driver circuits, so can be controlled directly by an Arduino pin. However....

Solenoids and fans (assuming no speed control is needed) can be driven by tpic6c595 chips. 8 channels per chip, up to 150mA per channel. As many channels as you like and only 3 Arduino pins needed for all of them.

Arduino: its hard to dissuade beginners away from the Mega... I think they see it as the "Ferrari" of the Arduino world, which it isn't. It's more like an old pickup truck, but even that analogy is misleading. I would describe it as the most direct route to a project that finishes up as a rat's nest of wire where nobody can figure out where the mistake is! But now I'm probably being a little too unfair on the Mega.

o3893347:
South Africa.

Yeah, we even have our dacha beer.

It was sold out before it hit the shelves.

PS
I don't use dacha.
I do smoke and drink.

PaulRB:
PC fans: the 4 pin type are easier to use with Arduino. They have their own driver circuits, so can be controlled directly by an Arduino pin. However....

Solenoids and fans (assuming no speed control is needed) can be driven by tpic6c595 chips. 8 channels per chip, up to 150mA per channel. As many channels as you like and only 3 Arduino pins needed for all of them.

Arduino: its hard to dissuade beginners away from the Mega... I think they see it as the "Ferrari" of the Arduino world, which it isn't. It's more like an old pickup truck, but even that analogy is misleading. I would describe it as the most direct route to a project that finishes up as a rat's nest of wire where nobody can figure out where the mistake is! But now I'm probably being a little too unfair on the Mega.

I see...

Are you recommending for 3 separate nanos, or would one have enough I/O for everything? If I use pumps instead of solenoids I lose the extra pins...

o3893347:
Are you recommending for 3 separate nanos, or would one have enough I/O for everything?

I would probably never recommend 3 Nanos where one could be used.

o3893347:
If I use pumps instead of solenoids I lose the extra pins...

What? Please explain your thinking.

You said I only need 3 arduino pins to run all of the tpic6c595 chips I need to run all my solenoids and fans. Does the same apply if I use pumps instead of solenoids for irrigation? If so, I understand how one nano could be enough for everything.

Your project has little to do but switch some things on and off occasionally. Arduino can do that with less than 1% of the cpu cycles per second.

The Arduino feeds to the TPIC6C595 chips what all the pins should be in less than a millisecond to make each change. The thing is so fast that most of the time it will be waiting for the next change, reading the sensors many times in each millisecond.

If you irrigate with pumps or use fans that need more than small power, the chip pins will need to switch transistors or relays or SSR's to handle higher power than the 595 chips can supply. For those you can use output shift registers instead of the more expensive TPIC drivers.

You could make projects around all the steps and parts of your main project. The more right you get those, the more suited, the better that all will come together best.

CFL bulbs make a lot of yellow and green light, as does the sun. But green plants don't use much of those colors (a little only) so the CFL looks good but much of the light your electric bill pays for is nearly useless to the plant. Red leds and blue leds (mostly red) make light the green plants use mostly, there is the efficiency difference.

Be sure that sunlight is more desired, even reflected it can be strong.

Dec 16, 2018, 08:25 pm
Quote from: o3893347 on Dec 16, 2018, 07:45 pm
Are you recommending for 3 separate nanos, or would one have enough I/O for everything?
I would probably never recommend 3 Nanos where one could be used.

I understand of would often agree. however,
OP has 3 separate but nearly identical growing areas
he is Dirt Farming.
As the new farmer evolves He will want to add features, monitor other things. Control other things, etc.
Any alteration or modification offers a potential to loose the whole farm.

if he wants to add a 4th area, then he has a choice to risk all crops by taking his one out of service and making the sketch for the 4th perfect the first time.
if he wants to alter some water levels or patterns, he has to be perfect.

it he wants to expand to a second area, he will need to duplicate the whole control.
one NANO : $2.00 on Aliexpress, you get 5 of the TPIC595 for the same cost.
using 3 nano's would be more than 3 times the cost if one is doing one area.
if one expands to a second area, then you still have to get one microcontroller. and use a TPIC595 if you are going to use the same program.

as for the dirt farming part. once the OP tries aquaculture and sees how much faster plants grow, the complexity of adding fish will require a second microcontroller or re-writing the sketch to add the additional pumps and sensors. risk of system failure due to editing mistake pops up again.

if he wants to go to the flood and drain method, more work, again possible risk.

I agree that one MEGA could do the existing project.
One NANO and a TPIC595 adds a layer of complexity to the project and additional parts. more room for error.
for inputs, a CB4021B would offer more inputs, then of course, it is either a multiplexor or an ADC chip on a board with I2C or SPI, and more complexity and more chips and more cost.

while most projects should not be split, this particular area does offer advantages to splitting.
each of the three areas is identical so copy and paste is easy.
any one can be modified. individual units prevent complete system failures.
if a 4th is added, local or in another building, or the other side of the house, copy and paste and you are up and running with minimal parts.
lastly, for a noob, controlling a pump, reading a sensor and turning on a light is a great first project.
add shift registers and the project becomes complex and the work now becomes writing code and not farming.
if the OP was not a beginner, the complexity of one unit and multiple expansion chips would be a choice by the OP.
At this point, I feel the goal to get up and running with one NANO can be done in a weekend with a noob. a month; if you add in the shift registers, longer if they have no natural affinity for programming. That is LEARNING, not copy and past the work of others.

o3893347:
Great, thanks for helping.

I have basically nothing yet, I'm about to start ordering things. I'm thinking I'll need a Mega 2560 because of how much I/O I need. As far as other parts go I'm looking for recommendations - the only thing I've really settled on so far is the Vegetronix VH400 as the soil moisture sensor, although I'm happy to change this out too.

search aliexpress for soil moisture sensors to see the capacitive type.
the vegetronix might be perfect, but it is expensive, probably more for one than all the other parts in the system.
I would offer that getting one of each different type offers experience and adds to the learning.