First project - automated greenhouse - assistance for beginner please

Hi, I am looking for some help please.

I have researched several automated greenhouse projects but have been unable to determine what parts I actually need.
I am a software developer by trade but have no knowledge of electrical components - this is where I am confused as to what parts are required.

What I would like to control via the arduino is:

LED grow light - mains connected
Fan - mains connected
DHT11 humidity / temp sensor
12v water pump
12v computer fan to cool arduino setup

The LED grow light will be turned off/on by a timed function in the arduino.
The DHT11 temp/humidity values will determine whether to turn on the mains connected Fan.
The 12v water pump will also be controlled via a timing function.
The computer fans will most likely be on all the time.

So, I have in mind what components I need to acquire, but really - not sure!

I’m thinking I will need a relay to operate the mains connected stuff - do I need resistors, transistors, etc.???

How do I determine what is needed?

To make it simple, You can use relay in between Arduino and fam, pump.

The following tutorial may be useful for you:

1 Like

I would use 3 relays for: light, pump, and fan.
I’ve done a similar project and you can find all components you need on AliExpress.
Using relays allow you to expand your project (by adding a more powerfull fan, pump or led strip for example) without bothering too much about power consuption in order to choose a transistor.
A website I reccomend for lerning how do sensors work is the following:
https://lastminuteengineers.com/electronics/arduino-projects/

1 Like

Hello
I would use a SD-card shield, including RTC to make some data logging.

p.s. The BME280 is a perfect sensor for the measurement of environmental data.

1 Like

You can get relay modules that allow you to turn things on and off using different voltages from your regular suppliers. Usually they come with 1, 2, 4, 8 or sixteen relays. Since four will be enough your needs, you can also control the computer fan if it suits you.

Note that such relay modules generally come with optoisolation and flyback diodes. This is good for keeping the Arduino isolated from voltage spikes and interference. I wouldn’t buy one that didn’t have those things.

Switching the relay coils takes power. Often relay modules have a jumper on them that allows you to get that from the Arduino. This is a bad idea as it defeats the optoisolation and if you have enough relays, the Arduino may not be able to manage switching them all on.

Since you have 12V power available consider a relay module that takes 12V for the coils, while keeping the on/off logic 5V and low current.

Arduino does not pull much current but the voltage regulator will get hot if you make it drop from 12V to 5V, especially if you make it provide a lot of current, e.g. to relay coils :thinking:

So unless your situation is unusual, a cooling fan is probably not necessary. Won’t hurt of course.

Be careful about working with mains voltage. You will want the relays at least in an enclosure and since the greenhouse is a somewhat hostile environment, probably all the rest of the electronics too.

Since you are a developer, you know better than to build the whole thing and go for big bang testing. The same thing goes double for Arduino because you have potential electrical issues to trip you up too.

@wildbill This is an excellent post - thank you for your time & effort!