Maintaining healthy plants is crucial for the oxygen factories aboard the Nebula Raider. To ensure that plants receive the optimal amount of water, you are tasked with building an automated watering system. This system will monitor water levels and automatically water the plants when needed, ensuring their health and continuous oxygen production.
Components Needed:
- Raspberry Pi Pico WH Microcontroller
- Water Level Sensor
- SRD-05VDC-SL-C Power Relay
- Water pump (or a small motor to simulate a pump)
- LEDs (Green for sufficient water level, Red for low water level)
- Resistors
- Breadboard
- Jumper wires
Instructions:
Set Up the Circuit:
- Connect the Water Level Sensor to an analog input pin on the Raspberry Pi Pico (e.g., GP26).
- Connect the relay module to a GPIO pin on the Raspberry Pi Pico (e.g., GP2) to control the water pump.
- Connect the water pump to the relay module, ensuring the relay can safely handle the voltage and current required by the pump.
- 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.
Write the Code:
Open your coding environment and write the following Python code to create the automated watering system:
Test the System:
- Upload the code to the Raspberry Pi Pico and run it.
- Test the water level sensor by inserting it into different water levels (low, medium, high) and observing the readings.
- Ensure the relay correctly turns the water pump on and off based on the water levels.
- Verify that the LEDs provide accurate feedback on the water level conditions.
Learning Outcomes:
- Sensor Integration: Learn how to connect and use a water level sensor with the Raspberry Pi Pico to monitor water conditions.
- Automated Control: Understand how to automate the control of a water pump using a relay and water level sensor.
- Microcontroller Programming: Develop skills in writing code to integrate sensors and control output devices.
Extension Ideas:
- Adjustable Threshold: Add buttons to allow the user to adjust the water level threshold for watering.
- Data Logging: Implement data logging to record water levels and watering activity over time.
- Remote Monitoring: Create a web interface to remotely monitor water levels and control the watering system.
By completing this project, you will have built an automated watering system that ensures plants receive the optimal amount of water for healthy growth. This system will help maintain the oxygen factories inside the Nebula Raider, contributing to the crew’s well-being.