Problem 1: (100 Points) A Smart Factory Ventilation System
Homework Problems:
Problem 1: (100 Points) A Smart Factory Ventilation System:
A smart factory ventilation system includes two MCUs. MCU1 reads the CO and the ambient temperature levels and reports them to a cloud application. On the other hand, MCU2 receives commands form the cloud application to open/close a window and a fan.
You are required to build a simulation of the above application consisting of a cloud and an edge layers. The cloud layer consists of a single process which controls the system and displays a dashboard showing a chart of the reported readings and the status of the window and fan. The edge layer contains the two MCUs. Figure 1 shows an architectural view of the system.
Cloud Layer
Edge Layer
Figure 1: Architectural view of a Smart Factory Ventilation System.
The cloud application periodically polls the sensor nodes to retrieve the sensor data and plots the data using an animated graph. If the sensor reading exceeds certain thresholds, a command is sent by the cloud to turn on/off the devices. You need to implement the MCUs inside PT and the cloud service outside PT (using Python Script).
Use the TCP/UDP port number as shown in the Figure. Your system must implement the following requirements:
The cloud service polls each sensor node once every 100 ms to request the sensors’ readings.
The cloud service must display a live line chart showing the readings of each sensor and the status of the devices. Figure 2 shows an example of the expected output.
The reading should be continuous, and plots should keep updating continuously.
You need to define a simple protocol (messages) to request turning on/off the warning lights.
You need to define the threshold values for the sensors.
Connect your sensors to an SBC or MCU to enable connectivity. For programming in PT, use the RealTCPServer(), RealUDPServer() , RealTCPClient() and/or RealUDPClient() template.
Report: attach a report with your solution that includes:
Screenshot of the program output.
Types of sensors used and threshold you define for each sensor.
Any problems or limitations in your solution.
Protocol messages you specify between the cloud and sensor nodes.
