Design of temperature and humidity monitoring system based on PIC microcontroller

Publisher:一条属马的龙Latest update time:2012-03-17 Source: 电子科技 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
0 Introduction
With the development of science and technology, many emerging industries have put forward higher requirements for the environment: the manufacture of large-scale integrated circuits requires extremely high air cleanliness, and biochemical pharmaceuticals require precise temperature and humidity control. Therefore, the monitoring and control of temperature, humidity and some basic data have become very important technical requirements in the production process.
PIC microcontroller (Peripheral Interface Controller) is launched by Microchip Corporation of the United States. Due to its convenient hardware system design, refined instruction system design, reduced instruction set and Harvard bus structure, it has the advantages of high speed, low power, large drive current and strong control ability, which can meet the various needs of users, so it has been widely used.
This paper proposes a measurement and control system designed and implemented using PIC single chip. First, the example content is described.

1 System composition
The design content of this system is divided into two parts: measurement and control of temperature and humidity.
1.1 Temperature and humidity measurement part
The temperature and humidity measurement part is shown in Figure 1, which consists of a sensor, a signal conditioning front end, an A/D analog-to-digital conversion part and a wireless transceiver module.

a.jpg


1.2 Temperature and humidity control feedback part
Control feedback means that the control core MCU determines the current state through a specific algorithm based on the collected data, and outputs corresponding instructions to control specific modules to control temperature and humidity. The system structure block diagram is shown in Figure 2.

b.jpg



2 System Hardware Design
2.1 Selection of Temperature and Humidity Sensors Temperature
and humidity sensors can be roughly divided into two categories: analog temperature and humidity sensors and digital temperature and humidity sensors.
The output of analog temperature and humidity sensors is usually a linear signal such as current and voltage. It needs to be digitized through the signal front-end conditioning circuit and A/D conversion circuit before it can be input into the PIC control core for calculation. Common models of this type include: thermistor, thermocouple, AD590 produced by ADI, MAX6613 produced by Maxim, etc.
The digital temperature and humidity sensor integrates sensors, conditioning circuits and A/D conversion circuits internally. It can directly output digital signals or directly connect to the PIC microcontroller. Commonly used digital temperature and humidity sensors include DS18B20 produced by Dallas, ADT75 produced by ADI, etc.
This system uses AD590 produced by ADI, and its main features are as follows:
(1) Linearized current output: 1μA corresponds to 1 K (K is the absolute temperature and humidity unit).
(2) Wide temperature and humidity measurement range: -55~+150℃.
(3) Excellent linearity: ±0.3°C in the full temperature and humidity range.
(4) Wide power supply range: 4 to 30 V.
(5) Low price. [page]

2.2 PIC microcontroller hardware
PIC microcontroller is the control core, and its minimum system principle is shown in Figure 3. In Figure 3, PIC16F877 is connected to the power supply voltage (+5 V and GND), reset circuit and crystal oscillator circuit, and it can work normally, which is simple and easy to use.

c.jpg


2.3 A/D conversion chip
ICL7135 is a four-and-a-half-bit dual-integral A/D converter with the advantages of high precision (equivalent to 14-bit binary number), low price, strong anti-interference ability, etc. This system uses ICL7135 for serial data acquisition. This method has a simple structure, concise programming, and occupies less microcontroller resources. The number of pulses is counted by the timer T0 of the microcontroller PIC16F877. The frequency used by timer T0 is 1/12 of the system crystal oscillator frequency. In order to synchronize the counting pulse of timer T0 with the pulse required for the operation of ICL7135, the BUSY signal of ICL7135 can be connected to the PSP5 pin of PIC16F877. At this time, whether timer T0 works will be controlled by the BUSY signal. When ICL7135 starts working, that is, when the BUSY signal of ICL7135 jumps high, timer T0 starts working.

d.jpg


The interface circuit between ICL7135 and MCU is shown in Figure 4. The signal of ALE terminal of MCU is divided by 4 through D flip-flop and connected to CLK terminal of ICL7135. In this way, the number of pulses recorded by timer T0 is twice the number of pulses measured by ICL7135. The number of pulses recorded by the timer is divided by 2 to get the number of measured pulses. Then the number of measured pulses is subtracted by 10001 to get the result of A/D conversion, thus getting the measured analog quantity. The implementation of these conversions is all done in software, so it is very simple.

[page]

2.4 Wireless transceiver chip nRF24E1
nRF24E1 is a high-speed single-chip wireless transceiver module with a high-performance microcontroller core, developed by Nordic in Norway in 2003. It uses QFN packaging and integrates RF transmission, reception, GMSK modulation, demodulation, enhanced 8051 core, 9-input 12-bit ADC, 125 channels, UART, SPI, PWM, RTC, and WDT into a single chip. The internal structure of the chip is shown in Figure 5.

e.jpg


The main components are:
(1) Microprocessor: Enhanced 8051 core.
(2) Programmable PWM output.
(3) SPI interface: The SPI bus of nRF24E1 contains 3 serial lines (SDI, SCK and SDO).
(4) RTC wake-up timer, WTD and RC oscillator.
(5) A/D converter: The nRF24E1 A/D converter has a 10-bit dynamic range.
(6) Wireless transceiver: nRF2401 operates in the globally open 2.4-2.5 GHz frequency band. The transceiver consists of a complete frequency synthesizer, a power amplifier, a regulator and two receivers. (7)
Power management: Under program control, nRF24E1 can enter POWER DOWN power saving mode, at which time the current consumption is only 2μA. External interrupts and watchdog resets can cause the system to exit power saving mode. (8)
Anti-interference ability: It is easy to introduce a frequency hopping mechanism using the nRF24E1 chip, and use frequency point avoidance to reduce the impact of co-frequency interference.

3 System software design
The software part includes several modules such as initialization, A/D data acquisition, threshold judgment, and control input/output. The overall structure is shown in Figure 6.

f.jpg

[page]

3.1 Software System
The PC software of this system adopts the graphical programming language LabVIEW platform of NI Company in the United States. This platform is an excellent software in the field of measurement and control, known as the language of engineers, which can speed up product development.
LabVIEW is the abbreviation of laboratory virtual instrument integrated environment. It is the most widely used, fastest growing and most powerful graphical software development integrated environment, which abandons the complexity of traditional development tools. LabVIEW integrates a wide range of data acquisition, analysis and display functions in the same environment, and is powerful.
The control interface and block diagram program written by LabVIEW are shown in Figure 7 and Figure 8.

g.jpg



4 Conclusion
This article introduces a complete design scheme for temperature and humidity measurement and control system, including device selection, hardware design, software design, and code comments. The built-in ADC module on the PIC microcontroller is used. When designing by yourself, users can consider replacing it with an external high-precision or high-speed ADC device to improve accuracy and speed; they can also use newer and better sensors to simplify the subsequent circuit design and achieve the purpose of improving performance.

Reference address:Design of temperature and humidity monitoring system based on PIC microcontroller

Previous article:PIC microcontroller software asynchronous serial port implementation skills
Next article:Design of Grain Weighing System Based on PIC18F4580

Recommended ReadingLatest update time:2024-11-17 00:08

Labview implements pulse wave modulation (PPM)
Pulse Width Modulation Generate a sine signal and get the offset of its amplitude input to a square wave signal. Since the offset of the square wave signal contains the information of the sine signal , the waveform can be restored by triggering the rising or falling edge of the square wave signal. Achieve results
[Test Measurement]
Labview implements pulse wave modulation (PPM)
Frequency stability measurement based on LabView virtual instrument
IntroductionTime  and frequency measurement is an important field of electronic measurement. To achieve time and frequency measurement, a good frequency source is needed. Among various frequency sources, especially for crystal oscillators, the stability problem is the most concerned issue, which indicates the abilit
[Test Measurement]
Frequency stability measurement based on LabView virtual instrument
NI LabVIEW Develops Real-Time Control System for World's Largest Telescope
introduction The European Southern Observatory (ESO) is an astronomical research institute supported by 13 European countries. We have developed and deployed some of the most advanced telescopes in the world. We currently have three sites in the Chilean Andes: La Silla, Paranal and Chajnantor. We are always using in
[Test Measurement]
NI LabVIEW Develops Real-Time Control System for World's Largest Telescope
Top 5 Mistakes LabVIEW Newbies Make
 While NI LabVIEW software has long helped engineers and scientists quickly develop functional measurement and control applications, not all new users follow LabVIEW programming best practices. LabVIEW graphical programming is unique because it is immediately apparent whether or not you are following coding best practi
[Test Measurement]
Top 5 Mistakes LabVIEW Newbies Make
Design of Multi-purpose Virtual Voltmeter Based on LabVIEW 8.2
O Introduction Virtual instrument is a new type of instrument developed with the development of computer technology, electronic measurement technology and communication technology. It makes full use of the powerful data processing and display capabilities of computer systems, uses software to complet
[Test Measurement]
Pay attention to the data representation format in LabVIEW
In this little program, I found that   the output of the multiplication is always incorrect. It is always much smaller than its value. At first I didn't notice it was a data format issue. Then we right-click the output contact and a dialog box like this will pop up The representation shows U16 and the maxi
[Test Measurement]
Sampling Theorem in LabVIEW 8.2
  Before data acquisition, it is necessary to determine how many data points to collect within a fixed period of time, that is, to determine the sampling frequency. The sampling frequency is a very important parameter. To determine the appropriate sampling frequency, it is necessary to comprehensively consider factors
[Test Measurement]
Sampling Theorem in LabVIEW 8.2
Piezoelectric ceramic actuator drive power supply based on LabView8.5 and PA96
Piezoelectric ceramic actuators are new micro-displacement devices developed in recent years. They have the characteristics of small size, large thrust, high precision and displacement resolution, and fast frequency response. It is noiseless and heat-free during use, and is an ideal micro-displacement device. It has
[Analog Electronics]
Piezoelectric ceramic actuator drive power supply based on LabView8.5 and PA96
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号