Project showcase
Automatic Home Oficce

Automatic Home Oficce © GPL3+

Fan and Humidifier Control for Palms using arduino uno and relay shield.

  • 418 views
  • 0 comments
  • 0 respects

Components and supplies

About this project

My project is about automatic home office because the people in around world must stay home. My project is very simple using a shield relay, sound sensor e arduino uno, but very useful with three palms turn on humidifier and two palms turn on fan.

Code

Automatic Home officeC/C++
#define sensor 2
#define ventilador 5
#define umidificador 6

int palmas = 0;
boolean temPalmas = true;
boolean contaPalma = true;
unsigned long tempoentrepalmas = 0;

void setup() {
  pinMode(sensor, INPUT);
  pinMode(ventilador, OUTPUT);
  pinMode(umidificador, OUTPUT);
  
  digitalWrite(ventilador, HIGH);
  digitalWrite(umidificador,HIGH);
}

void loop() {
 temPalmas = digitalRead(sensor);
 
 if(!temPalmas){
  if(contaPalma){
    palmas++;
    tempoentrepalmas = millis();
    contaPalma = false;
  }
  else{
    if(millis() - tempoentrepalmas > 200){
      contaPalma = true;
    }
  }
 }

 if(millis() - tempoentrepalmas > 500){
  switch(palmas){
    case 2:
    digitalWrite(ventilador, !digitalRead(ventilador));
    break;

    case 3:
    digitalWrite(umidificador,!digitalRead(umidificador));
    break;
  }
  palmas = 0;
 }
}

Custom parts and enclosures

Layout
Project Layout in CAD
automatic_home_office_eBYBsOJ07b.dwg

Schematics

Layout project
The lamps represent fan e humidifier
Automatic home office bb or7pngrtc3
Layout
automatic_home_office_QntIDbb2qU.fzz

Comments

Similar projects you might like

Arduino-Based Automatic Water Tap Using IR Sensor

Project tutorial by Team Creatjet3D R&D Team

  • 22,237 views
  • 8 comments
  • 27 respects

Automatic Gesture Controlled Table Lamp for Study

Project showcase by ashraf_minhaj

  • 3,270 views
  • 1 comment
  • 6 respects

Gesture / Motion Controlled Automatic Appliances

Project tutorial by ashraf_minhaj

  • 4,367 views
  • 0 comments
  • 18 respects

Automatic Temperature Based Fan Control (for Media Cabinets)

Project tutorial by Vess Bakalov

  • 9,568 views
  • 4 comments
  • 29 respects

Automatic Train Control

Project tutorial by Steve Massikker

  • 8,261 views
  • 5 comments
  • 22 respects

Automatic Shirt Folding Machine

Project showcase by typalowski

  • 6,540 views
  • 3 comments
  • 25 respects
Add projectSign up / Login