Smart Urban Garden
This project was developed during my teaching sessions with students, where I voluntarily serve as a STEM and robotics instructor. Together, we built a smart urban garden that monitors key environmental factors like soil moisture, temperature, and light intensity using various sensors. Remote monitoring is achieved through the Arduino Cloud, allowing real-time tracking of garden conditions.
For the design and schematics, we used Tinkercad, an easy-to-use platform ideal for learning electronics and prototyping. The project not only taught students valuable STEM skills but also emphasized sustainability by creating a solution to optimize urban gardening.
project Objective
This project seeks to address a significant challenge in Ghana: the impact of illegal mining on food production. Illegal mining has severely degraded agricultural lands, threatening food security and environmental sustainability. To combat this, our initiative introduces smart urban gardens in cities, empowering residents to engage in sustainable food cultivation. By leveraging modern technology, these urban gardens help mitigate the environmental damage caused by illegal mining, while promoting food security and sustainability. This project aims to restore balance to the environment and empower urban communities to contribute to a healthier future for Ghana.
Integration of Advanced Technologies
1. Vertical Cultivation Structure: Our structure maximizes urban gardening efficiency by cleverly using vertical space, increasing crop yields, and adopting resource-efficient practices to reduce the environmental footprint. The design, carefully integrated into urban landscapes, aligns with modern sustainability principles for localized food production, enhancing aesthetic appeal.
2. Automation System: The Automated Irrigation System is a sophisticated mechanism for precise plant hydration within our Smart Urban Gardening Initiative. Constantly monitoring soil moisture levels, the system activates a pump to commence irrigation when the soil reaches a predetermined dryness threshold. This intelligent approach ensures that our plants receive the optimal amount of water precisely when needed. This technological advancement exemplifies our commitment to efficient and healthy urban gardening practices, showcasing a conscientious use of water resources.
3. Sustainable Waste Management: In addressing the complex challenge of waste management in urban environments, our project integrates liquid and solid waste recycling. A liquid kitchen waste filtration system ensures responsible handling for sustainable irrigation, while efficient composting repurposes solid kitchen waste into nutrient-rich compost. This dual strategy reflects our commitment to Eco-conscious urban agriculture in our smart initiative, reducing environmental impact, providing a reliable water source, and aligning with public health efforts by minimizing mosquito breeding grounds.
4.Fishpond Integration: Incorporating organic matter from the fishpond, our Smart Urban Gardening initiative maximizes plant growth by leveraging nutrient-rich fish waste as a natural fertilizer. This innovative approach not only enhances soil fertility, promotes beneficial microbial activity, and optimizes root development but also contributes to eco-friendly practices, reducing reliance on synthetic fertilizers and fostering a self-sustaining urban agricultural ecosystem.
5. Capacitive soil moisture sensor: The capacitive soil moisture sensor plays a crucial role in our Smart Urban Gardening project by providing accurate and real-time data on soil moisture levels. This sensor utilizes the capacitance changes in the soil to determine its moisture content, allowing us to precisely monitor and control irrigation processes. This data-driven approach ensures optimal soil conditions for plant growth, promoting resource-efficient practices and contributing to increased crop yields in our sustainable urban agriculture initiative.
5. Temperature and Humidity Sensor: In the Smart Urban Gardening project, the integration of temperature and humidity sensors is crucial for maintaining optimal environmental conditions necessary for plant growth. The temperature sensor monitors ambient temperature, allowing precise regulation, especially in areas with varying outdoor temperatures. Simultaneously, the humidity sensor assesses and manages air moisture levels, essential for physiological plant processes. Leveraging data from these sensors enables us to implement timely interventions, ensuring consistently favorable conditions for plant growth in ever-changing environments. This dynamic responsiveness contributes to resilient and flourishing crops in our initiative.
6.Grow Light with LDR Sensor: Incorporating cutting-edge technology, our Smart Urban Gardening project features a Grow Light System equipped with an LDR (Light Dependent Resistor) sensor. This innovative system serves a crucial role in maintaining optimal conditions for plant development, particularly during weather fluctuations that may impact natural sunlight availability. The LDR sensor continuously measures the ambient light intensity in the environment. When it detects a decline in sunlight, especially during the seedling stage when plants are most vulnerable, the Grow Light System is activated. This ensures that the plants receive the necessary supplemental light for photosynthesis, promoting robust and healthy growth. By mimicking natural sunlight conditions, our Smart Grow Light System exemplifies our commitment to providing an environment where plants can thrive regardless of external factors. This technology showcases our dedication to leveraging advancements in agriculture for sustainable and efficient urban gardening practices.
7. Elevator Accessibility: The incorporation of an elevator in our Smart Urban Gardening project is a strategic addition aimed at optimizing efficiency and accessibility within the vertical design of our tall building. This feature ensures convenient access to different levels of the gardening structure, facilitating the management and maintenance of crops, sensors, and other components. By providing easy vertical mobility, the elevator enhances the overall functionality of the system, making it more user-friendly and efficient for both maintenance and harvesting activities in our innovative urban agricultural approach.
8. Smoke Sensor: In the Smart Urban Gardening project, the smoke sensor is seamlessly integrated with an alarm system. This ensures quick response to fire incidents, minimizing potential damage through immediate alerts and intervention. The project prioritizes safety, employing advanced technology to create a secure environment for sustainable urban agriculture.
9. Motion Sensor: Given the urban setting of our Smart Urban Gardening project, the motion sensor serves a dual purpose. Beyond detecting human intruders, it plays a crucial role in detecting and deterring animals. When activated, the motion sensor triggers alarms, effectively scaring away animals that might pose a threat to the garden. This proactive approach not only safeguards the project but also ensures the well-being of the cultivated crops, contributing to the overall success of the urban gardening initiative.
10.Water Management: our Smart Urban Gardening initiative is designed to prevent water retention in the soil, ensuring an optimal balance of moisture for ideal plant growth. Through a meticulously engineered outlet system, excess water is efficiently drained, mitigating the risk of waterlogging. This precision in water management not only safeguards against soil overhydration but also maintains the essential moisture levels vital for the health and vigor of cultivated crops. In addition to this, our project incorporates advanced technology to monitor the water level in the irrigation tank, facilitating informed and efficient irrigation practices. This dual approach exemplifies our commitment to promoting a sustainable and thriving urban gardening environment.
11. Emergency Exit: The inclusion of emergency exits in our Smart Urban Gardening project is a paramount safety measure, meticulously designed to provide a secure evacuation route in scenarios such as fire outbreaks or instances of nonfunctional elevators. These exits are strategically positioned to ensure swift and efficient evacuation, enhancing overall safety protocols within the urban gardening facility. By prioritizing the well-being of occupants and personnel, the project aligns with stringent safety standards, demonstrating a commitment to proactive measures for emergency preparedness and response
Supplies
Materials:
- Arduino Uno R4
- Soil Moisture Sensor
- DHT22 Sensor
- LDR (Light Dependent Resistor)
- Water Pump
- L298N Motor Driver
- Relay Module
- Red & Blue LED Lights
- Solar LED Lights
- Ultrasonic Sensor
- Jumper Wires
- Breadboard
- Power Supply (9V or 12V)
- PVC Pipe
- Water Tubing and Containers
- Connecting Wires
- Gas sensor
Tools:
- Soldering Iron
- Multimeter
- Screwdrivers
- Drilling Machine
- Jigsaw Electric Machine
- Glue Gun
- Glue Sticks
Software:
- Tinkercad
- Arduino IDE
- Arduino Cloud Account
Design & 3D Modeling Using Tinkercad
Creating the PVC Pipe Structure:
- We started by selecting the cylinder shape to represent the PVC pipes. We adjusted the dimensions to get the right height and diameter so the plants would have enough space and proper drainage.
Adding Planting Holes:
- Next, we added holes for planting. Using the hole function, we created openings along the sides of the cylinders, spacing them evenly. This way, each crop would have its spot to grow.
Designing the Water Delivery System:
- After that, we modeled the water delivery tubes using the same cylinder shape. We laid these out parallel to the PVC pipes, making sure they’d deliver water efficiently to all the plants.
Layout and Assembly:
- Then we arranged everything together in a way that maximized space. It was important to ensure we could easily access the plants for maintenance, watering, and harvesting.
Finalizing the Design:
- Finally, we reviewed the whole design to ensure everything was aligned and functional. We made some tweaks to dimensions and positions to get it just right.
Using the Design for Construction:
- Once we were satisfied with the design, we saved our Tinkercad project. This would serve as our visual guide when we built the physical garden.
Building the Smart Urban Garden
Now that we had our design ready in Tinkercad, it was time to bring the Smart Urban Garden to life using wood and locoboard. Here’s how we went about it:
- Gathering Materials:
- We collected all the necessary materials, including wood for the frame, locoboard for the planting structure, and PVC pipes for the water delivery system. We also made sure to have all the tools ready, like the jigsaw, drilling machine, and glue gun.
- Constructing the Frame:
- We started by cutting the wood into appropriate lengths to create a sturdy frame. This frame would support the entire garden structure, ensuring it was stable and durable. We used screws and wood glue to secure the joints for extra strength.
- Covering the Pillars:
- To enhance the overall appearance and provide a better finish, we used locoboard to cover the pillars in the structure. This not only made the garden look more polished but also added an extra layer of durability.
- Assembling the Planting Structure:
- Next, we moved on to the locoboard. We cut the locoboard into sections that matched our Tinkercad design, ensuring we had enough space for all the planting holes.
- We then attached these sections to the wooden frame, creating a solid base for the PVC pipes.
- Installing the PVC Pipes:
- With the base ready, we positioned the PVC pipes as per our design. We made sure they were securely fixed to the loco-board and that the planting holes were aligned properly for easy access.
- We used connectors to join the PVC pipes where necessary, ensuring a continuous flow for the water delivery system.
- Setting Up the Water Delivery System:
- After the PVC pipes were in place, we connected the water delivery tubes. We ensured they were laid out in a way that would evenly distribute water to all the planting holes.
- Final Touches:
- Finally, we checked all connections, ensuring everything was secure and functional. We also made any adjustments needed to align with our initial design.
- Testing the System:
- Before we officially called it done, we ran a quick test of the water delivery system. This was crucial to ensure everything worked as intended and that water was reaching all the plants.
Downloads
Building the Elevator for Vertical Farming
Recognizing the need to optimize space and promote efficient farming, we decided to implement a vertical farming system in our Smart Urban Garden. To facilitate this, we constructed an elevator system to easily access different planting levels. Here’s how we approached it:
- Designing the Elevator:
- We started by sketching a design for the elevator that would allow us to transport plants and materials between different levels of the garden. The elevator needed to be compact yet sturdy enough to handle the weight of soil and plants.
- Gathering Materials:
- We collected the necessary materials, which included:
- A strong pulley system for lifting.
- Wooden boards for the elevator platform.
- Metal brackets for added support.
- Rope or strong cables for the lifting mechanism.
- Ultrasonic sensor for floor detection.
- Push buttons for floor selection.
- Constructing the Elevator Frame:
- We built a frame using wood to support the elevator. This frame was designed to fit within the vertical space of the garden, allowing for smooth operation as the elevator moved up and down.
- Building the Elevator Platform:
- Next, we created the elevator platform using wooden boards, ensuring it was large enough to hold multiple pots of plants or gardening tools. We reinforced the platform with metal brackets to enhance its stability.
- Installing the Pulley System:
- We installed a pulley system at the top of the elevator shaft. This was crucial for lifting the platform smoothly and safely. We carefully threaded the rope through the pulleys, ensuring everything was properly aligned to minimize friction.
- Integrating the Ultrasonic Sensor:
- To detect the floors accurately, we installed an ultrasonic sensor at the top of the elevator. This sensor allowed us to measure the distance from the elevator to each floor, ensuring precise stopping and preventing overshooting.
- Adding Push Buttons:
- We installed buttons at each floor and on the elevator platform itself. These buttons were designed to signal the elevator to move to the selected floor. Each button was connected to the Arduino for easy control.
- Connecting the Elevator to the Frame:
- The elevator platform was attached to the frame with hooks that allowed it to move up and down freely. We ensured that the connection points were secure to prevent any wobbling during operation.
- Testing the Elevator:
- After assembling the elevator, we conducted several test runs to ensure it operated smoothly. We loaded the platform with weight to simulate real use and checked for any issues during movement.
- Final Adjustments:
- Based on the test runs, we made any necessary adjustments to improve the elevator's functionality. This included tightening connections, ensuring smooth pulley movement, and refining the lifting mechanism.
Connecting Various Sensors to the Arduino Uno R4
- Gathering Required Components:
- DHT22 Sensor: For monitoring temperature and humidity.
- Ultrasonic Sensor: To detect the distance between the elevator and the floors.
- Soil Moisture Sensor: To check the moisture level in the planting pots.
- Light Sensor (LDR): To monitor ambient light levels.
- Motion Sensor (PIR): To detect movement around the garden.
- Gas Sensor ( MQ-7): To monitor gas levels (such as methane and propane) in the environment.
- LCD Display (20x4): To show real-time data from the sensors.
- Additionally, we ensured we had enough connection wires and jumper cables for all the connections.
- Preparing the Arduino Uno R4:
- We placed the Arduino Uno R4 on a stable surface, ensuring easy access to its pins for wiring.
- Connecting the DHT22 Sensor:
- VCC Pin: Connected to the 5V pin on the Arduino.
- GND Pin: Connected to the GND pin on the Arduino.
- DATA Pin: Connected to Digital Pin 2 on the Arduino.
- We made sure the connections were secure to prevent any disconnections during operation.
- Connecting the Ultrasonic Sensor:
- VCC Pin: Connected to the 5V pin on the Arduino.
- GND Pin: Connected to the GND pin on the Arduino.
- Trig Pin: Connected to Digital Pin 3 on the Arduino.
- Echo Pin: Connected to Digital Pin 4 on the Arduino.
- We ensured the ultrasonic sensor was placed in a position where it could accurately detect the elevator’s height.
- Connecting the Soil Moisture Sensor:
- VCC Pin: Connected to the 5V pin on the Arduino.
- GND Pin: Connected to the GND pin on the Arduino.
- Analog Output Pin: Connected to Analog Pin A0 on the Arduino.
- This sensor was placed in the soil to provide real-time moisture readings.
- Connecting the Light Sensor (LDR):
- One Terminal: Connected to 5V.
- Other Terminal: Connected to Analog Pin A1 and also connected to a resistor that goes to GND.
- This configuration allowed us to measure the light intensity in the garden.
- Connecting the Motion Sensor (PIR):
- VCC Pin: Connected to the 5V pin on the Arduino.
- GND Pin: Connected to the GND pin on the Arduino.
- OUT Pin: Connected to Digital Pin 5 on the Arduino.
- The motion sensor was positioned to monitor the area around the garden for any movement.
- Connecting the Gas Sensor:
- VCC Pin: Connected to the 5V pin on the Arduino.
- GND Pin: Connected to the GND pin on the Arduino.
- Analog Output Pin: Connected to Analog Pin A2 on the Arduino.
- The gas sensor was installed in a location where it could detect any harmful gases that might affect the plants or environment.
9.Connecting the LCD Display with I2C Module:
- VCC Pin: Connected to the 5V pin on the Arduino.
- GND Pin: Connected to the GND pin on the Arduino.
- SDA Pin: Connected to Analog Pin A4 on the Arduino.
- SCL Pin: Connected to Analog Pin A5 on the Arduino.
10.Checking Connections:
- After all sensors were connected, we double-checked each connection to ensure there were no loose wires or incorrect placements.
- We labeled the wires if necessary to keep track of connections for troubleshooting in the future.
11.Testing the Sensors:
- We uploaded a basic sketch to the Arduino to read values from each sensor. This allowed us to verify that each sensor was functioning correctly and providing accurate data.
With all sensors successfully connected to the Arduino Uno R4, we enabled our Smart Urban Garden to collect essential environmental data, facilitating better decision-making for plant care and resource management!
Setting Up Arduino IoT Cloud for IoT Monitoring
- Creating an Arduino IoT Cloud Account:
- We started by visiting the Arduino IoT Cloud website and creating an account if we didn’t already have one. This involved providing a valid email address and setting up a password.
- Creating a New Thing:
- Once logged in, we clicked on “Create a Thing” to set up a new project. We named it “Smart Urban Garden” for easy identification.
- Adding Variables:
- In the Thing’s dashboard, we defined the variables we wanted to monitor:
- Temperature: For readings from the DHT22 sensor.
- Humidity: For readings from the DHT22 sensor.
- Soil Moisture: For readings from the soil moisture sensor.
- Light Intensity: For readings from the light sensor (LDR).
- Grow Light Status: To monitor whether the grow light is on or off.
- Sun Intensity: For readings from the sensor measuring sunlight.
- Pump Status: To indicate whether the irrigation pump is active or not.
We ensured the appropriate data types were set for each variable, such as float for temperature, humidity, soil moisture, light intensity, and sun intensity, and boolean for grow light status and pump status.
- Generating the Arduino Cloud Sketch:
- After adding the variables, things properties code were generated which provided us with a basic sketch that included necessary library imports and setup functions for our defined variables.
- Connecting the Arduino Uno R4:
- We opened the generated sketch .
- We installed any required libraries as prompted , ensuring compatibility with the Arduino IoT Cloud.
- Uploading the Code:
- We replaced the placeholder values in the sketch with our specific Wi-Fi credentials (SSID and password) to allow the Arduino to connect to the internet.
- We uploaded the code to the Arduino Uno R4. Once uploaded, the board connected to the Arduino IoT Cloud.
- Monitoring Data:
- After successfully uploading the code, we returned to the Arduino IoT Cloud dashboard.
- We opened the “Monitor” section for our Thing to view real-time data from the connected sensors. We could see the readings updating as the sensors detected changes in their respective environments.
- Creating a Dashboard:
- We proceeded to create a custom dashboard to visualize the sensor data. We added widgets for each variable, such as graphs for temperature, humidity, soil moisture, light intensity, and sun intensity, as well as status indicators for the grow light and pump.
- This dashboard allowed us to monitor the health and status of our Smart Urban Garden from anywhere using our mobile devices or computers.
With the Arduino IoT Cloud set up, we enabled seamless remote monitoring of our urban garden, allowing for timely interventions based on real-time data and enhancing our overall gardening efficiency!
Conclusion
The Smart Urban Garden project successfully combines innovative design with technology to address the challenges of urban food production. By utilizing Arduino IoT Cloud, we have created a robust monitoring system that tracks essential environmental parameters, including temperature, humidity, soil moisture, light intensity, and sun intensity. The integration of sensors and a user-friendly dashboard allows us to make informed decisions and optimize growing conditions for our crops.
Furthermore, the project's vertical farming approach not only maximizes space but also contributes to sustainable practices in urban agriculture. This initiative not only empowers urban residents to engage in food cultivation but also promotes environmental consciousness by demonstrating the potential of technology in agriculture. Through this project, we hope to inspire others to explore sustainable solutions and contribute to a healthier, greener future for our communities.