So, you've probably seen curtains that open themselves without you having to get out of bed and doing it yourself and you probably thought it was some luxury item that would set you back hundreds of dollars, so i am here to show you how to make your own motorized remote controlled curtains/blinds for under 100 USD
Lets get started.
Video version of this tutorial:
PARTS REQUIRED:
Arduino UNO3: www.amazon.com/ATmega328P-Development-Compatible-Develope-Microcontroller/dp/B07CQHBJ51/ref=sr_1_3?ie=UTF8&qid=1538769649&sr=8-3&keywords=arduino+uno
360 digital servo (2): www.amazon.com/PDI-6221MG-Torque-Digital-Standard-Degree/dp/B07D4HJ3QC/ref=sr_1_10?ie=UTF8&qid=1538769714&sr=8-10&keywords=digital+360+servo
Breadboard: www.amazon.com/DEYUE-Solderless-Prototype-Breadboard-breadboard/dp/B07DMHVC3R/ref=sr_1_3?ie=UTF8&qid=1538769786&sr=8-3&keywords=breadboard
jumpers and wire
PRINCIPLE OF THE DEVICE:
The main principle of this device is to have two servos controlled by a remote reel in a string tied to opposite side of each curtain
Note: While there is currently no way to close the curtains fully autonomous there is a reverse function that will unreel the string and allow you to close the curtains or just take the spool off the servo and untie it by hand (i plan to add a way to close fully autonomous in the future)
STEP 1:
Plug IR receiver into your breadboard and connect it to your arduino like so:
Signal pin (receiver) - Digital pin 2 (arduino)
Pover pin (receiver) - 5V pin (arduino)
- or GND pin (receiver) - GND pin (arduino)
STEP 2:
Plug in servos to a power source and into arduino:
I used a stripped down usb wire and a 5a adapter
Power pins + and - (servo 1 and 2) - matching lines on your breadboard
Signal pin (servo 1 and 2) - Pins 9 and 10 (arduino)
then using a jumper plug the line you used for negative (-) on your breadboard into GND pin on arduino
STEP 3:
Flash your arduino using this code:
//Copy IRremote to library folder
//To find the key codes for your remote control, upload this code to your Arduino and open the serial monitor (insert key codes after 0x)
#include <IRremote.h> //copy IRremote library to arduino libraries
#include <Servo.h>
#define plus 0x23123 //clockwise rotation button (replace this)
#define minus 0x41243 //rotation stop button (replace this)
#define back 0x12331 //counter clockwise rotation button (replace this)
int RECV_PIN = 2; //IR receiver pin
Servo myservo1;
Servo myservo2;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
myservo1.attach(9);
myservo2.attach(10);
myservo1.write(90);
myservo2.write(90);
}
void loop()
{
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
if (results.value == plus)
{
myservo1.write(180);
myservo2.write(180);
}
if (results.value == back)
{
myservo1.write(0);
myservo2.write(0);
}
if (results.value == minus)
{
myservo1.write(90);
myservo2.write(90);
}
}
delay(0); //General speed
}
P.s make sure to download IRremote library and copy it into your arduino IDE libraries folder!
STEP 4:
Tie a string to opposite end of each curtain and make something to reel it in:
I used two plastic lids and a cardboard tube hot-glued together but you can use anything shaped like a spool
STEP 5:
Now hang everything up and enjoy your autonomous curtains!