After a thrilling escape from space pirates, the Nebula Raider had to be put into overdrive, causing the engine to run hotter than usual. To ensure the engine remains operational and avoid any damage due to overheating, you need to set up a temperature monitoring system. This system will keep track of the engine room temperature and alert the crew if it exceeds safe limits.
In this project, you will use the DHT11 Digital Temperature and Humidity Sensor and the HC-SR501 PIR Motion Sensor to monitor the ship’s environmental conditions. By diagnosing and repairing these sensors, you will ensure that the ship’s atmosphere remains stable and safe, allowing the crew to focus on their mission.
Components Needed:
DHT11 Digital Temperature and Humidity Sensor
HC-SR501 PIR Motion Sensor
Raspberry Pi Pico WH Microcontroller
Breadboard
Jumper wires
Instructions:
Set Up the Circuit:
Connect the Raspberry Pi Pico to the breadboard.
Attach the DHT11 sensor to the breadboard and connect it to the Raspberry Pi Pico (Data pin to GP2).
Connect the HC-SR501 PIR Motion Sensor to the breadboard and link it to the Raspberry Pi Pico (Output pin to GP3).
Use jumper wires to complete the circuit, ensuring all connections are secure.
Circuit Diagram
Write the Code:
Open your coding environment and write the following Python code to read and display data from the sensors.
Test the System:
Upload the code to the Raspberry Pi Pico and run it.
Observe the LCD1602 display showing the temperature and humidity levels, as well as detecting motion.
Learning Outcomes:
Sensor Integration: Learn how to connect and use the DHT11 and HC-SR501 sensors with the Raspberry Pi Pico.
Data Monitoring: Understand how to read and display environmental data in real-time.
Problem Solving: Develop troubleshooting skills to ensure the sensors provide accurate and reliable data.
By completing this project, you will ensure the Nebula Raider’s
environmental sensors are fully functional, maintaining a stable
atmosphere and enhancing the safety of the crew. Your work is crucial
for the ship’s operations as it navigates through hazardous space
regions.