0 Introduction
The temperature and humidity monitoring system is a field environmental control system widely used in environmental testing, scientific research (such as planting, breeding, bioengineering, chemical engineering), industrial production and other fields. It can simulate various environmental conditions, that is, accurately control the temperature and humidity of the environment according to actual requirements, creating good environmental conditions for studying different biochemical processes. Therefore, the temperature and humidity monitoring system is widely used in scientific research, modern agriculture, medicine, metallurgy, chemical industry, forestry, environmental science and biological genetic engineering.
In order to meet the needs of chemical industrial processes for environmental conditions, we have done a lot of research and feasibility analysis on sensor intelligent control solutions and specific applications, and developed a temperature and humidity monitoring system with intelligent functions. The system consists of a data acquisition module and an interface module. The data acquisition module adopts a structural framework with a single-chip microcomputer AT89S52 as the core and an external sensor, which ensures the real-time and accuracy of the system's acquisition of field temperature and humidity signals. The interface module uses the USB -CAN conversion interface module, which is at the forefront of the current communication field, to provide a solid communication guarantee for the real-time performance of the entire system, and the author believes that this communication method has become the development direction of industrial communication.
1 Hardware circuit design of temperature and humidity acquisition
module The hardware circuit of the temperature and humidity acquisition module consists of the SJA1000 controller of the CAN bus , the TJA1050 transceiver , the temperature sensor ADS90, the humidity sensor HM1500 and the single-chip microcomputer TA89S52 chip. Its circuit block diagram is shown in Figure 1.
1.1 Temperature detection circuit
The core of the temperature detection circuit adopts the two-terminal integrated temperature- current sensor AD590 produced by the American AD company. The device is small in size, light in weight, stable in performance, small in nonlinear error, convenient in calibration, good in interchangeability, extremely low in power consumption, and suitable for dynamic temperature testing and long-distance temperature measurement. The design of the temperature signal acquisition circuit is shown in Figure 2.
In terms of sensor output signal processing, since the measured value contains certain interference signals, the amplifier chip LM324 and the voltage regulator tube D are used to perform secondary processing on the measured signal. The power supply voltage range of AD590 is 4 to 30 V, which can withstand 44 V forward voltage and 20 V reverse voltage, so the device will not be damaged even if it is reversely connected. The voltage regulator D1 is connected to an adjustable resistor to ensure the input voltage at point A (i.e., the inverting end of the amplifier); the voltage regulator D2 limits the voltage and current provided by the power supply, and by connecting an adjustable resistor, the input voltage at point B (i.e., the non-inverting end of the amplifier) is ensured. Moreover, by appropriately changing the resistance values of R8 and R9, the linear amplification factor of the output voltage can be changed.
1.2 Humidity detection circuit
The humidity detection circuit uses an integrated temperature sensor HM1500, whose output voltage varies linearly with temperature between 1 and 4 V. Since the design uses a single power supply structure, the humidity signal acquisition circuit design is shown in Figure 3.
The linear voltage output integrated humidity sensor HM1500 is designed and manufactured using the humidity sensitive resistor HS1101. Its humidity measurement range is 5% to 99% (relative humidity); the relative humidity accuracy is 3%; the operating temperature is -30 to +60℃; the operating humidity range is 0% to 100% (relative humidity); the power supply voltage is 5 V (the maximum voltage is DC 16 V); the output DC voltage is 1 to 4 V; the response time is 5 s, which is suitable for dynamic temperature measurement.
Since there is no negative pressure in this circuit, the main body of the circuit adopts a differential subtraction circuit. The gain can be adjusted by setting the four precision resistors R3, R4, R6, and R7. The calculation formula for its output voltage is:
R1 in Figure 3 can be used to eliminate the error caused by sensor differences.
2 CAN bus interface circuit
This system selects the CAN bus controller SJA1000 and the transceiver TJA1050 of PHILIPS Company. Considering that SJA1000 is an independent CAN bus controller and supports CAN 2. OA and CAN 2.0B protocol, the communication rate can reach 1 Mb/s, which can meet all the requirements of the communication protocol. JA1050 is the interface between the CAN bus controller and the physical bus. It is a standard high-speed CAN transceiver, which can provide differential transmission performance for the bus and differential reception performance for the CAN controller. SJA1000 is mainly responsible for the work of the data link layer, and sends the information in the transmission buffer to TJA1050 after processing. The data is placed in the receiving buffer after processing and waits for the microprocessor to read. The block diagram of the CAN bus interface circuit is shown in Figure 4.
3 USB-CAN conversion module interface circuit
Since the computer does not have a dedicated CAN bus interface, it is necessary to design a module unit to convert the data on the CAN bus into USB interface data. One end of the module is connected to the USB interface of the monitoring computer, and the other end is connected to the CAN bus network interface. This system design uses Atmel 's ATmega 162 chip. The bus controller SJA1000 realizes the sending and receiving of CAN data, and the receiving mode still uses the interrupt mode; the USB communication control chip FT245BM realizes the sending and receiving of USB data; ATF16V8 is responsible for encoding the addresses of the two interface chips. The structure diagram of the USB-CAN conversion module is shown in Figure 5.
4 System software design
The system software mainly includes: monitoring PC communication processing software, temperature and humidity control algorithm software and field measurement and control node data acquisition and processing software. The software system adopts modular design and is divided into several relatively independent functional modules. Appropriate entry and exit parameters are arranged for each module, so that the interconnection and combination between modules are flexible and convenient. The system software module mainly consists of data acquisition, linearization correction of temperature sensor, keyboard input, measurement data display, output control, CAN bus communication, etc. Each module coordinates work under the scheduling of the monitoring program.
4.1 Communication processing software
uses Window XP SP3 as the platform and VC++ language for programming. It includes functional modules such as system parameter setting, monitoring status setting, data sending and receiving, local status query, upper and lower limit alarm, interrupt receiving data management, etc. The monitoring PC first initializes the CAN bus adapter and itself, and then sends a command to notify a specific node to send data to the CAN bus. After conversion through the CAN bus adapter, the monitoring PC performs corresponding processing according to the actual situation. The monitoring PC uses a timed cycle scanning method to issue commands to each node and uses an interrupt method to receive data.
4.2 Node software
The node software consists of three parts: initialization, data transmission and data reception. The initialization program is placed at the front end of the main program. Considering the system's requirements for program operation efficiency, data transmission and data reception are performed in interrupt mode. When the monitoring PC requests data acquisition, the temperature and humidity of the area where the sampling point is located and the CAN node status data are transmitted to the host computer to complete the sampling and control algorithm of the temperature and humidity sensor.
5 Conclusion
The intelligent sensor based on the CAN bus realizes the automatic measurement of temperature and humidity in the industrial process, which is conducive to the realization of automation.Remote temperature and humidity control, maintaining the ambient temperature and humidity in line with process requirements, provides an efficient means of measurement and control. The use of USB-CAN data conversion makes the data transmission rate far exceed the traditional RS 232 conversion, and supports "hot plug and unplug", which is easy to use and has a wide range of application prospects.
Previous article:Design of high-power LED intelligent lighting control system
Next article:51 Hidden Initializer
- Popular Resources
- Popular amplifiers
- Mission-oriented wireless communications for cooperative sensing in intelligent unmanned systems
- Safe, Autonomous and Intelligent Vehicles (Huafeng Yu, Xin Li, Richard M. Murray etc.)
- Autonomous Vehicles Intelligent Transport Systems and Smart Technologies (Nicu Bizon, Lucian Dascale
- Application of radar remote sensing in intelligent transportation
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- 《GaN Transistors for Efficient Power Conversion》
- Pad hole attribute problem
- Power Amplifier Modules and Their Role in 5G Designs
- Learn more about the SimpleLink MCU Platform Tools and Development Kits (Rev. B)
- What is the use of electronic instruments in production process? It seems useless.
- [Anxinke NB-IoT Development Board EC-01F-Kit] 1. Unboxing
- Thinkpad Advanced Docking Station 40A80045CN Disassembly & Minor Modification (2)
- [Mill Edge AI Computing Box FZ5 Review] Real-time Video Filling
- How to learn this new skill? I want to use the HAL library of STM32 and I want to use cubemx software
- Dissecting a small chip