Embedded Systems
Embedded Systems
ABSTRACT
Today, with the development of industry, overheating and fire can occur in the industrial environment, so it is
important to check and control the temperature. Sensors are widely used to measure temperature. Normally,
temperature conversation, temperature sensor with the same voltage. The IC LM35 is one such sensor. This
paper presents a simple temperature check system depends on the LM35 sensor and PIC16F877A
microcontroller. This system displays the temperature obtained by measuring the temperature on a 16x2 LCD.
In this paper, Proteus software is used for simulation and programming language is Micro C.
KEYWORDS: LM35, PIC16F877A, 16x2 LCD, Power Supply.
I. INTRODUCTION
Nowadays, Temperature monitoring and maintenance is important for many control applications. Example:
Industrial zone domains such as processes, Automobile, industrial space, or storage, Adjust to get the desired
temperature with office buildings is. This is the essential concerns [2]. Temperature measured using temperature
The sensor divided into two Broad category, first analog temperature Sensors, which sensors produce analog
The output voltage, which is proportional to These temperatures and sensors require a second type of analog-to-
digital converter (A / D). Including digital temperature sensors in which Digital production sensors and all of
this. The sensor can be connected directly to Microprocessor or microcontroller without A / D converter is
needed.
The structures of this paper are following: Section I introduces of the system. Section II shows the proposed
system. This section describes the brief about of system. Section III discusses the methodology of the system.
This system also presents the messaging of the PIC16F877A, Temperature sensor (LM35), LCD and power
supply. Section IV presents software simulation of the system. Section V presents the implementation of the
system to implement the system. Then it explains the design and the system process. Section VI presents the
coding which is use in simulation. Section VII brings up the conclusion which also discusses the
recommendations for further extension to improve this system.
This means that for a change to a 4.887 mV analog input, the output of the ADC will change to 5V by the
voltage referred to in binary '1'. Analog result of the sensor that pin2 connects to the A port at RA0 for
conversion is Digital equivalent [4]. PIC16F877A’s pin diagram is shown in figure:3.
Transformer
Rectifier
Smoothing
Regulator
Regulated 5V DC
VI. CODING
In programming factors, as for the conversion, this scheme uses voltage to temperature. The conversion factor
is:
1 volt = 100 degree
mV = ( Output voltage * 100 oC/V )
Code is written in MIKRO C compiler.
// Pin direction
sbit LCD_RS_Direction at TRISB2_bit;
sbit LCD_EN_Direction at TRISB3_bit;
sbit LCD_D7_Direction at TRISB7_bit;
sbit LCD_D6_Direction at TRISB6_bit;
sbit LCD_D5_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB4_bit;
int temp,temp1,mV;
char temper[7];
void READ_temp(void)
//temp=temp1*5/1023;
//temp2=temp*100;
}
void data_converstion(void)
{
inttostr(temp1,temper);
}
void display1(void)
{
Lcd_Out(1,1,"Temperature=");
Lcd_Out(1,13, Ltrim (temper));
Lcd_Chr_Cp(0xdf);
Lcd_Chr_Cp('C');
//Lcd_Chr_Cp(' ');
Delay_ms (1000);
Lcd_Cmd(_Lcd_CLEAR);
FloatToStr(temp1,temper);
temper[7]=0;
Lcd_Out(2,7,temper);
}
void main()
{
ADC_Init();
Lcd_Init();
Lcd_Cmd(_LCD_CLEAR);
Lcd_Cmd(_LCD_CURSOR_OFF);
Lcd_Out(1,4,"Digital Temperature");
Lcd_Out(2,6,"Sensor");
delay_ms(3000);
Lcd_Cmd(_LCD_CLEAR);
while(1)
{
READ_temp();
data_converstion();
VIII. REFERENCES
[1] Aizahaniff, “Security and Control System”, may 2008
[2] B. LEVĂRDĂ and C. BUDACIU, "The design of temperature control system using Pic18f4620,"
Bulletin of the Polytechnic Institute of Jassy, Romania, DIN IASI, vol. 56, pp. 203-214, 2010.
[3] M. Laxmi rohini, “Security System using Wireless Alerts”
[4] Timothy D. Green, “Embedded System Programming with the PIC16F877” second edition, (2008)
[5] https://www.microcontroller based intruder position system.html