Auto Day/Night Window Blind

Auto Day/Night Window Blind © CC BY

With this project, I made an auto turn on or off blind mechanism to my triangle window with the light sensor.

  • 499 views
  • 0 comments
  • 4 respects

Components and supplies

About this project

I have a specific triangle window in my room. That window form make it diffucult to order a curtain from a manufacturer. So I decided to make my own curtain or window blind. Project basically work like this: at the day blind automatically opened by the servos and at the night blind automatically closed by servos. I used these companents with my project:

1xArduino Nano

1xNano Sensor Shield

2xMicro Servos

1x5mm LDR

1x110K Ohm Resistor

1 sheet of cardboard

And jumper cables.

Code

Automatic Window BlindArduino
#include <Servo.h>
Servo myservo1,myservo2;  // create servo objects to control a servos

int potpin = A0;  // analog pin used to connect the LDR
int val;    // variable to read the value from the analog pin

void setup() {
myservo1.attach(6);  // attaches the servo on pin 6-9 to the servos object
myservo2.attach(9);
Serial.begin(9600);
delay(100);//
}

void loop() {
  val = analogRead(potpin);            // reads the value of the LDR (value between 0 and 1023)
  if (val > 750){      // meausure it to sense day or night
  myservo1.write(90); // sets the servo blind opened position 
  myservo2.write(90);// sets the servo  blind opened position 
  Serial.println("Opened");
  Serial.println(val);
  }
  else{
  myservo1.write(0);  // sets the servo blind closed position 
  myservo2.write(180); // sets the servo blind closed position 
  Serial.println("Closed");
  Serial.println(val);
  }
  delay(2000);  // waits for 2 seconds. If it is opened or closed you can cut off power
}

Schematics

Automatic Window Blind
Window blind diagram xn3y61vrfg

Comments

Similar projects you might like

Talking Smart Glass for the Blind

Project tutorial by Amal Shajan

  • 10,413 views
  • 19 comments
  • 25 respects

Auto Battery Charger Switch

Project showcase by John Wood

  • 6,895 views
  • 6 comments
  • 21 respects

Smart Blind Assistant

Project in progress by Chandru S

  • 4,805 views
  • 1 comment
  • 8 respects

Simple Auto Fan

Project showcase by Ömer Beden

  • 8,977 views
  • 0 comments
  • 6 respects

Publish Your Arduino Data to the Cloud

by Jaume Miralles

  • 7,201 views
  • 13 comments
  • 50 respects
Add projectSign up / Login