Skip to the content.

IoT based Interactive Smart Light Solution

Project Overview

The main aim of this project is to control the LED, its ON/OFF operation and control its brightness. The BLE client handle the LED for both PWM (for intensity control) and ON/OFF along with the PIR sensor which would be handled locally. The Server would be responsible to handle the other sensors like Gesture Sensor, Ambient Light Sensor (ALS), and Proximity Sensor. The server would use indications to send these sensor values to the client based on which the client would control the LED. We plan to use custom characteristics to send indications for ALS and proximity sensor.

For detail information abour this project click here

Project Schedule

For scheduling information please click on this link

Features

  1. Server-client communication link should be Encrypted and follow Bluetooth Low Energy Principles.
  2. Server should display the Light Intensity output as Evening or Morning according to the Light Intensity in the room.
  3. As soon as the PIR sensor detects the presence in the room and light intensity output is Evening, LED on client should turn ON.
  4. If there is no movement in the room for 5 minutes the LED should be turned OFF.
  5. As soon as the Light Intensity output changes the LED should switch states given the PIR sensor still detects the presence in the room.
  6. If user swipes right, then the option to adjust brightness should appear on the LCD(server-side) and the brightness can be controlled using the distance measurement from proximity sensor.
  7. If user holds hand at a particular position before proximity sensor for a certain time(2.5 seconds), the current level should get lock and the client should retain the brightness level until changes again.

System Block Diagram

block_diagram

Hardware Components

The system contatins multiple hardware components on both sides i.e. server and client. The main device used as the core developement board is BlueGecko(EFR32). The board hosts the main microcontroller (EFR32) and the radio used for BLE. Each of the device is interfaces with various sensors to achive the functionality of the entire system. The details of the hardware interface are mentioned below:

Gesture Sensor (ZX Sensor)

The Sensor is configured to detect the hand motion over the sensor. As per the project requirements, it is used to detect the right swipe to activate the proximity sensor. The hardware is interfaced on I2C port 1 on the server devie as explained in the project requirement section. It is initialized in the interrupt mode to achive the lowest possible power consumption for the system.

Ambient Light Sensor (ALS)

The sensor is configured to detect the level of ambient light and based on which the LED on Client has to turned on. It is interfaced on PC9 as an analog pin. We have used ADC to receive the raw readings of the sensor. These readings are then used to anayze based on a calculated threshold to check the LED needs to be turned on. ADC is configured to sample the readings at the frequency of 16Mhz in order to get accurate data from the sensor.

Proximity Sensor (Si115x)

The sensor is used to detect the distance of palm from the sensor, to set the intensity of the LED. The sensor is interfaced on the server device on I2C0 port to take the readings in the polling mode. This is not as power efficient which is the reason, we are using gesture sensor to enable and disable the proximity sensor to get make the over system as much power efficient as possible. The sensor can not be used in the interrupt mode, as it would not server the purpose.

Passive Infrared Sensor (PIR)

The sensor is used to detect the presence in a room. It is interfaced on the client device in external GPIO interrupt mode. The detection/presence would cause a GPIO interrupt on the MCU. The interrupt is used to request ALS readings and to decide if the LED needs to be turned ON.

LED (On Board LED)

The LED is used as in indication of lighting in the room. It is ultimately controlled based on the overall system logic. The LED is interface on the PWM enabled GPIO pin. LETIMER0 is used to drive the GPIO pin on PWM mode. LED is capable of being truned ON/OFF and if its is ON, it's intensity can be controlled using LETIMER based PWM. LETIMER0 helped us make the client sub-system as energy efficient as possible.

LCD (On Board LCD)

The LCD is used mainly to display user messages to indicate the state of the system. On the server side, LCD display the ON/OFF state of the LED on the client side. It also displays the level of intensity which has to be set. The LCD provides a feedback for the user to have convenient user experience.

Software Components

Server - GATT Profile

gatt_services

Server - Brightness Control Flow

brightness_control

Clinet - Discovery State Machine

discovery_state_machine

Data Flow Diagram

data_flow

Demo

The working of this project can be observed here:

Test Plan

The link contatins the spradsheet which demonstrates the complete test plan for the project. It contains the recent updates about the test plan coverage of the project. The test plan covers all the software and hardware component.

Report

To view the project report please click here

Team Members