Introduction: Smart Curtains
It is a common routine in almost all the households to keep the curtains wide open during the daytime and close by evening. The monotonous nature of this work complemented by window curtains at ‘hard to access’ areas, make it difficult for the people to perform this task. Smart curtain’s primary objective is to eliminate this problem. Smart Curtain automatically opens or closes depending upon the external lighting. An additional functionality of controlling the smart curtains over the phone via Bluetooth, also gives a manual control to the user.
Step 1: Components Required:
- Intel Galileo x 1
- Power cord for Intel Galileo x 1
- USB cable x1
- LDR x 1
- 220ohm resistor x 1
- 8.2Kohm resistor x 1
- Bluetooth Module (HC-05) x 1
- 9V Battery x 1
- 9V Battery Adapter x 1
- DC Motor x 1
- Motor Driver x 1
- Mini - Breadboard x 1
- Connecting Wires (Male to Male) x 40
- Connecting Wires (Male to Female) x 40
Step 2: Interfacing the LDR and 220ohm Resistor With Intel Galileo
LDR is expanded as Light Dependent Resistor. Depending upon the intensity of light projected to the surface of an LDR, it changes its resistance value. The value of resistance changes from few ohms under sufficient light condition to few Mega Ohms under dark conditions.
This fixed resistor is used to build a voltage divider circuit. Using the correct resistor aids in obtaining the required sensitivity needed for this project.
- Connect an M-M Jumper wire from 5V pin of the Intel Galileo to the one the vertical lines of the Mini Breadboard.
- Insert one pin of the LDR in the same vertical line where the 5V pin is connected and the other end of the LDR into any other vertical line of the breadboard.
- Insert one pin of the 8.2 Kohm resistor to the same vertical line as that of the other pin of the LDR.
- Insert the other pin of the resistor into any other vertical line.
- Connect an M-M Jumper wire from the other pin of the resistor to the GND of the Intel Galileo.
- Connect A0 pin of the Intel Galileo to the junction of the LDR pin and 220 ohms resistor pin.
Step 3: Interfacing HC-05 Bluetooth Module With Intel Galileo
HC-05 Bluetooth Module:
It is a wireless communication module that transmits data serially. Out of the six pins that comes with general break out board, only 4 pins are used. VCC pin of HC-05 is connected to +5V while GND pin is connected to GND of the microcontroller. RX pin refers to receiver and TX pin refers to transmitter. These pins are used for communication between the Bluetooth and the microcontroller.
Note: HC-06 Bluetooth modules can also be used for this project instead of HC-05.
- Place the HC-05 on the Breadboard.
- Connect an M-M jumper wire from the VCC pin of the HC-05 to the vertical column where +5V is supplied.
- Connect an M-M jumper wire from the GND pin of the HC-05 to the GND pin of Intel Galileo.
- Connect an M-M jumper wire from the TX pin of the HC-05 to pin 0 of the Intel Galileo.
- Connect an M-M jumper wire from the RX pin of the HC-05 to pin 1 of the Intel Galileo.
Step 4: Interfacing Motor Driver (L293D) With Intel Galileo
A motor driver is a module that helps in the operation of certain motors at variable speeds by providing a separate power source other than that from the microcontroller. This protects the microcontroller/ microprocessor from the current surges initiated by the motor. This module consists of a common 3 Male headers which corresponds to +9V/+12V, GND and +5V. The +9V or +12V supply is used to power the motor. +5V is used to operate the L293D IC. This motor driver module can handle a maximum of 2 motors. For each motor, 2 pins are used to receive signals from the microcontroller/microprocessor and 2 pins are used to connect the DC motor.
- Connect an M-F jumper wire from pin 3 of Intel Galileo to ‘M1.a’ pin of the motor driver.
- Connect an M-F jumper wire from pin 5 of Intel Galileo to ‘M1.b’ pin of the motor driver.
- Connect an M-F jumper wire from GND pin of Intel Galileo to GND pin of the motor driver.
- Connect an M-F jumper wire from +5V of the motor driver to the vertical column where +5V supply is present.
Step 5: Interfacing DC Motor to Motor Driver With Intel Galileo
This is a low rpm DC motor. These motors contain two wires which enables the motor to rotate in either in clockwise or anti - clockwise direction.
- Connect the motor to the motor driver by inserting both of the motor wires into the motor driver module at the specified location.
Step 6: Connecting 9V Battery
The 9V Battery is used to power up the DC motor used in the project
9V Battery Adapter
The 9V Battery adapter aids in inserting the power pins on the breadboard without any hassles.
- Attach the 9V battery adapter with the 9V battery.
- Connect the -ve of the battery to the vertical column where 220ohms resistor is connected to the GND of the Intel Galileo.
- Connect the +ve of the battery to any free vertical column.
- Connect an M-F jumper wire from the same vertical column back to the +9V/+12V pin of the motor driver module.
Note: While using different power source, make sure a common ground is achieved. Otherwise, power issues may occur which may cause the device to fail.
Step 7: Upload the Arduino Sketch
Step 8: Install the Android App
Download and install the following Android App and follow the instructions
- Open the Bluetooth Settings and pair your phone with HC-05. (Passcode is '1234')
- Open the App.
- Tap the 'Connect' button and choose 'HC-05'. Now, it, should show as 'Connected'.
- Now, you can control the curtain from your phone!