Once upon a time in April 1986, when the hazardous incident of Chernobyl took place, the whole world was shook and the effects of that nuclear disaster still exists. It was found out that along with the graphite tips of the control rods, tremendous increase in the rate of reaction and thus increase in temperature was the major cause of the disaster.
At that time people were not aware about the exciting technology of internet of things since it came into play much later after the incident.
What if at that time we have applied IOT and could have get an alert message on phone and via email, this huge disaster could have been avoided. Mr. Razor thought to apply this idea of IOT and avoid any such future mishappening. So, he decided to make an IOT device which sends alert sms and emails when the temperature of the nuclear reactor changed anomalously. He applied his knowledge of machine learning and Z-Score Analysis to get through this.
How did Mr. Razor do it?
Here are the steps he used to make this device:
Step 1: Making the hardware connection.
1. First he took the LM35 sensor and connected three wires (Male-Female wire) to the sensor as shown. In this connection, he noted that: a. The Grey wire is connected to VCC (INPUT)
b. The Red wire is connected to OUTPUT
c. The Yellow wire is connected to GROUND
2. Then he connected the other end of the wire in the respective manner.
- The grey wire which was connected to VCC (INPUT) of the LM35 sensor is connected to 5V PIN of the Bolt Wi-Fi module.
- The red wire connected to OUTPUT of LM35 sensor is connected to A0 PIN of the Bolt Wi-Fi module.
- The yellow wire was connected to GND PIN of the Bolt Wi-Fi module which was connected to GROUND of the LM35 Sensor.
3. Then he connected the micro USB to the BOLT Wi-Fi module and turned the power on using a normal android charger. (He made sure that the wifi to which the bolt module is connected has an active internet connection and product was added or connected to bolt cloud by the help of Bolt-IOT mobile App). Finally after all the connection the hardware looked something like shown below.
Mr. Razor was doing this experiment in home so he decided to use a refrigerator to test his product.
Step 2: Developing a product on bolt cloud that could give a prediction curve for Z-score analysis.
He logged into his bolt cloud and added a product and wrote a code to generate the desired result. He performed his experiment for about 2 hr so that he can get an overview of how temperature change inside the refrigerator.
Below shown is the output that he got.
Step 3: Writing the Code to use the Z-Score Analysis.
From the graph shown above he came to know that the temperature fluctuated between 1°C and 0.5°C. So he initially wrote that code specifying the upper limit and the lower limit. When he opened the door, the temperature crossed his limit of 1°C and he instantly got an email and a sms alert.
So then he finally decided to write another code or he defined a function which computed the upper and lower bounds of temperature using the Z-Score analysis.
he used the formulas given below.
where C is the multiplication factor and r is the frame size.
When he finally ran his code. Vohoo!! He was successful. And thus, in this way he was able to develop a product which can send SMS and Email Alert instantly when there is a suddenly change or anomaly in temperature inside any reactor or any other temperature source.
With this innovation Mr. Razor was very happy that because of his dedications and hardwork no more hazardous incidence like Chernobyl would take place ever again due to temperature anomaly.
In his above product he used Twillio's messaging APl for sending SMS and MAilGun's emailing API for sending Email via his code.
For the above method the response received via sms and email are given below as example.
PS:- Attached is the main code. The rest of the library used are need to be installed on respective machines. Also, the conf.py file contains all the credentials required to run the code like, the API Key of the module, SSID, Authorization Token, MAILGUN_API_KEY, Sandbox URL etc.