Aditya kumar Pandey
Created June 28, 2019

temperature monitoring system

build the circuit for temperature monitoring system using bolt module and LM35 here it can predict the future value as well as sends alerts.

Full instructions provided86
temperature monitoring system

Things used in this project

Hardware components

Bolt WiFi Module
Bolt IoT Bolt WiFi Module
it is very important microcontroller, it consists processor and as vell as i/o ports 5 i/o ports , one port for 5v, one for 3v, ground port, one for analog to digital port, one for reciever and one for for tx.
×1
Gravity: Analog LM35 Temperature Sensor For Arduino
DFRobot Gravity: Analog LM35 Temperature Sensor For Arduino
it sense the corresponding temperature
×1
Female/Female Jumper Wires
Female/Female Jumper Wires
for connecting the LM#$ sensor with the Bolt iot module
×1
USB-A to Mini-USB Cable
USB-A to Mini-USB Cable
for providing the 3.3v supply to the Bolt iot module
×1

Software apps and online services

Bolt Cloud
Bolt IoT Bolt Cloud
for creating the product and connects the hardware and writting the code
Bolt IoT Android App
Bolt IoT Android App
for linking the Bolt iot module with the Bolt cloud
digital ocean droplet
Ubuntu
Ubuntu
for providing VPS which means virtual private network
mailgun.org
it provides the credentials by ehich if temperature cross the threshold so it can able to sends the alets via email

Story

Read more

Schematics

circuit diagram

img_20190627_180819_UzJ5sXzPzr.jpg

circuit diagram

Code

temperature monitoring system for Bolt cloud

JavaScript
setChartLibrary('google-chart');
setChartTitle('Polynomial Regression');
setChartType('predictionGraph');
setAxisName('time_stamp','temp');
mul(0.0977);
plotChart('time_stamp','temp');

for sending alerts when temp crosses the threshold

Python
import email_conf
from boltiot import Email, Bolt
import json, time

minimum_limit = 300 #the minimum threshold of light value 
maximum_limit = 600 #the maximum threshold of light value 


mybolt = Bolt(email_conf.API_KEY, email_conf.DEVICE_ID)
mailer = Email(email_conf.MAILGUN_API_KEY, email_conf.SANDBOX_URL, email_conf.SENDER_EMAIL, email_conf.RECIPIENT_EMAIL)


while True: 
    print ("Reading sensor value")
    response = mybolt.analogRead('A0') 
    data = json.loads(response) 
    print ("Sensor value is: " + str(data['value']))
    try: 
        sensor_value = int(data['value']) 
        if sensor_value > maximum_limit or sensor_value < minimum_limit:
            print("Making request to Mailgun to send an email")
            response = mailer.send_email("Alert", "The Current temperature sensor value is " +str(sensor_value))
            response_text = json.loads(response.text)
            print("Response received from Mailgun is: " + str(response_text['message']))
    except Exception as e: 
        print ("Error occured: Below are the details")
        print (e)
    time.sleep(10)

Credits

Aditya kumar Pandey
1 project • 0 followers

Comments