This project is based on to detect sudden temperature change in the room and got a immediate notification on android phone via sms via twillio. The person who got this message can control the temperature via app installed on his/her phone by pressing on/off button to control the switch.
To measure the current tempearture LM35 tempearture sensor is used.
Circuit Connection for Temperature sensor
Its connection are as follows. By keeping its name at my side connect its first pin is connected to 5V, middle one to A0 (analog output) pin in Bolt wi-fi module and third pin to gnd. The code is written in python on ubuntu and it used z-score analysis to measure the sudden temperature change. In z-score analysis it will send a indication when the temperature goes increase or decrease than the threshold temperature. But in this technique the temperature is not fixed. It will vary according to the readings. What does we mean with that??
It means if the temperature changes slowly suppose by 1 degree, it will not send any notification. In z-score algorithm, set the threshold accordingly. It will send the notification if it will change by 3 degree or higher. This type of change is known as anomaly (something that deviates from expected).
z-score analysis algorithm formulas
- In project, I kept frame_size r= 10 and multiplication factor c = 6 in z-score algorithm. It means up til 10 values it will not generate z-score and indicate "not enough data points.
- As the temperature rises/low sudden, a buzzer will sound and a led will glow. Simultaneously a message will come at android phone show that "Temperature increases suddenly, someone switch on the fan" or "Temperature decreases suddenly, someone switch off the fan."
Circuit Connection for buzzer and LED
- The connection for buzzer is insert positive leg (longer) in pin 0 of bolt wi-fi module and negative pin (shorter) in gnd pin of bolt wi-fi module. For led we have to kept one resistance 330 ohm in series with led to control the excess current. insert positive leg (longer) in series with resistance and other leg of resistance in pin 0 of bolt wi-fi module and negative pin (shorter) in gnd pin of bolt wi-fi module.
- To control switch by app using IOT
- We can control the temperature by app design through bolt cloud using html and java script. There are two button on your screen in app (android phone) ON/OFF. By pressing "ON" it will switch on the fan/cooling and on pressing "OFF", it will switch off the fan/cooling. Due to unavailability of switch during this lock-down situation I kept led instead of switch. I have control led by using ON/OFF button. Connection for LED are same as shown above.
Comments
Please log in or sign up to comment.