To ensure the Nebula Raider’s oxygen factories operate efficiently, it’s essential to monitor the health of the plants that produce oxygen. As a cadet, you are tasked with setting up a plant
health monitor. This system will track important environmental factors such as soil moisture, temperature, and humidity, ensuring the plants remain healthy and continue to supply the necessary oxygen for the crew.
Components Needed:
- Raspberry Pi Pico WH Microcontroller
- DHT11 Temperature and Humidity Sensor
- Water Level Sensor
- LCD1602 IIC/I2C Blue Backlight Display
- LEDs (Green for healthy, Red for alert)
- Resistors
- Breadboard
- Jumper wires
Instructions:
Set Up the Circuit:
- Connect the DHT11 Temperature and Humidity Sensor to the Raspberry Pi Pico (Data pin to GP2).
- Connect the Water Level Sensor to an analog input pin on the Raspberry Pi Pico (e.g., GP26).
- Connect the LCD1602 display to the Raspberry Pi Pico using the I2C interface (SDA to GP0, SCL to GP1).
- Connect the Green LED to a GPIO pin on the Raspberry Pi Pico (e.g., GP3) with an appropriate resistor.
- Connect the Red LED to a GPIO pin on the Raspberry Pi Pico (e.g., GP4) with an appropriate resistor.
- Use jumper wires to make all necessary connections on the breadboard, ensuring a secure and organized setup.
Circuit Diagram
Write the Code:
Open your coding environment and write the following Python code to create the Plant Health Monitor.
Test the System:
- Upload the code to the Raspberry Pi Pico and run it.
- Test the DHT11 sensor by measuring temperature and humidity in different conditions.
- Test the water level sensor by inserting it into different water levels (low, medium, high) and observing the readings.
- Ensure the LEDs provide accurate feedback based on the environmental conditions.
Learning Outcomes:
- Sensor Integration: Learn how to connect and use temperature, humidity, and water level sensors with the Raspberry Pi Pico.
- Environmental Monitoring: Understand how to monitor environmental conditions to ensure plant health.
- Microcontroller Programming: Develop skills in writing code to integrate multiple sensors and display data.
Extension Ideas:
- Data Logging: Implement data logging to record environmental conditions over time for further analysis.
- Automatic Watering: Add an automatic watering system that activates when water level is low.
- Remote Monitoring: Create a web interface to remotely monitor the plant health and receive alerts.