ZigBee and Intel Edison: Meeting Room Automation Practice

Original author: Liang Zhang
  • Transfer
In many organizations, meeting rooms are used inefficiently. There are two main reasons for this state of affairs. The first is that someone, having booked a meeting room, may not use it at the appointed time. The second reason - the meeting ended earlier than planned, everyone parted, but those who would need a room do not know about it.


We have created an intelligent conference room reservation system (SCR) in order to help everyone with these problems cope.

general review


With the help of our development, you can, in real time, evaluate the situation in the meeting room. The system is able to determine if there are people in the room, and if they are not there, notify the server that the reservation schedule can be changed. This helps to efficiently and conveniently use the resources of the organization.

The system is based on the following hardware components:

  • Intel Edison Board
  • Arduino expansion board.
  • XBee ZB S2 ZigBee Module.
  • Android smartphone.
  • Push server
  • ZigBee Light Sensor
  • ZigBee Infrared Presence Sensor.
  • ZigBee smart socket.
  • Alarm ZigBee.

ZigBee is a specification of a set of high-level communication protocols that are used to create personal networks based on small, low-power digital transmitters. ZigBee protocols are based on the IEEE 802.15.4 standard and are intended for use in embedded devices that require low power consumption and are capable of working normally at low data transfer speeds. A network built on the basis of ZigBee will be very economical in terms of energy consumption. In order to pass the ZigBee certification, the device must be running on batteries for at least two years. Typical applications of such devices are home automation. For example, intelligent presence sensors, lighting systems, temperature controllers.

Arduino is an open software and hardware platform around which a community of equipment manufacturers and developers has formed. The usual scope of this platform is the development of devices that can determine the state of the environment and interact with it.

An important aspect of the Arduino platform is the standardized connectors that allow you to connect to the main unit with a microcontroller many interchangeable expansion modules, known as shields. Intel Edison also supports Arduino. This makes Edison compatible with thousands of modules for Arduino, such as the XBee ZigBee.

XBee is the name of the brand of the Digi International family of radio modules, available in standard form factors. XBee ZB supports the ZigBee PRO protocol for creating mesh networks.

From a software point of view, the system consists of the following parts:

  • Server software
  • Application for Android smartphone.
  • Firmware for Intel Edison.

This is how, in the most general terms, the operation of the Smart Conference Room System looks like.


SCR working scheme

Hardware


Let us dwell in more detail on the hardware on which our project is based.

Intel Edison with the Arduino circuit board is the core of the system. Since Edison is compatible with Arduino, devices that can work with Arduino are also suitable for Edison. For example, this is an XBee ZB S2 radio module that connects to Edison using an Arduino expansion board.


Intel Edison and XBee radio module

As a push server, we used a Fujitsu STYLISTIC Q702 Windows tablet with an Intel Core i5-3427U processor (frequency 1.80 GHz) equipped with 4 GB of RAM.


Tablet Fujitsu STYLISTIC Q702

In order to make it more convenient to work with our system, we created a mobile Android application for it. His tests were carried out on a Lenovo K900 smartphone. It is equipped with an Intel Atom Z2580 processor (frequency 2 GHz) and 2 GB of RAM.


Lenovo K900 smartphone

The role of the ZigBee coordinator is played by the XBee ZB S2 radio module, made in the form factor of the expansion board for Arduino and meeting the requirements of the ZigBee protocol. It controls the ZigBee sensors connected to it.


XBee ZB S2

radio module The project uses the Netvox Z311X light sensor. It meets the requirements of the ZigBee standard and is responsible for measuring the level of illumination in the room.


Ambient Light Sensor The

Netvox ZB11D infrared sensor is used as a presence sensor. It also supports ZigBee protocol and plays the role of the ultimate network device.


Presence sensor

The system uses the Netvox Z602A signaling module. This device combines sound and light alerts and is used in emergency situations. The module is based on the ZigBee HA standard.


Alarm The

intelligent ZigBee socket used in the project is the Netvox Z809AG. The device combines the functions of electricity metering and electrical circuit management. With it, you can turn on and off the power of various electrical appliances in the room.


Smart socket

Hardware infrastructure


Here's what the connections between the hardware involved in the project look like.


System device diagram The system

hardware architecture can be divided into the following four parts:

  • Smartphone.
  • Push server
  • Gateway based on Intel Edison.
  • A set of ZigBee sensors.

These hardware units focus on the three main functions of SCR.

  1. Observation of the room and assessment of the situation . Real-time ZigBee light and presence sensors deliver room information to the Intel Edison-based gateway. A ZigBee network is used to communicate sensors and a gateway. Edison analyzes the readings, determines if there is anyone in the room, and then sends his findings to the push server via Wi-Fi.

  2. Room reservation and smart schedule . Employees can reserve meeting rooms that, according to the system, are free. This is done using an Android smartphone. If there are no available meeting rooms, the employee can select a busy room and turn on the standby mode of the meeting room. As soon as the system, in particular Intel Edison, considers that the selected room is free, a message will be sent to the server, which will send a notification to the application on the smartphone.

  3. Remote access and management . Applications can request information about the status of a reserved room via Wi-Fi via a push server in order to control devices in the room, for example, turn on and turn off the light, and receive, in real time, information from ZigBee sensors.

Software


As we have already said, many organizational resources, such as meeting rooms, are not used in the most efficient way. This is especially true for large companies. For example, employee A, using a corporate website, reserved a meeting room from 8:00 AM to 10:00 AM. The meeting ended at 9.00, that is, from that moment the room is free, someone else can take advantage of it. Suppose that at the same time, employee B, using the same site, is looking for a free room. But he cannot choose the one reserved by employee A, because in the database she is listed as busy, although in fact she’s free. Therefore, employee B will have to look for another option, and the vacated room will be empty.

The figure below shows the block diagram of the software solution used.


Software Architecture

Push server


As a push server, we used GlassFish 4.0. This is what the server architecture looks like.


Server Architecture The server

system diagram is shown below. When Edison, using information from ZigBee sensors, determines that the state of the room has changed from "free" to "busy", or vice versa, he will notify the server about it. The server, in turn, will change the corresponding record in the database, and then, if the room is empty, will send a message to the Android application.


Push Server Workflow

Intel Edison and ZigBee


In Arduino, the interface between Intel Edison and the XBee coordinator is emulated as a serial port. An application running on Intel Edison works as a ZigBee gateway. With it, we can send commands to ZigBee sensors and receive responses from them.
The ZigBee coordinator is also responsible for transmitting sensor information to the push server.


Arduino ZigBee Stack Device

We designed and implemented in the Arduino environment a simple ZigBee stack that is used to interact with sensors. The board works in coordinator mode, which monitors the state of the sensors, and, if this is possible, allows you to manage them.

ZigBee Stack Classes
Class
Function
XBeeAddress
ZigBee device base class
XBeeAddress64
ZigBee 64-bit IEEE Address
XBeeAddress16
ZigBee 16-bit network address
Payload
ZigBee Command Frame Payload
ExplicitAddressCommand
ZigBee Command Frame Used in Home Automation Specifications
ExplicitAddressCommandResponse
Response to a command at an explicit address
XBeeSensor
ZigBee Sensor Base Class
XBeeLightSensor
ZigBee Light Sensor
XBeeInfraSensor
ZigBee Presence Sensor
XBeeAlarm
ZigBee Alarm

Key Features of ArduinoXBee


The main class of the ArduinoXBee is the XBeeCoordinator. This class is responsible for controlling ZigBee sensors. Its main tasks are to collect information from sensors and send them commands to remotely control their behavior. Here is a description of the functions used to work with sensors.

Int getLightValue (XBeeLightSensor lightSensor) . This function is used to obtain information from the light sensor. The object of the light sensor is fed to its input, and at the output we get an integer in the range from 0 to 65535.

bool getInfraValue (XBeeInfraSensor infraSensor) . The function receives the readings of the preset presence sensor. When called, the presence sensor object is passed to it, and it returns a logical value. True indicates that there is someone in the room, False - that the room is empty.

void turnOnAlarm (XBeeAlarm alarm) and void turnOffAlarm (XBeeAlarm alarm) . These functions, respectively, turn the alarm on and off. When they are called, an object is used, symbolizing the desired device, they do not return anything.

void turnOnSwitch (XBeeSmartPlug plug) and void turnOffSwitch (XBeeSmartPlug plug) . These features allow you to turn on and off the power supply by smart sockets. When calling functions, they are given the object corresponding to the outlet; they do not return anything.

Android app


When the user launches the application, he has the opportunity to create a new schedule or manage an existing one, namely to delete it. By creating a new schedule, the user can search for meeting rooms by time and location. If the room is free, you can immediately reserve it. If the room is occupied, the user can select the option of waiting for the room to be vacated. As soon as the ZigBee sensors detect room release within the specified time range, the push server will send a notification to the application, and the user who receives this notification can reserve a room.


System diagram of working with Android application

Android app user interface


The Android application we called “Smart Conference Room System”. Using it, an employee of the organization can book a meeting room and manage reserved rooms. Here's what the app’s main screen looks like.


The main screen of the application

Here the commands located on the left are used to create new schedules, manage existing ones, to work with the account and settings.

Using the My Scheduling command , users can book meeting rooms (blue is used to indicate that the room is free, gray to what is already booked). If the room is not free, the user can turn on standby mode for its release.


Room Reservation

Users can check the status of the rooms they have booked or those they expect to be released. Successfully booked rooms are displayed in blue, those that an employee expects to be released are displayed in gray. Here you can manage your schedule.


Schedule management

When the system detects that a certain room has become free, it sends out notifications to all users who are waiting for its release. Here is what the notification looks like.


Room Release Notice

The first person to respond can book a room that has just been vacated. The rest will fall into the waiting list again.

conclusions


We have developed an intelligent meeting room management system based on a simple ZigBee stack for Arduino. The system can determine, in real time, whether a room is free or busy. This makes it easier to book rooms, make it more convenient, and increase the efficiency of using meeting rooms.

Much has already been done, but we, however, still face some difficulties. This applies to various aspects of the system. So, if we talk about its internal structure, the stack on which it is based, these are the limitations of the functions of the API stack and the whole complex. In addition, it is necessary to improve the stability of the system and other aspects of its functioning. We plan to create the next version of the Smart Conference Room System, which will be more functional, stable and convenient, which means it will better solve its main task: optimizing the use of meeting rooms in organizations.

Also popular now: