IoT -- Bluetooth Curtain Control
Project by Namrata Patel and Noah Harris
Description
Bluetooth application on the mobile device triggers the opening of the curtains. The IR sensor is used to detect when the curtains are fully opened. The Mbed resets after opening the curtain and it uses a global variable to save the number of clocks it took to open the curtains despite Mbed's soft reset. The IR sensor is interrupt driven, calling the motors to stop when the curtains pass it's position behind them. If the IR sensor is moved, the point at which the curtains are considered "open" will change.
Simple steps to open/close the curtain
- Open the Bluetooth application
- Press 1 to open the curtain
- 3 to close the curtain on the Bluetooth application
Components
- Mbed NXP LPC1768
- DC motors
- L293D dual H-bridge driver
- Adafruit Bluefruit LE UART - BLE
- IR sensor
Hookup Guide
Setup
Schematic
Pinouts
mbed | H-bridge | BLE | DC Motors | IR Sensor |
---|---|---|---|---|
5V=VU | ||||
Gnd = Gnd | ||||
p 18 | AIN2 | |||
p 20 | AIN1 | |||
p 21 | PWMA | |||
VMot= 5V | ||||
Vout | VCC | |||
p 27 | tx | |||
p 28 | rx | |||
Gnd = Gnd | ||||
CTS = Gnd | ||||
AO2 | Gnd | |||
AO1 | Vin | |||
p17 | AnalogOut | |||
5V |
Demo Video
- Link of the video
Demo Code
Import programBluetoothCurtainControl
This will open and close your curtains. Position of the IR sensor determines when the curtain is open.
Please log in to post comments.