Broadcom WICED™ |
We include a segment of the code that loops through all the installed sensors and connects to each one via Bluetooth.
Below is a chart showing the output of the WICED™ sensors and what each segment represent. We use the following code to acquire the desired sensor signals. Note that we use tool[i].expect to read values from the 1st Notification or the 2nd Notification, and use tool[i].after.split() to read the bytes that represent the sensor values we would like to use. |
Seat Occupancy Detection Algorithm |
Temperature Indicator
The WICED™sensors are able to measure temperature quite accurately. By placing a sensor on each seat, we can detect temperature different due to the body temperature from the occupant. For every set of sensors connected to one Edison, we use one sensor unattached to any chairs as a baseline sensor, which measures the room temperature and serves as the comparison for the other sensors in the set. Detecting either a rising temperature against recently measured values (using running-average), or a steady-state temperature considerably higher than the baseline results in our algorithm determining occupancy. Movement Indicator
Acceleration in the vertical direction (denoted AccZ) is used for our movement indicator. The reason we chose this particular value to use as our movement indicator is that: AccZ not only responds to tilting in any direction, but also to sudden rotation due to centrifugal force. This makes this indicator sensitive to both a person sitting down and to rotations. Combined Indicator
Using only one of the above indicators makes the system prone to errors. Temperature indicator alone makes the system sensitive to the environment, as not all sensors in the set may experience the same temperature (eg: close to heater, close to window etc.). On the other hand, only using the movement indicator can give occasional false positives when, for example, someone nudges the chair but doesn't sit, or a bag is placed on the seat. As a result, we combine the two indicators to improve the accuracy of the occupancy detection. When either the movement indicator or the temperature indicator is set to true, we interpret the seat occupancy as uncertain, which essentially means that we do not recommend the user to find this seat, but if seating in the library is constrained, there is a possibility that this seat is available. |
Occupancy Visualization |
The Edison periodically sends seat status to AWS DynamoDB, which stores the most updated occupancy information for each seat. From the DynamoDB our website retrieves the updates, and display them to our users in a straightforward mapping that reflects how the seats are physically arranged in the library. Each seat belongs to one of the three possible categories:
|
Seat Reservation |
Our interactive webpage is used for seat reservation. It's connected with postgreSQL database which is used for storing student information, seat information and reservation situation. The main functions include:
|
Data Analytics |
After collecting sufficient data, we are able to perform data analytics on the library flow rate. Some of the results we can arrive at include:
|