• Inventory
  • Products
  • Technical Information
  • Circuit Diagram
  • Data Sheet
Technical Information
Home > Technical Information > Sensing Technology > AT89C51/55 constitutes an automatic temperature and humidity monitoring system

AT89C51/55 constitutes an automatic temperature and humidity monitoring system

Source:liaoge
Category:Sensing Technology
2023-05-28 12:02:58
28

1 System Hardware Design

The system structure is shown in Fig. 1. 51 series single-chip computers AT89C55 and AT89C51 produced by ATMEL company are used, in which the host computer uses AT89C55 and the slave computer uses AT89C51. The machine is responsible for 64-point data detection. Temperature and humidity at each detection point are transformed into voltage signals through temperature and humidity sensors and their conversion circuits. After selecting the signal through the matrix network, the resulting signal is sent to the corresponding signal amplification and sorting circuit to amplify, then enter the A/D converter, carry out analog-to-digital conversion, feed the digital quantity into the slave machine, and then send the data from the slave machine to the LED for display, at the same time, transfer to the host AT89C55 regularly; The host machine is responsible for collecting data in each silo (can monitor 50-100 silos), realizing data preservation, printing and calling historical data, and can display the timely temperature, humidity and alarm status of each silo on an itinerary basis.

AT89C55/51 chip is a 51 series 8 bit single-chip computer introduced by ATMEL company. AT89C55 chips mainly contain 20KB Flash memory, 256 bytes of in-chip RAM, 4 8-bit bidirectional addressable I/O ports, a serial interface of full-duplex UART (universal asynchronous receiver transmitter), 3 16-bit timers/counters, multiple priority nested interrupt structures, and an in-chip oscillator and clock circuit.

In this system, the host uses AT89C55 rich 20KB flash memory resources to store real-time measurement information, historical measurement data and other key results, and completes data collection and transmission from the computer. The host is located in the monitoring room, the slave is located in each barn, there is a certain distance between the master and slave. The signal transmission uses serial asynchronous communication. The UART module integrated in AT89C55/51 single-chip computer is suitable for communication with other computer systems and peripheral chips expanded by single-chip computer. It can achieve three working modes: full-duplex asynchronous, half-duplex synchronous master and half-duplex synchronous slave. This system uses its UART module to work in full-duplex asynchronous communication mode, where TX is the sending line and RC is the receiving line, and uses RS-422 drivers and receivers, such as MC3487 and MC3486 chips, to achieve stable signal transmission.

2 Design of sensor and matrix test network

The measurement circuit consists of a sensor, a matrix measurement network, a multiple analog switch and an amplifier circuit. Temperature measurement range: -45 to +45 (+) 0.5 (+) C; The range of humidity measurement is 0~99%RH, ++0.8%RH. Temperature sensor uses integrated temperature sensor AD590M, which is characterized by linear current output 1 μ A/K; Temperature range - 55 - 150 C; Voltage input/current output; Laser was calibrated at +0.5 C (AD590M), and the linearity reached +0.3 C/FS. AD590M can be inserted into the silo when in use. For the range and requirement of humidity measurement, the humidity sensor uses the integrated humidity sensor IH-3602. This is a capacitive humidity sensor with a conditioning circuit and a temperature compensation circuit. It outputs a DC voltage of 0.8-4V and can be directly input to A/D converter via a multi-switch.

The matrix measurement network is composed of multiple analog switches CD4051, CD4052, temperature sensor AD590 and humidity sensor IH-3602. The connection mode is shown in Figure 2. The temperature (humidity) matrix consists of eight analog switches of CD4051, four analog switches of CD4052 and 32 AD590, (32 IH-36021). In the matrix network composed of CD4051, CD4052, AD590 and IH-3602, the seven-bit address codes of four input lines A, B and 3 input lines A, B and C of two CD4052 and CD4051 are provided by the port A, B and C of AT89C51, the INH of CD4052 is directly connected to the high level, while the INH of CD4051 is provided by the port P2, and the OUT of temperature and humidity output signal CD4052 is connected to the temperature and humidity amplifier circuit respectively.

3 System Software Design

The software of the multi-channel temperature and humidity monitoring system is designed with a modular method, which mainly includes two parts: the host program and the slave program. Initialization from machine programming is usually done first, such as setting interrupts, timers, serial ports, initialization of external programmable devices, etc. Then the main functions such as timer, data collection, digital filter, display, and timer transfer of data to the host are performed in a loop. The host receives the acquisition signal sent from the slave at a fixed time, saves it and displays it in real time, and its flow is shown in Figure 3. After power-on reset, different barn position numbers, temperature and humidity values and their measuring time are displayed, and the keyboard management program module and the receiving program module are invoked. In order to prevent the program from running away, the watchdog circuits are designed by the master and slave computers respectively to ensure the normal operation of AT89C55 and AT89C51.

4 Concluding remarks

In this design, because AT89C51/55 single-chip computer is used, the performance is reliable and the circuit is simple, and it is suitable for batch production. Moreover, the system can make full use of unused software and hardware resources in AT8951/55, and the system is redevelopable.



Source:Xiang Xueqin