Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 168 - Toucpad robotics C11
P. 168

    21 st   #Coding & Computational Thinking
                          project 3                                                  Century   # Experiential learning
                                                                                      Skills
                                                      The Automated Greenhouse System
                      Objective: Build a simplified, automated greenhouse system that can monitor environmental conditions
                      (temperature, humidity, soil moisture) and perform an action (e.g., turn on a water pump) based on the readings.
                      Steps of the Solution:
                      1.  Project Planning & Design (Project Management):
                             Define the Scope: The system will monitor three parameters and control a single actuator.
                             l
                             Component Selection:
                             l
                             §   Brain: A microcontroller (like a Raspberry Pi Pico or an Arduino Uno) is ideal for this.
                                 Senses: Choose a temperature sensor, a humidity sensor, and a soil moisture sensor.
                             §
                             §   Muscles: A simple water pump and a relay module to switch the pump on and off.
                             §   Power: A suitable power adapter and an external power source for the pump.
                             Structure: A small, transparent container or a wooden frame can serve as the “greenhouse.”
                             l
                      2.  Hardware Assembly & Wiring:
                             Connect Sensors: Wire all three sensors to the microcontroller's analog and digital input pins.
                             l
                             Connect Actuator: Connect the water pump to the relay module, and the relay module to a digital output
                             l
                             pin on the microcontroller. The relay acts as a safety switch, allowing the microcontroller to control the
                             high-power pump with a low-power signal.
                      3.  Programming & Control (Fundamentals, Logic, Systems):
                             Sensor Reading: Write code to read the values from each sensor. The soil moisture sensor will provide an analog
                            l
                             reading, which will be converted to a digital number by the microcontroller's Analog-to-Digital Converter.
                             Decision-Making Algorithm: Use a combination of Boolean operators to create the control logic.
                             l
                             Pseudocode:
                             l
                         LOOP forever:
                         read soil_moisture_level
                         read temperature_level
                         read humidity_level
                             IF soil_moisture_level IS below_threshold AND temperature_level IS above_threshold
                             THEN turn_on_pump
                             ELSE
                             turn_off_pump
                         END IF
                         END LOOP
                             Time-Based Control: Use the microcontroller's timers to schedule sensor readings at regular intervals
                             l
                             (e.g., every minute) to conserve power and avoid unnecessary checks.
                      4.  Debugging & Testing (Ensuring Performance):
                             Unit Testing: Test each sensor to ensure it provides accurate readings. Test the relay module to ensure it
                             l
                             can switch the pump on and off correctly.
                             System Testing: Place the system in the greenhouse and monitor its performance. Pour some water and
                             l
                             check if the sensor reading changes. Allow the soil to dry out and verify that the pump turns on and waters
                             the plant automatically.
                           These projects will not only solidify a student's understanding of robotics but also demonstrate the practical
                         applications of the concepts we have covered, from the ground up.

                  166
                  Touchpad Robotics - XI

| 163 164 165 166 167 168 169 170 171 172 173 |