SERVO PROJECTS

Automatic Windows Blinds Controller with Arduino

The Smart Blinds Controller with Arduino project combines simplicity and functionality to create an automated blinds control system. Utilizing an Arduino and a servo motor, this project offers an efficient solution for opening and closing blinds.

A button and a photocell sensor provide user input and light detection, respectively. The servo motor, connected to the blinds mechanism, responds to the Arduino’s commands.

In the circuit, the servo motor is attached to pin 9, while the button is connected to pin 2, and the photocell sensor is connected to analog pin A0.

The Arduino reads the photocell value, mapping it to control the servo’s rotation angle.

The button allows manual control, and the system autonomously adjusts the blinds based on ambient light conditions.

Component List:

NameQuantityComponent
U11Arduino Uno R3
SERVO21Positional Micro Servo
R1
R2
21 kΩ Resistor
R31Photoresistor
S11Pushbutton
  • Connect the servo motor to pin 9 on the Arduino.
  • Connect the button to pin 2.
  • Connect the photocell sensor to analog pin A0.
  • Ensure proper power and ground connections for all components.

Arduino codes:

#include <Servo.h>
Servo myservo;
int button = 2;
int val;
int photocell;
int press;
void setup() {
myservo.attach(9);
pinMode(button, INPUT);
Serial.begin(9600);
}
void loop() {
photocell = analogRead(A0);
photocell = map(photocell, 0, 1023, 0, 180);
val = digitalRead(button);
if (val == 1) {
openBlinds();
}
if (val == 0) {
if (photocell > 100) {
openBlinds();
} else {
closeBlinds();
}
}
if (press == 1) {
openBlinds();
}
if (press == 0) {
closeBlinds();
}
}
void openBlinds() {
myservo.write(180);
press = 1;
Serial.println("Blinds opened");
delay(10);
}
void closeBlinds() {
myservo.write(0);
press = 0;
Serial.println("Blinds closed");
delay(10);
}

This Smart Blinds Controller project provides an accessible introduction to home automation. Integrating a servo motor with user input and environmental sensing, it demonstrates a basic yet effective smart solution for controlling blinds.

The project’s flexibility allows users to expand and customize features, making it an ideal starting point for beginners exploring Arduino-based automation projects.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button