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.
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.
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.
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.
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.
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.
[page]
3.1 Software SystemThe 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.
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.
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
- Popular Resources
- Popular amplifiers
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Arduino Nano collects temperature and humidity data through LabVIEW and DHT11
- Mission-oriented wireless communications for cooperative sensing in intelligent unmanned systems
- Modern Testing Technology and System Integration (Liu Junhua)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- How often should flying probe test probes be replaced?
- Learn about SPICE for circuit simulation
- Application of RPA in the customer service industry
- FPGA Competition Adventure Detailed Explanation.pdf
- How to use BlueNRG-1 AES encryption library
- Discussion on the matching problem of PA input
- How to use Tracealyzer to visualize the interactive behavior of multiple tasks?
- Efficiency Programming of Single Chip Microcomputer Active Buzzer Driver
- 2021 ON Semiconductor Avnet RSL10 Bluetooth SoC Development and Design Competition Third Post (Revised Routine)
- Frequency Converter Application in Baosteel