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

  1. Open the Bluetooth application
  2. Press 1 to open the curtain
  3. 3 to close the curtain on the Bluetooth application

/media/uploads/npatel338/nn2.jpg

Components

  • Mbed NXP LPC1768
  • DC motors
  • L293D dual H-bridge driver
  • Adafruit Bluefruit LE UART - BLE
  • IR sensor

Hookup Guide

Setup

/media/uploads/npatel338/nn3.gif

Schematic

/media/uploads/npatel338/nn4.gif

Pinouts

mbedH-bridgeBLEDC MotorsIR Sensor
5V=VU
Gnd = Gnd
p 18AIN2
p 20AIN1
p 21PWMA
VMot= 5V
VoutVCC
p 27tx
p 28rx
Gnd = Gnd
CTS = Gnd
AO2Gnd
AO1Vin
p17AnalogOut
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.