Built a home automation system using raspberry Pi pico w.
Size: 20.71 MB
Language: en
Added: Jul 23, 2024
Slides: 13 pages
Slide Content
Introducing the Cortex Hive Cortex Hive introduces a comprehensive home automation system that leverages ARM technology to offer seamless control and management of various household functions.
Problem Statement Objective Automating homes Added security Convenience CortexHive app access Lack of security Inefficient usage of energy Lack of convenience
Authors Notable Publications Diane J. Cook "Smart Environments: Technology, Protocols, and Applications" (2016) <br> - "Smart Home Systems: Design, Analysis, and Applications" (2015) Amir Ali Forghani "Security in Smart Homes: A Review of Existing Technologies" (2017) <br> - "Smart Homes for the Elderly: A Literature Review and Identification of User-Centered Design Factors" (2019) Igor Bisio "Secure Smart Homes: Opportunities and Challenges" (2018) <br> - "Personal Data Protection in Smart Homes" (2019) Juan Carlos Augusto " Human-Centric Smart Homes: A Review" (2014) <br> - "A Review on Sensor-Based Solutions for Smart Homes in Health Care" (2019) Literature Survey
ZZZZZZZZ Flow Diagram Z RASBERRY PI PICO W LDR Light 1 Light 2 DHT11 Humidifier Fan Web Cortex hive APP Unlock door Input fingerprint Manual Mode Auto mode Humidifier Switch Fan switch Light 2 Switch Light 1 switch
import machine import time import dht # Pin Definitions pir_pin = machine.Pin (16, machine.Pin.IN) dht_pin = machine.Pin (15) ldr_pin = machine.ADC (28) relay_pin1 = machine.Pin (17, machine.Pin.OUT ) relay_pin2 = machine.Pin (18, machine.Pin.OUT ) relay_pin3 = machine.Pin (19, machine.Pin.OUT ) motor_in1 = machine.Pin (20, machine.Pin.OUT ) motor_in2 = machine.Pin (21, machine.Pin.OUT ) motor_ena = machine.PWM ( machine.Pin (22)) # Initialize DHT11 dht_sensor = dht.DHT11( dht_pin ) # Set PWM frequency for motor driver motor_ena.freq (1000) # Threshold values temperature_threshold = 25 # Example threshold for fan humidity_threshold = 60 # Example threshold for humidifier ldr_threshold = 20000 # Example threshold for light control def control_devices (): try: Code dht_sensor.measure () temperature = dht_sensor.temperature () humidity = dht_sensor.humidity () print("Temperature:", temperature, "C") print("Humidity:", humidity, "%") # Control fan based on temperature if temperature > temperature_threshold : motor_in1.value(1) motor_in2.value(0) motor_ena.duty_u16(32768) # Set motor speed (50% duty cycle) else: motor_in1.value(0) motor_in2.value(0) motor_ena.duty_u16(0) # Control humidifier based on humidity if humidity < humidity_threshold : relay_pin3.value(1) else: relay_pin3.value(0) # Read LDR value ldr_value = ldr_pin.read_u16() print("LDR Value:", ldr_value )
# Control lights based on LDR value if ldr_value < ldr_threshold : relay_pin1.value(1) relay_pin2.value(1) else: relay_pin1.value(0) relay_pin2.value(0) except Exception as e: print("Error reading sensors:", e) while True: if pir_pin.value () == 1: print("Motion detected!") control_devices () else: print("No motion detected.") # Ensure all devices are turned off when no motion is detected relay_pin1.value(0) relay_pin2.value(0) relay_pin3.value(0) motor_in1.value(0) motor_in2.value(0) motor_ena.duty_u16(0) time.sleep (1)
Motor driver And LCD Display chip features built-in protection diodes Dual H bridge motor drive IC LCD display to display the conditions and outputs Smartphone Control of devices through the app Sensors DHT11 Sensor LDR Sensor Proximity Sensor Rasberry Pi Pico features the RP2040 microcontroller chip Highly versatile, supports various programming languages Low cost and small size Hardware tools
Motor driver And LCD Display chip features built-in protection diodes Dual H bridge motor drive IC LCD display to display the conditions and outputs Smartphone Control of devices through the app Sensors DHT11 Sensor LDR Sensor Proximity Sensor Rasberry Pi Pico features the RP2040 microcontroller chip Highly versatile, supports various programming languages Low cost and small size
Work done so far: Analyzation of the components and Implementation of the hardware components Work to be done: Development of the app that compliments the hardware setup Build a custom PCB
Conclusion Culminating our hardware setup phase, our next objective encompasses the development of a dedicated application to complement our project
April 2024– Researching for topics May 2024 – Preparing synopsis and presentation for selection June 2024– Prototype development and presentation July 2024– Developing a fully functioning mode https://github.com/mmphego/smarthome-rpi/blob/devel/Thesis.pdf Flow Line Reference