Introduction: Temperature Controlled AC Home Appliances Using Arduino

About: hIOTron is an IoT Based company that offers IoT Platforms, IoT Solutions, IoT Training.

The project will assist you to control various home appliances automatically as per temperature.

Supplies

Hardware Components

Arduino Uno

Relay 5V

NTC Thermistor 10k

16X2 LCD

Potentiometer- 10k ohms

Resistor 1k ohm

Resistor 10k ohm

Software Components

Arduino IDE

Step 1: About Project

This Home Automation System contains various components such as Arduino board, LCD display, Relay and thermistor. The system working completely depends on the relay as well as the thermistor as the temperature raised the relay will be turned on and if the temperature lowered below the threshold value then Relay will be turned off.

The appliance attached to the Relay will also turn on and off respectively. In this system, we have used a CFL bulb as an AC appliance.

Measure Temperature using Thermistor

Calculation of temperature can be done with the help of the following formula

T = 1 / (A + B*ln(Rt) + C*ln (Rt)3 ) where A, B, C are the constants Rt is thermistor resistance

You can take these constant values straight from the datasheet of the Thermistor also.

Relay

Relay basically acts as an electromagnetic switch, which is managed by small current and utilized to switch ON and OFF comparatively much larger current. Means by using small current we can switch ON the relay which enables much larger current to flow.

IoT Course will give you a thorough view of all such IoT Concepts.

Step 2: Run a Program

#include

#include "LiquidCrystal.h"

#define RELAY 8

LiquidCrystal lcd(6,7,5,4,3,2);

float A = 1.009249522e-03, B = 2.378405444e-04, C = 2.019202697e-07;

float T,logRt,Tf,Tc;

float Thermistor(int Vo) {

logRt = log(10000.0*((1024.0/Vo-1)));

T = (1.0 / (A + B*logRt + C*logRt*logRt*logRt)); // We get the temperature value in Kelvin from this Stein-Hart equation

Tc = T - 273.15; // Convert Kelvin to Celcius

Tf = (T * 1.8) + 32.0; // Convert Kelvin to Fahrenheit

return T;

}

void setup() {

lcd.begin(16,2);

lcd.clear();

pinMode(RELAY, OUTPUT);

}

void loop() {

lcd.setCursor(0,0);

lcd.print("Temperature:");

lcd.print(int(Thermistor(analogRead(0))));

lcd.print("C ");

delay(500); // wait 0.5 seconds before sampling temperature again

if (Tc > 28) digitalWrite(RELAY, HIGH), lcd.setCursor(0,1),lcd.print("Light status:ON "),delay(500);

else if (Tc < 28) digitalWrite(RELAY, LOW),lcd.setCursor(0,1),lcd.print("Light status:OFF"),delay(500);

}