My idea is inspired by my final project- again - as I'm trying to use every single chance to try the features I want to include in my greenhouse
Every plant needs sunlight, but some need a little less, others need a little more and a few need total darkness.
I will be using a simple pot holding a young seedling that is freshly growing into a green bell pepper plant (Capsicum annumm; family: Solanaceae) which belongs to the potato family that includes other important crops like potato, tomato, all peppers, and eggplant.
Green bell pepper plant needs: high temperatures (more than or equal to 16°C), moist soil, and full direct sunlight for at least six to eight hours.
Assuming that my circuit will be implemented inside a cardboard enclosure, I'll be introducing some ideas that will:
Measure the percentage of relative humidity (not less than 65% and not more than 85%) or the temperature in Celsius (not less than 16°C and not more than 23°C) through a DHT (Temperature and humidity sensor) that lights up a green LED (optimal temperature) if the temperature is more than 16°C and less than 23°C and a buzzing sound is turned on if the humidity is more than 85% and less than 65%
Detect the amount of light through an LDR (light sensor), to light up a white LED if the light is not enough.
Software Wiring:
I decided to use Fritzing as it supports adding more advanced components that are not used through Tinkercad.
Arduino IDE:
Arduino IDE is the software platform that codes anything that the Arduino board itself can use.
Enclosure:
Cardboard
Cutter
Gluegun
Scissors
UHU stick
Electric Components:
LEDs
Connecting wires
(Jumpers)
Resistors
Breadboard
LDR sensor
DHT sensor
Arduino UNO
Software Wiring
Implementing both ideas needed using fritzing to wire all the components on a software sketch first. (I got used to it and it's very helpful and risk-free)
The DHT (Temperature and Humidity) sensor module is connected through the data pin to the digital input pin 2, the VCC pin is connected to the Voltage pin on the breadboard, and the ground pin is connected to the ground pin on the breadboard.
The buzzer (piezo) is connected to pin 7 on Arduino UNO through its positive end and the negative end is connected to the ground pin on the breadboard.
The LDR sensor module's A0 pin is connected to the analog pin (A0) on Arduino, ground pin to the main ground on the breadboard, DO pin on arduino pin no.3, and the VCC pin to the main voltage on the breadboard.
Each of the LEDs is connected to a 220Ω resistor and the resistors are each connected to the ground separately (to the breadboard's main ground), the green LED is connected to Arduino on pin no. 6 and the white LED is connected to Arduino on pin no. 4
Using the library (sketch menu then include library) on Arduino IDE, I installed DHT11 library (uploaded by adafruit) then, the example of DHTtest showed another coding window that shows how the DHT sensor is used.
Then I added the if conditions as shown in the screenshots below.
Using a simple cardboard design as a pot, it turned out to be as follows, through somehow similar wiring color code to that on fritzing:
The DHT sensor: is connected using the yellow wire to the Arduino pin no.3
(White wire to the common ground on the breadboard and the red wire to the common voltage pins on the breadboard)
The LDR sensor: is connected using the orange wire to the Arduino analog pin A0, DO to pin no.3.
(Brown wire to the common ground on the breadboard and the red wire to the common voltage pins on the breadboard)
Buzzer: is connected to the Arduino through pin no.7, and the brown wire to the common ground
The LEDs: each is connected to the common ground seperately through two brown wires that connects each with a 200 ohm resistors, and both LEDs have separete wires (white LED with a white wire to the Arduino pin no. 4, and Green LED with a green wire to the Arduino pin no.6)
I couldn't find the components on fritzing directly, so I downloaded them using GetHub: DHT (https://github.com/mitskovets/DHT11/blob/master/DHT11%20Humitidy%20and%20Temperature%20Sensor%20(3%20pins).fzpz)
There was another challenge in the coding condition as I used or instead of and through these lines: if (t >16 || t <23 ) if (t >16 || t <23 )
I used the help of ChatGBT to detect the error which was that the code should be used as:
if (t > 16 && t < 23 ) else if (h < 85 && h > 65 )
This assignment is such a brave move to try - with being totally open to failure and improving- more ideas I planned to implement into my final project by going through the ups and downs of coding using Arduino UNO into my greenhouse, that's why I wanted to think about an idea that concerns plants again, and to use a real plant like the ones I'm planning to use into the final project. (إن شاء الله)