Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

Projetos de Automação Residencial

Home Automation Projects

Introduction: Home automation is becoming increasingly popular as it offers convenience, energy efficiency, and improved security. In this article, we will explore the world of home automation projects using Arduino. We will provide examples of codes and a list of components required for each project.

Project: Automated Lights Control System Objective: To create a system that automatically controls the lights in a room based on occupancy. Functionality:

  • Detect occupancy using a motion sensor.
  • Turn on the lights when someone enters the room.
  • Turn off the lights when the room is vacant for a certain period of time.
  • Provide manual control through a physical switch. Relevant Information: This project can be expanded to control multiple rooms and integrate with other home automation systems.

List of Components:

  1. Arduino Uno - 1 unit (https://www.arduino.cc/en/Main/ArduinoBoardUno)
  2. PIR Motion Sensor - 1 unit (https://www.sparkfun.com/products/13285)
  3. Relay Module - 1 unit (https://www.adafruit.com/product/3191)
  4. Push Button Switch - 1 unit (https://www.sparkfun.com/products/97)
  5. Jumper Wires - As required
  6. Breadboard - 1 unit (https://www.sparkfun.com/products/12615)
  7. LED Bulb - 1 unit (https://www.sparkfun.com/products/12060)
  8. 220V AC to 5V DC Power Supply - 1 unit (https://www.sparkfun.com/products/12889)

Examples: Example 1: Motion Sensor Activation Code:

int motionPin = 2; // Motion sensor connected to digital pin 2 int relayPin = 3; // Relay module connected to digital pin 3

void setup() { pinMode(motionPin, INPUT); pinMode(relayPin, OUTPUT); }

void loop() { if (digitalRead(motionPin) == HIGH) { digitalWrite(relayPin, HIGH); // Turn on the lights } else { digitalWrite(relayPin, LOW); // Turn off the lights } }

Example 2: Manual Control Code:

int motionPin = 2; // Motion sensor connected to digital pin 2 int relayPin = 3; // Relay module connected to digital pin 3 int switchPin = 4; // Push button switch connected to digital pin 4

void setup() { pinMode(motionPin, INPUT); pinMode(relayPin, OUTPUT); pinMode(switchPin, INPUT_PULLUP); }

void loop() { if (digitalRead(motionPin) == HIGH || digitalRead(switchPin) == LOW) { digitalWrite(relayPin, HIGH); // Turn on the lights } else { digitalWrite(relayPin, LOW); // Turn off the lights } }

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.