Temperature Monitoring System is a Machine learning based industrial IoT project. It can used in a real world scenario where IoT is used to solve the problem. This project will enable us to design a monitoring system at home which can be used to analyse the temperature of the environment using the visual graphs. In this we use a temperature sensor namely LM35.
LM35 is the sensor that senses the temperature of its environment and based on it's value it generates an analog output voltage. This analog voltage produced by the LM35 is then given as input to the Bolt A0 pin.
Why wait more? Let's get started!
Before we start connecting our hardware components, connect the bolt wifi module to the bolt cloud.
STEP 1: Hardware Connections1.Connect the Vcc(supply) pin of LM35 IC to the '5V' pin of wifi module.
2.Connect the output pin of LM35 IC to the 'A0' pin of wifi module.
3.Connect the ground pin of LM35 IC to the 'GND' pin of wifi module.
Precautions:
1.Check the connections before giving the power supply.
2.Make sure that the wires are properly connected without any chances of short circuit.
With this we are done with the hardware connections.Now lets move on to the bolt cloud i.e software part.
STEP 2: BOLT CLOUDBoltIoT PlatformBolt IoT platform gives you the capability to control your devices and collect data from IoT devices safely and securely no matter where you are. Get actionable insights by deploying machine learning algorithms with just a few clicks to detect anomalies as well as predict sensor values. To know more visit boltiot.com.
Login to your respective bolt cloud accounts.
Add product and link your product. Configure you product which involves a bit of coding.
This single line of code will create a table which has two columns namely time_stamp and temperature respectively. This table will give us a clear idea about the variation in temperature with time. Save the code and exit the window. Now deploy configuration and click on 'view the device' to get the readings as shown below.
The temperature values given by the sensor are raw values. In order to convert them into actual temperature, we use a simple formula i.e
temp = (analog_value * 100)/1024
That's it, this is how simple is the temperature monitoring system designed and used.
STEP 3: Predicting Temperature using Polynomial RegressionSince the hardware connections are already made, all we need to do is just change the code in the bolt cloud where we configured our product.
Below is the screenshot of the code and the polynomial regression graph obtained when the device is deployed and "view the device" option is chosen.
So we are now done with Predicting temperature using Polynomial Regression with the help of temperature monitoring system.
STEP 4: Sending SMS (alert) when Temperature Crosses Threshold.This project is also an extension of temperature monitoring system.
The basic principle behind this to send alerts when the temperature crosses threshold. Because it becomes boring to monitor the system every second and it is to not possible to even miss a reading in the blink of an eye.
Since it is the extension of the basic temperature monitoring system, the things we need to add are :
1. VMware workstation (Ubuntu)
2Twilio : Twilio is a cloud communications platform as a service company based in San Francisco, California. Twilio allows software developers to programmatically make and receive phone calls and send and receive text messages using its web service APIs. Know more at twilio.com.
The code we write in the VMware workstation is by using Python. Below is the screenshot of the code attached.
This program needs to be saved and run by using the command:
sudo python3 your_name_of_the_file. py
The output is the alert messages sent by Twilio to the registered phone number whenever the temperature crosses threshold a per our requirement. Here our minimum limit is 300 and maximum limit is 600. When the temperature is below 300 and the temperature is above 600, we will get the sms alert.
Here is the screenshot of the messages I received as a part of this project.
In this way, the basic temperature monitoring system can be used in various applications like prediction using polynomial regression and sending alerts (sms, mails) when temperature crosses threshold value.
Comments