My electricity bills are always high during the summer time which have been a huge concern for me. This drains a lot of my money, so, I started thinking of a product which could read the temperature of the room and suggest me whether to switch on or off my air conditioner(the main draining force for my money). This system helps to read the temperature of the room and suggests whether to switch on or off the air conditioner if the room's temperature is more than 35 degree C or less than 16 degree C. Moreover if the temperature is optimal, i.e., between 16-35 degrees C, a LED light bulb is lit indicating the normal temperature of the room. In such a case, air conditioner could either be kept on or off, depending on the individual.
Step 1: Making the hardware connectionsThe hardware components consist of the Bolt Wifi module, a LED light bulb, 3 male to female wires, Temperature Sensor, USB cable and a power source.
The hardware connections are made as shown in the figure:-
For temperature sensor, you can use this:-
Temperature sensor's VCC pin to 5v of the Bolt Wifi module, output pin of the temperature sensor connects to A0 (Analog input pin) of the Bolt Wifi module and Gnd pin of the temperature sensor connects to the Gnd.
The positive leg of the LED bulb is connected to pin 1 and the negative leg of the bulb to pin 2 of the Bolt device.
At last, connect the Bolt Wifi device to USB cable and then connect the cable to a laptop or a power source via an adaptor.
Step 2: Set up a Twilio accountSet up a twilio account from www.twilio.com and set it for programmable SMS. This will give you a phone from which you will receive the updates to your phone, an AUTH NUMBER and ACCOUNT SID(SSID).
There will two sets of code for the following system. The first code consists of the details from the Twilio like number from which the SMS will be received and also the phone number receiving the message, the AUTH NUMBER and ACCOUNT SID(SSID). This code will also consist of the API Key and the Bolt Device ID from your cloud.boltiot.com account. Save it under the name conf.py
It will executed through the command:-
python3 conf.py
The next code has all the real work of the system where it is checked whether the temperature is in the given range or not and accordingly the messages are send to your given phone number or the LED bulb is switch on and off. The temperature is checked after every minute as shown by the line:-
time.sleep(60)
The sensor value is converted to the temperature using the following formula:-
Temperature= (sensor_value*100)/1024
Comments
Please log in or sign up to comment.