Design and virtual simulation of single chip temperature acquisition circuit

Publisher:zukeq2009Latest update time:2009-12-14 Source: 山西电子技术 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction

In industrial production, current, voltage, temperature, pressure, flow, flow rate and switch quantity are the main commonly used controlled parameters. Among them, temperature control is becoming more and more important. In many fields of industrial production, people need to detect and control the temperature in various heating furnaces, heat treatment furnaces, reaction furnaces and boilers. Using a single-chip microcomputer to control temperature not only has the advantages of convenient control, simplicity and flexibility, but also can greatly improve the technical indicators of the controlled temperature, thereby greatly improving the quality and quantity of the product. Therefore, the problem of temperature control by a single-chip microcomputer is a control problem that is often encountered in industrial production.

Most of the temperature detection systems currently used use a transmission system composed of analog temperature sensors, multi-channel analog switches, A/D converters and single-chip microcomputers. This temperature acquisition system requires a large number of temperature measurement cables to send the signals of field sensors to the acquisition card. The installation and disassembly are complicated and the cost is high. At the same time, the analog signal transmitted on the line is susceptible to interference and loss, and the measurement error is relatively large, which is not conducive to the controller making timely decisions based on temperature changes. In view of this situation, this paper proposes a temperature acquisition system using digital single bus technology, and uses Proteus and KeilμVision 3 software to perform comprehensive virtual simulation of the designed circuit, realizing real-time temperature measurement and display.

1. Proposal demonstration

1.1 Introduction to DS18B20

DS18B20 is a digital single bus device newly launched by DALLAS Semiconductor Company in the United States. It is a new generation of improved intelligent temperature sensor adapted to microprocessors. Compared with traditional thermistors, it can directly read the measured temperature, and can realize 9-12-bit digital value reading mode through simple programming according to actual requirements. 9-bit and 12-bit digital quantities can be completed in 93.75 ms and 750 ms respectively, and the information read from or written to DS18B20 only requires one line (single-line interface) to read and write. The temperature conversion power comes from the data bus, and the bus itself can also supply power to the connected DS18B20 without additional power supply. Therefore, the use of DS18B20 can make the system structure simpler and more reliable. At the same time, its unique and economical "one-line bus" allows users to easily build a sensor network, introducing a new concept for the construction of measurement systems. DS18B20 "one-wire bus" digital temperature sensor supports "one-wire bus" interface, and the measurement temperature range is -55℃~125℃, and the accuracy is ±0.5℃ in the range of -10~+85℃. The field temperature is directly transmitted in the digital mode of "one-wire bus", and the serial output is in the form of 16-bit digital quantity with sign extension, which greatly improves the anti-interference ability of the system. Therefore, the digital single bus device DS18B20 is suitable for field temperature measurement in harsh environments, such as: environmental control, equipment or process control, temperature measurement consumer electronic products, etc. It has made great improvements in temperature measurement accuracy, conversion time, transmission distance, resolution, etc., bringing more convenient and more satisfactory results to users. It can be widely used in temperature measurement and control instruments, measurement and control systems and large equipment in industrial, civil, military and other fields.

1.2 Introduction to Proteus and KeilμVision 3

Proteus is an EDA tool software developed by Labeenter electronics in the UK. Proteus is not only a design and simulation platform for analog circuits, digital circuits, and analog/digital mixed circuits, but also the world's most advanced and complete design and simulation platform for various types of microcontroller systems. It truly realizes the complete electronic design and development process from schematic design, circuit analysis and simulation, microcontroller code-level debugging and simulation, system testing and functional verification to PCB formation on the computer. The Proteus product series also includes the revolutionary VSM technology, which can simulate microcontroller-based designs together with all peripheral electronic devices.

KeilμVision 2 is a development tool for Keil's 8051 series MCUs. It can be used to compile C source code, assemble source programs, link and relocate target files and library files, create HEX files, debug target programs, etc. It is an integrated file management and compilation environment. It integrates multiple functions such as file editing, compilation and connection, project management, windows, tool references, and software simulation debugging, and is a very powerful development tool.

1.3 Connection settings between Proteus and Keil

(1) Detect TCP/IP.

(2) Copy the vdm51.dll in the MODELS folder under the Proteus installation directory to the keilc/C51/bin directory.

(3) Modify tools.ini in the Keil installation directory and add TDRV4=BIN\VDM51.DLL.

(4) Draw the schematic in Proteus and select “Use Remote Debug Monitor” in the “Debug” menu.

(5) Open a project in Keil, right-click Target1, and select Op-tions for Target'Target 1'. In the dialog box that opens, select the "Debug" tab, choose to use Proteus VSM Emulator for simulation (as shown in Figure 1), and click "Ok" to complete the Debug settings.

Simulation using Proteus VSM Emulator

In this way, Proteus and Keil are connected, and the simulation results can be seen in Pro-teus or Keil.

2 Circuit Simulation

The circuit system uses the "one-wire bus" digital sensor DS18B20 to collect temperature and uses the LM016L LCD display for data display. First, start Proteus and select the required components from the Proteus component library to draw the circuit diagram and set the parameter values ​​of the corresponding components. The interface circuit schematic is shown in Figure 2.

Interface circuit schematic

After the circuit is drawn, open Keil μVision 2 and create a new project named cewen.uv2. Select Select Device for Target under the Project menu and select AT89C51. Then click Option for Target 'Target1' under the Project menu, select Debug, and use Proteus VSM Emulator to simulate. Then create a new source file cewen.c and write the source program (only the temperature reading function is given):

program

Finally, add the source program file to the current project for compilation. After the compilation is successful, click Start/Stop Debug Session under the Debug menu. Then switch to the Proteus interface and you will find that the circuit has started simulation and you can see the simulation results. Figure 3 and Figure 4 are the interface circuit and display results of the oscilloscope display of the temperature sensor respectively.

Oscilloscope display interface circuit and display results of temperature sensor

Oscilloscope display interface circuit and display results of temperature sensor

3 Conclusion

This paper designs a new temperature acquisition system, which can perform real-time inspection of multi-point temperature through expansion, and each test module can realize its own function. At the same time, the design of the single-chip microcomputer temperature measurement system is virtually simulated and tested by combining Proteus and Keil simulation, and relatively good simulation results and analysis results are obtained. The results show that the combination of Proteus and Keil simulation can greatly simplify the design process of hardware circuits, reduce the development cost of single-chip microcomputer systems, improve efficiency and development speed, and has good practical application and guiding significance.

2009/12/10 20:15:10

Reference address:Design and virtual simulation of single chip temperature acquisition circuit

Previous article:Warehouse temperature and humidity control system based on AT89C2051 (08-100)
Next article:Design of low-cost ECG monitoring system based on C8051F320 microcontroller

Recommended ReadingLatest update time:2024-11-16 17:34

199: Temperature reading of DS18B20
The DS18B20 digital thermometer is a 1-Wire device produced by DALLAS, which has the characteristics of simple circuit and small size. Therefore, it is used to form a temperature measurement system with simple circuit. Many such digital thermometers can be hung on one communication line, which is very convenient. 1. F
[Microcontroller]
199: Temperature reading of DS18B20
DS18B20 Digital Thermometer Microcontroller Interface Application
1. Basic knowledge of DS18B20  DS18B20 digital thermometer is a 1-Wire, or single bus device, produced by DALLAS, which has the characteristics of simple circuit and small size. Therefore, it is very convenient to use it to form a temperature measurement system, which has simple circuit and can hang many such digita
[Microcontroller]
DS18B20 Digital Thermometer Microcontroller Interface Application
Design of DS18B20 driver for temperature sensor based on Linux
  introduction   Traditional analog temperature measurement has poor anti-interference ability and large zero drift of the amplifier circuit, which leads to large measurement errors and makes it difficult to achieve the required accuracy. In practical applications, the use of digital temperature sensors with strong a
[Microcontroller]
Design of DS18B20 driver for temperature sensor based on Linux
AVR Thermometer DS18B20
#include mega48.h    #include delay.h    #include nokia3310.h   #include monobus.h    unsigned char data_H, data_L,wendu;   unsigned int  data_T;   void main(void)   {       LCD_init(); //LCD initialization              lcd_cls(); //Clear screen, cursor back to position      while(1)           {              monobus_i
[Microcontroller]
Wulin teaches you how to use PIC32 (18) single bus DS18B20 temperature sensor
Briefly introduce DS18B20, it is a unique single-wire interface, only one port is needed for communication, 9~12-bit resolution is adjustable (RS), the temperature measurement range is -55°C~+125°C; the measurement range is -10°C~+85°C, the accuracy is ±0.5°C, the alarm temperature can be set, stored in EEPROM, power-
[Microcontroller]
Wulin teaches you how to use PIC32 (18) single bus DS18B20 temperature sensor
AVR M16 Experiment 6 DS18B20 Temperature Measurement
/********************************************************************** * File name: main.c * Program author: kidcao1987 * Program version: V1.0 * Function description: Install LCD1602 and display the current temperature on it. * Compiler: WinAVR-20090313 * Chip: ATmega16, external 11.0592MHZ crystal oscillator
[Microcontroller]
AVR microcontroller collects DS18B20 and displays it on LCD
#include iom16v.h #include macros.h #define uchar unsigned char #define uint unsigned int #define beep_0 (PORTD = PORTD&0x7F) #define beep_1 (PORTD = PORTD|0x80) #define RS_0 PORTC &= ~(1 PC0) #define RS_1 PORTC |= (1 PC0) #define RW_0 PORTC &= ~(1 PC1) #define RW_1 PORTC |= (1 PC1) #define EN_0 PORTC &= ~(1 pc2)
[Microcontroller]
AVR microcontroller collects DS18B20 and displays it on LCD
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号