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:
Name | Quantity | Component |
---|---|---|
U1 | 1 | Arduino Uno R3 |
SERVO2 | 1 | Positional Micro Servo |
R1 R2 | 2 | 1 kΩ Resistor |
R3 | 1 | Photoresistor |
S1 | 1 | Pushbutton |
- 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.