02-11-2012, 01:43 PM
Temperature Control System using LM35
Temperature Control 1.pdf (Size: 593.56 KB / Downloads: 87)
Temperature Control System.docx (Size: 2.63 MB / Downloads: 64)
Temperature Control System1.doc (Size: 192 KB / Downloads: 67)
TEMPERATURE CONTROL USING.ppt (Size: 1.97 MB / Downloads: 58)
OVERVIEW
This document describes the development of Cytron Technologies DIY (Do It Yourself) Project No.11 (PR11). This project will use PIC16F876A to control NPN power transistor (BD135) further drive DC brushless fans, LEDs and buzzer when the certain temperature was detected. The value of temperature always displayed on a LCD screen. Circuit schematic and PIC source code will be provided.
PR11
FEATURES
PIC controlled DC brushless fan, LEDs and buzzer
- PIC16F876A with internal ADC read the analog voltage from LM35 (Temperature sensor) and display it on LCD display
BD135 power transistor
- Capable of driver DC brushless fan (0.12A)
Temperature sensor (LM35 DZ)
- Sensor gain, 10mV/°C (average slope)
- 0 - 100°C
- LCD display (always display the value of the temperature)
Fans, LEDs and buzzer are activated when the certain temperature was detected.
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved 1
ROBOT . HEAD to TOE
PR11 – Temperature Control System using LM35
SYSTEM OVERVIEW
GENERAL DESCRIPTION
PIC has been used to control the LED or buzzer directly for some previous PRs. But in this project, PIC cannot directly activate the DC brushless fan because it has not enough current. NPN power transistor (BD135) is required, so that DC brushless fan can be controlled by PIC. PIC16F876A will read the analog voltage (using ADC) from LM35 temperature sensor and display it on LCD display. A buzzer, LEDs or fans will be activated when temperature reach a certain temperature value.
Power Transistor (BD135)
BD135 is used for controlling the DC brushless fan with sufficient current. Following Figure 1 shows the pin diagram of BD135.
Temperature Sensor (LM35)
In this project, two LM35s are used for two difference temperature. Vs of the LM35s are given 5V and the Vout pins are connected to AN0 and AN1 (PIC16F876A) separately.
PIC16F876A (Microcontroller)
This powerful (200 nanosecond instruction execution) yet easy-to-program (only 35 single word instructions) CMOS FLASH-based 8-bit microcontroller packs Microchip's powerful PIC® architecture into an 28-pin package and is upwards compatible with the PIC16C5X, PIC12CXXX and PIC16C7X devices.
The PIC16F876A features:
• 256 bytes of EEPROM data memory
• Self programming
• An ICD
• 2 Comparators
• 5 channels of 10-bit Analog-to-Digital (A/D) converter
• 2 capture/compare/PWM functions
• The synchronous serial port can be configured as either 3-wire Serial Peripheral Interface (SPI™) or the 2-wire Inter-Integrated Circuit (I²C™) bus
• A Universal Asynchronous Receiver Transmitter (UART)
Interface PIC16F876A with Temperature Sensor (LM35)
Signal pin (Vout) from LM35 can be connected to either one of analog input pin (AN0-AN4) except AN3 (pin 5) but make sure the ADC configuration is correct according to the Figure 11 (Software section). In fact, pin 5 (Vref+) from PIC should be given for 1V but it may has offset, so a variable resistor (VR1) was installed for voltage adjusting. For more stability, user is recommended add a capacitor (104) between the analog signal and GND for every analog input such as signal from LM35 and variable resistor (VR1).
Power Supply for Circuit
For this project, the voltage range of power source could be given for this circuit board is between 7V and 15V. Higher input voltage will produce more heat at LM7805 voltage regulator. Typical voltage is 12V. Anyhow, LM7805 will still generate some heat at 12V. There are two type of power connector on the circuit board, DC plug ‘Adaptor’ is for AC-DC adaptor and 2510-02 ‘Power’ is for battery source. Normally AC to DC adaptor can be plugged to ‘Adaptor’ type connector. LM7805 (1A maximum) will regulate the given voltage to 5V (VCC) for supplying to the PIC16F876A and pull-up the push button (input). The purpose of using diode (D1) is for circuit protection in case the polarity of the power source is incorrect. Capacitor (C5) and capacitor (C1) is use to stabilize the voltage input and output of the LM7805. DS1 is a green LED (small) as power indicator.