0% found this document useful (0 votes)
44 views3 pages

Design and Realization of Temperature Measurement

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views3 pages

Design and Realization of Temperature Measurement

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

International Conference on Power Electronics and Energy Engineering (PEEE 2015)

Design and Realization of Temperature Measurement


System based on PROTEUS Software
C.L. Wang, P.Y. Chen, H.L. Hu
The School of Physics and Electronic Engineering
Xingtai University
Xingtai, 054001, China

Abstract—Computer aided design is an important method in register(FPEROM-Flash Programmable and Erasable Read
industrial design. The process of single chip micro-controller unit Only Memory).
(MCU) based on Proteus simulation software is ocular, rapid, easy
debugging, with low cost and high efficiency. DS18B20 DS18B20 Is a Tiny Temperature Sensor. Its range is
temperature sensor has high accuracy, wide range and -55°C~+125°C. In the range of -10~+85°C , the accuracy is
anti-interference properties. Hardware design, software editing, ±0.5°C . The field temperature is transmitted directly by way of
component welding and system debugging are involved in circuit “first bus line” digit mode, thus the anti-interference of the
design. Under the environment of Proteus, the hardware design system is greatly enhanced. This tiny temperature sensor is
and software debugging of single chip micro-controller and digital suitable for the measurement of field temperature in
circuit can be completed easily. This can shorten the cycle of abominable environment. DS18B20 only need to be connected
product development and enhance design efficiency. It can be with micro-processor by way of one port line to achieve
applied to the t range of temperature occasions from -55°C to bi-directional communication. It communicates with the MCU
+125°C. of AT89C51 through single bus protocol. The AT89C51 port of
P3.3 connects the DQ end of DS18B20 chip. LCD1602 links
Keywords-temperature; proteus software; simulation; the SCM P0. P2 port of AT89C51 .The main function of MCU
microcontroller; design AT89C51 is to control and complete the collection of
I. INTRODUCTION temperature and display information. The schematic diagram
drawn by the Proteus software interface is shown in figure 1[1,
With the development of computer technology, all kinds of 2].
computer-aided design and production increase daily.
Man-machine dialogue is a kind of work mode which is used in Liquid crystal 1602LCD refers to liquid crystal module
industrial design. The computer has interactive, rapid access (displays characters and numbers) which displays the content of
and automatic processing and other functions. It can not only 16X2, i.e. display two lines and each line has 16 characters.
show the design effect and high efficiency, but also can do Most character liquid crystal is based on 16X2 liquid crystal
further simulation of the design content, show even 3D virtual chip [3]. Liquid crystal LCD1602 monitor is connected with the
component, device or product. The production of temperature P0 and P2 ports of single chip micro-controller. The single chip
measurement system is based on Proteus simulation software, micro-controller controls and completes the temperature
combined with the microcontroller circuit principle. The circuit collection and information display.
design process involves the hardware design, software
programming, component and system for welding debugging.
The design of hardware and software, the single-chip
microcomputer and digital electronic circuit and convenient
debugging can be completed in the Proteus environment. The
product development cycle can be shortened and the design
efficiency improved.
The purpose of this paper is to demonstrate the temperature
measurement system which is designed under the Proteus
software. First it shows the circuit, then programming, finally
simulates the virtual system.
II. CIRCUIT OF PRINCIPLE
Temperature measurement system is mainly composed of FIGURE I. PRINCIPLE CIRCUIT.
single chip AT89C51 control chip, DS18B20 temperature
sensor, liquid crystal monitor LCD1602 components. III. SOURCE PROGRAM DESIGN
AT89C51 is a kind of lower voltage, high performance The editing of source program mainly includes the
CMOS 8 bit micro-processor with 4kbit flash realization of temperature acquisition, its display and control
module. They are the temperature sensor DS18B20 reading and

© 2015. The authors - Published by Atlantis Press 240


writing program, the display program of LCD1602 and Init_DS18B20();
microcontroller control program. DS18B20 temperature WriteOneChar(0xCC);
reading programming is given as below [4,5]: WriteOneChar(0xBE);
void tmpDelay(int num) a=ReadOneChar();
{ b=ReadOneChar();
while(num--) ; t=b;
} t<<=8;
void Init_DS18B20() t=t|a;
{ tt=t*0.0625;
unsigned char x=0; t= tt*10+0.5;
DQ = 1; return(t);
tmpDelay(8); }
DQ = 0; The program can be written or compiled directly in the
Proteus software platform. Then copy the generated HEX files
tmpDelay(80);
into AT89C51. One can also open the Keil and uVision3
DQ = 1; software[1,6,7,8,9]. Click the new project in the menu. After
tmpDelay(14); pop-up the dialog box, create a project file and select the SCM
x=DQ; model. Write the original program. When the program is
tmpDelay(20); completed, click the compile connection and compile, which
} generates hex files. Check and see no error appears, create
unsigned char ReadOneChar() target (18B20.hex) file.
{
unsigned char i=0; IV. CIRCUIT SIMULATION
unsigned char dat = 0; The circuit debugging and analysis can be done under the
for (i=8;i>0;i--) Proteus software. Operate the loaded single chip controller
{ target file and the simulation result will be given.
DQ = 0;
Open the already drawn schematic of design circuit on the
dat>>=1;
platform of Proteus software and double click on the AT89C51
DQ = 1;
microcontroller. Show the edit element window, generates the
if(DQ) source object code (18B20.hex) file and upload it into the
dat|=0x80; microcontroller. This file is compiled as sixteen hexadecimal
tmpDelay(4); HEX file and it is shown as in figure 2. Then select suitable
} simulation method to analyze and debug design circuit. Third,
return(dat); Click “run” button to begin the simulation. System simulation
} result is shown in figure 1. Fourth, change the parameters and
watch simulation results, then analyze the influence of
void WriteOneChar(unsigned char dat) parameters on the performance of the circuit [7, 8]. Fifth, Check
{ the CPU registers, memory data changes. Figure 3, figure 4,
unsigned char i=0; Figure 5 show the CPU SFR Memory, CPU Registers and CPU
for (i=8; i>0; i--) Internal Memory data changes when the program are running
{ respectively.
DQ = 0;
DQ = dat&0x01;
tmpDelay(5);
DQ = 1;
dat>>=1;
}
}

unsigned int Readtemp()


{
unsigned char a=0;
unsigned char b=0;
unsigned int t=0;
float tt=0;
Init_DS18B20();
WriteOneChar(0xCC);
WriteOneChar(0x44); FIGURE II. EDIT WINDOW OF PARTS.

241
FIGURE III. 8051 CPU SFR MEMORY. FIGURE VI. 3D SIMULATION.

VI. SUMMARY
Proteus circuit simulation fully reflects the ideas of circuit
design, software design, circuit simulation, PCB circuit board
design, the circuit welding and system debugging. The full
understanding of the principle of the circuit is achieved from
qualitative analysis to quantitative analysis; the achievement is
realized from pure theory to the analysis of circuit design,
circuit simulation experiment; the realization is achieved of the
PCB circuit board design to the actual hardware installation and
FIGURE IV. 8051 CPU REGISTERS. debugging. The simulation analysis and fabrication become the
bridge from pure theory to practice. The design process is
intuitive and quick to the comprehensive development of new
products effectively. According to different applications, one
can put the module package in other equipments, such as the
realization of cable trench, water circulation system, air
conditioning temperature control, agricultural greenhouse
environment control temperature occasions.
ACKNOWLEDGMENT
This Project has been supported by Xingtai University.
FIGURE V. INTERNAL MEMORY. REFERENCES
[1] He Jingkai. SCM System Design, Simulation and Application -- Based on
V. PCB CIRCUIT BOARD DESIGN the Keil and Proteus Simulation Platform [M]. Xi'an: Xi’an Electronic
Science and Technology University Press, 2011.2 (in Chinese)
(1) Click the ‘toolbox’ of ‘ARES’ interface. Search
‘component placement and editing’ icon, select the elements in [2] Li Quanli. The SCM Theory and Interface Technology [M]. Beijing:
Higher Education Press, 2013.12
the list and click the left mouse button in a frame, put the
[3] Yu chengbo. Sensor and Automatic Detection Technology [M]. Beijing:
selected element. (2) After placed element, click ‘Tools’- ‘Auto Higher Education Press, 2009.7 (in Chinese)
Router’ from the menu. Dialog box, click the ‘Begin Routing’ [4] Ding Xiangrong. C language Program Design and Keil C [M].
button in the presence dialog box, it can be automatically Guangdong: Guangdong Higher Education Press, 2013.9 (in Chinese)
complete the wiring. (3) Set level,set the rules, inspect wiring, [5] Geng Zhaoying.C, Application Programming Tutorial [M]. Beijing:
check cyclic redundancy, check the design planning. (4) Click People's Posts and Telecommunications Press, 2010.11 (in Chinese)
‘output’ on the menu bar, and then click ‘Gerber and Excellon [6] Xu Aijun. Keil C51 Microcontroller High-level Language Application
output’, open the dialog box, start to design. Generate Gerber Programming and Practice [M]. Beijing: Publishing House of electronics
file. Click ‘output’ on the menu bar again, then click ‘Gerber industry, 2013.12
view’, pop up ‘Gerber view’, and check the selected optical [7] Zhang Yigang. Principle and Application of Single Chip Microcomputer
drawing layer. Finish the final circuit PCB board. (5)When the --C51 Programming +Proteus Simulation [M]. Beijing: Higher Education
Press, 2012.11 (in Chinese)
wiring is completed, the 3D simulation effect is shown as figure
[8] Du Shuqing. Based on Proteus and Keil C51 Microcontroller Design and
6. Simulation [M]. Beijing: Publishing House of Electronics Industry,
2012.2
[9] Zhu Qinghui.Proteus Tutorial - electronic Circuit Design, Plate Making
and Simulation [M]. Beijing: Tsinghua University Press, 2011.6

242

You might also like