Automatic Temperature controller using pic microcontroller

Automatic Temperature controller: This embedded system project is about automatic temperature controller using pic microcontroller. Automatic temperature control is a microcontroller based circuit which is used to maintain a temperature specified by the user. The user enters the reference temperature by keypad and then the microcontroller turn on and off the heater or cooler when the temperature is too hot or too cold. PIC 18F45K22 is the brain of this  automatic temperature controller system. It uses LM35 temperature sensor to measure temperature.

Use of Automatic Temperature Controller

  • Server Rooms.
  • Poultry Control Sheds.
  • Central Air Conditions System.
  • Storage Houses.
  • Home automations.
  • Food Factories
  • Hospitals
  • Industries

Components of automatic temperature controller system

  • PIC 18F45K22: PIC 18F45K22 has 40 pins. It has voltages operating range between 1.8v to 5.5v. It has low power consumption. It CPU Speed is 16 MIPS. It has 1536bytes RAM. It is best for such projects.
  • Keypad: In this project I you 3×4 keypad to enter the reference voltage.
  • 16×2 LCD: LCD is used to show alpha numeric characters. In this project LCD we use is 16×2 which means we can display 16 characters in two lines. LCD is used to show the reference temperature and actual temperature.
  • Relays 5v: Relay is an electromagnetic device used to switch on and off devices which used high voltages. In our project relay is used to switch on and off the heater and the cooler.
  • BC108: TheBC108 is low power Silicon NPN bipolar junction transistors found very common in electronics In our project it is used to switch the relays on and off.
  • LM35: LM35 is precision integrated-circuit temperature devices with an output voltage linearly-proportional to the Centigrade temperature. It is small in size and very cheap as compare to other temperature sensors. Its range of measuring lies between -55 to 150 degree centigrade.
  • Bulb as heater: It is used to produce heat as a result it rises the temperature to our desire temperature.
  • Motor as Cooler: It is used to reduce temperature to our desire temperature.
  • Crystal: It is used as oscillator. In the project I use 8 MHz crystal.
  • Resistors: It is used as pull down resistors with keypad and as a base resister with transistors. The resistors used in this project are mostly of 10KΩ. Potentiometer of 10KΩ is used to set contrast of the LCD.
  • Connection: PORT A is used as analog input. So LM35 is connected on PORT A. PORT C is used as digital PORT and 16×2 LCD is connected on PORT C. PORT D is connected with heater and cooler as it is  used as digital output. 3×4 keypad is connected on PORT B as it is used as digital port. Base of the both transistor is connected with PORT D, emitter are grounded, collectors are connected with the one terminal of relays coil. Heater and the Cooler is connected on normally open terminal of relays.

Circuit diagram of automatic temperature controller

automatic temperature controller using pic microcontroller

working of automatic temperature controller

When the circuit starts it demands to put a reference voltage which in our case lies between 0’C to 150’C. The reference value is entered using the keypad. After entering the reference value # is press to proceed. If you enter a wrong value you can remove it by pressing ‘*’.The PIC microcontroller measure temperature using LM35 which is an analog temperature sensor every 10 second and compares it with the reference value enters by the user. When the reference value is higher than the measured value, then the heater is turned ON to heat the area. The heater is switched OFF once the reference temperature is reached. When the measured value is higher than the reference value, then the cooler is switched ON to cool off the area until the required temperature is reached. An LCD display shows the measured temperature continuously.

19 thoughts on “Automatic Temperature controller using pic microcontroller”

  1. Sir I want the codes of that home Automation part in your projects where you r interfacing the temperature sensor and keypad

  2. Sir In need the source code. Iwant to study it, practice with it so i can write my own code. How do I obtain the full detail?


Leave a Comment