BLE Enabled Security Lighting
Published on February 10, 2016
By Shewan Yitayew, Product Development Engineering Manager
The connected home is just one reality that the Internet of Things (IoT) brings to the table. Bluetooth Low Energy (BLE) is one of the fastest growing technologies today. Since coming to the market just a few years ago, it has quickly found a place in nearly all mobile devices. Connected home security has been a popular topic lately, so I thought it would be fun to experiment with BLE beacons and security lighting.
BLE Enabled Security Light
The above disassembly shows the main parts of the device.
I recently bought three inexpensive floodlights with a built in PIR sensor to fit around the house, one for the front drive, one for the back garden and the third one for the garage.
I’ve often wondered at night when I’m at home with the curtains closed, what triggered the floodlight to go on. I thought, “Wouldn’t it be cool to get a popup notification on my phone to tell me that the garden light just came on?” I can choose to ignore the notification or have a peek through the curtain to see what caused the light to come on.
I must admit, DIY is not my strongest point (I better be honest in case my wife reads this). In order to get the job done, I had to make it fun.
How Does the Security Light Work?
A simplified block diagram of the system is shown above.
When a movement is detected the PIR switch is closed and the mains voltage is delivered to the LED driver’s input. The LED driver converts the mains input to a 28V DC voltage to drive the LED light.
Since this 28V output is only available when the light is on, it was relatively straightforward to implement a BLE notification using Laird’s BL600.
First you need to regulate the 28V output from the inverter down to 3.3V so you can use it to power a BL600 board. In this example I used a small Buck converter module, which I picked up on eBay for $1.20. It has adjustable output and is designed to handle an input voltage up to 40V. You connect the positive wire at output of the LED driver to the “INPUT+” on the buck converter. Next, connect the negative wire in the same way. Before connecting the output of the buck converter with the BL600 board, you must check that the output voltage is set at 3.3V. If this is not the case, it can be adjusted using the pot (the tall blue component shown below). Connect Autorun and SIO7 signals as shown below; this will cause the module to wake up in OTA mode allowing you to download the necessary smartBASIC application from an Android or iOS device over the air.
When the PIR sensor detects a movement, the switch is closed and power is delivered to the BL600 module. The above configuration insures the module will wake up in OTA mode.
Using the Laird OTA application on your mobile phone (part of the Laird Tool Kit), discover and connect to the module. Browse and select your pre compiled (in this example $autorun$.iBeacon.uwc) smartBASIC application and click Upload.
Once the download is complete, remove the green wire from SIO_7 and reset the module. The module is now ready.
The screenshot below shows the notification on an android phone when the light is ON – must be my neighbor’s cat again.