In this smart home system, all nodes communicate over a mesh network – each working as a master or a slave in a time-multiplexed manner.
Each node implements the following functionality:
Sensor Interface: Each node implements interfaces for a proximity sensor and an ambient light sensor. The signals from these sensors are conditioned using an amplifier then digitized using an ADC. The digitized signals are then used for the LED control functionality and for communication with other nodes in the system.
Light Control Unit: The measured signals are processed by an MCU and converted into the control information for the light’s color temperature and intensity. The control unit can adjust the light’s color temperature and intensity based on the ambient light levels and the time of day (from an RTC), or based on the user’s input received via an app running on a BLE-enabled mobile phone.
BLE Communication: In this system BLE serves two purposes. First, it provides a way for a mobile phone to control the lights on the node. In this case the node operate as GAP Peripheral and receives control information from the phone, which is the GAP Central. In the second case, BLE provides a mechanism for the node to control other nodes in the smart home system. During this, the node changes it role to operate as the GAP Central so it can send control information to the other nodes.