With the advancement in technology, IoT is the "next big thing!" With increased demand of automation and smart appliances at industry level as well as at personal home level, IoT is serving the need to make the objects smart.
This project is an evident example of IoT in action. The project deals with the sensing of temperature with the help of LM35 in any industry level, say any
Hydro power plant in which in which it is very important to maintain the surrounding temperature and the Boiler temperature, so to protect any damage to the boiler, any damage in boiler can lead to heavy economical and live loss.
It is said that the damage of boiler can be predicated by the increased in surrounding temperature.
This project deals with that problem. Whenever the temperature crosses a certain threshold, our Bolt Wifi Module will start its magic. The modules' job is to inform the owner about the anomaly.
In our case, the module is responsible for the generating an alarm through buzzer, and sending alert messages on message, email, and twitter.
Also, the machine learning algorithm, polynomial regression, is so used to predict the future temperature changes and values. This would help to manage any anomaly before it's happened.
I had a great learning time with this project, hope you'll have too!
Hardware AreaStep 1. Hardware ComponentsWe need the following components to build the whole project:
- Bolt WiFi module
- LM35 Temperature sensor
- 3Jumper wires ( Male to Female ) and 2simple connecting wires(for buzzer)
- USB cable ( mobile charger can also be used )
- Power Source ( power bank can also be used )
- Bread Board
- First, we will connect the Bolt Wifi module to LM35 temperature sensor through jumper wires.
- LM35 has 3 pins, namely VCC, output, GND. So, we'll connect it with Bolt Wifi Module as follows:
VCC pin of the LM35 is connected to 5v of the Bolt Wifi module.(The
brownwire)
Output pin (middleone)is connected to A0 (Analog input pin) of the Bolt Wifi module.(The
red wire)
GND pinLM35 is connected to the GND.(The
orange wire)
- To connect the Buzzer, we'll use simple connecting wires, and connect as follows:
The negative pin(small one) is connected with the GND along with the LM35.
The Positive pin(large pin) is connected to the pin '1' (GPIO).
We'll be using VMware Ubuntu device on our PC(Windows). You can Download the Virtual Box and Ubuntu Server.
To set up the server, follow the steps as shown in below video:
once we have done our ubuntu installation now let's move to new area
Step 4: Bolt Python LibraryThe Bolt Python library makes it easy to interact with the Bolt cloud API from our Python application.
We can control or fetch the data from Bolt cloud to our server(Here Ubuntu from VMware ), Bolt Python library will help us in building the IoT product.
Before we proceed to this step, first ssh(login) to Ubuntu server and follow the below steps to use Bolt Python library in code.
Step 1: Update the packages on UbuntuExecute the command below so that the packages on Ubuntu are updated to the latest version. If you skip this step, you may encounter an error while installing the Boltiot package.
sudo apt-get -y update
Step 2: Install python3 pip3
pip3 is a package manager for python3 used to install and manage packages and python libraries. It is system independent.
Install pip3 using the following command,
sudo apt install python3-pip
Step 3: Installing boltiot library using pip
Now we will install the boltiot python library on your Ubuntu server.
Type the below command in terminal to install boltiot python library.
sudo pip3 install boltiot
Now we are done with boltiot python library installation. In the next section, we will learn how to use the Bolt python library to check the device status and switch off the device.
Step 4:TO get bolt API key and DEVICE id
Go to bolt cloud and click in API section you will get API key
Now go to device section you will get device id
1. Make the same circuit connections as described before.
2. Once you are done with that, log in to ubuntu server and create a new folder to hold the files for this topic.
3. We can create a new file it using the following command.
sudo nano buz_temp.py
4. Now you have to write code like this in the terminal
After writing the code
5. Click CTR+X and Y to save the file
6. After that run this code to Get output
python3 buz_temp.py
7. To convert Sensor reading into celsius used below formula
Temperature in celsius=sensor reading/10.24
NOW ITS TIME TO TEST OUR PRODUCT
Comments
Please log in or sign up to comment.