In order to improve the cost performance of the system, this paper proposes a low-cost temperature and humidity acquisition solution based on CXA1191, which is mainly aimed at application requirements with high precision, small data volume, large number of nodes and cost sensitivity. This solution combines broadcast reception technology with modern digital technology. On the basis of in-depth research on the principle of CXA1191 receiving circuit, it combines encoding devices and single-chip microcomputer systems to realize low-cost wireless transmission of digital signals. The system uses high-performance SHT11 temperature and humidity sensors to measure temperature and humidity. It uses its high integration characteristics to simplify the design, reduce costs, and improve the practicality of the system.
1 Overview
The temperature and humidity acquisition system adopts a master-slave distributed structure. The system consists of a PC, a convergence node and multiple wireless sub-nodes distributed in different locations. The convergence node and the sub-nodes use wireless communication, and the PC communicates with the convergence node through the RS232 bus. The convergence node obtains the on-site temperature and humidity parameters from each sub-node, and uploads the collected data to the PC for processing and display via the RS232 bus. The node consists of transmitting and receiving circuits, encoding circuits, single-chip microcomputer systems, keyboards and displays. The transmitting circuit is built with discrete components and adopts AM modulation. The receiving circuit uses CXA1191 to amplify, mix and filter the RF signal, and convert the wireless signal to the intermediate frequency. The intermediate frequency processing is completed by the detection circuit and the encoding and decoding circuit. The system structure and node structure are shown in Figure 1 and Figure 2. The RS232 communication function in Figure 2 is only unique to the aggregation node, and the SHT temperature and humidity acquisition device is only unique to the sub-node.
2 Receiving Circuit
At present, wireless data communication is mostly implemented by dedicated modules, and there are many wireless data transmission modules available on the market. These dedicated modules are simple to use and fully functional, so even designers with less experience in RF development can quickly get started. The disadvantage is that the price is high, and the cost performance is not ideal when facing applications with small data volume, low functional requirements and a large number of nodes. However, if you design the circuit yourself, it is often difficult to implement due to the high difficulty of RF design, large debugging workload and lack of experience of designers. The receiving circuit structure is the most complex. Taking the above factors into consideration, this article adopts a compromise solution, that is, using the internal circuit of CXA1191 with a few external components, which not only realizes the function of RF reception, but also simplifies the structure. Developers only need basic radio knowledge to complete the design independently.
CXA1191 is a single-chip large-scale radio circuit. It is quite popular in China because of its high integration, few peripheral components and excellent performance. Most of the popular "Tesun" radios use this chip. CXA1191 includes all the functions of AM/FM radio, from antenna input, high frequency amplifier, mixing, local oscillator, intermediate frequency amplifier, detection to audio power amplifier. Figure 3 shows the FM circuit of CXA1191 used in the design (the detection and decoding part in the figure is an extension of this design).
When the CXA1191 is in the FM receiving state, the wireless signal first passes through the bandpass filter, and then enters the 12th pin to complete the high-frequency amplification internally. The amplified signal is mixed with the local oscillator to produce a 10.7 MHz intermediate frequency signal. In the normal radio mode (as shown by the dotted line in the figure), the intermediate frequency signal is selected by the 10.7 MHz ceramic filter and connected to the 17th pin. After internal frequency discrimination, detection and audio amplification, the speaker is driven to produce sound.
Through the above analysis, it is not difficult to find that the structure of the CXA1191 can be divided into two parts: 1) low noise amplifier, mixing, filtering part (that is, the circuit for obtaining the 10.7 MHz intermediate frequency signal), which is the general structure of a general superheterodyne receiver; 2) frequency discrimination, detection and amplification, which is its proprietary structure for audio signal demodulation processing. Its general structure can be used as the RF front end of digital communication. For example, if there is an ASK (amplitude shift keying) signal with a carrier frequency within 87 to 109 MHz, the signal can pass through the bandpass filter and enter the high-frequency amplifier and mixing circuit. By properly adjusting the local oscillator, a 10.7 MHz ASK signal can be obtained at the output of the ceramic filter. This signal still retains the original modulation information, but the carrier frequency is reduced. This is exactly the intermediate frequency ASK signal we want to obtain. After detecting and decoding this signal, we can get the required digital signal. Experimental verification shows that this idea is feasible.
The specific design is shown in Figure 3. The modification method is very simple. On the basis of the original CXA1191 frequency modulation circuit, disconnect the connection between the 10.7 MHz filter and pin 17, and connect the output of the filter to the detection circuit behind. Other functions of CXA1191, such as medium wave and short wave reception, are not used, and the circuits associated with them can be omitted, which greatly reduces the task of design and debugging. In actual debugging, it is necessary to pay attention to properly adjust the two tuning circuits of the high-frequency amplifier and the local oscillator, and observe the output of the ceramic filter at the same time, and try to maximize the output amplitude and minimize the noise and distortion.
3
When the transmitting circuit sends data, the microcontroller first sends the data to be sent to PT2262 for encoding. The 17th pin of F12262 outputs the encoded pulse, and the high-frequency oscillator generates an ASK signal under this pulse modulation and transmits it through the antenna. As shown in Figure 4. The pulse signal controls the base of the transmitting tube to turn on and off, and the output amplitude of the oscillator also changes accordingly, and there are only two states of maximum value and zero value, that is, the required ASK signal is obtained. The oscillator is connected in a Clapper form, in which the base-emitter capacitor and the collector-emitter capacitor are used. The surface acoustic wave device SAW frequency stabilization is used to make the circuit very stable. SAW works in a series resonant state, so that part of the inductance of L1 is connected to the base-collector to form a capacitor three-point oscillator. The formula for calculating the operating frequency of the oscillator is , and this design sets the oscillation frequency at 90MHz.
4 Encoding and
decoding circuit The encoding and decoding function is completed by PT2262/PT2272. PT2262/PT2272 is a pair of wireless transmitter and receiver chips with address and data encoding functions. Its 7, 8, 10 to 13 pins are data terminals, 1 to 6 pins are address terminals, and the transmission is started when the 14th pin is low level. The 17th pin serially outputs the coded pulse signal containing the address and data. Figure 5 is the decoding circuit.
During decoding, the ASK signal from the 10.7 MHz filter is first detected by VD, C1, and R2, and then amplified by LM358 and sent to the decoding input pin 14 of PT2272. When decoding is successful, VT changes from low to high, and the decoded data appears on the data pin for the microcontroller to read. It should be noted that the address code settings of the transmitting and receiving chips must be the same. PT2272 must perform two address comparisons on the received signal. Only when the address is correct can there be valid data output.
5 Temperature and humidity acquisition circuit
The temperature and humidity acquisition is based on SHT11, which is a new temperature and humidity sensor based on CMOSensTM technology launched by Sensirion. SHT11 integrates temperature sensor, humidity sensor, signal conditioning, analog-to- digital converter , calibration parameters and I2C bus interface into the sensor, which not only improves the performance of the sensor, but also reduces the cost and size. It is also very convenient to interface with the microcontroller, and is an ideal choice for embedded system temperature and humidity testing.
The SHT11 interface is very simple, including only four pins: power supply (Vdd), ground (GND), serial clock input (SCK), and serial data (DATA). Each measurement requires three processes: "start transmission", "send command", and "read data". DATA changes state after the falling edge of SCK and is valid at the rising edge of SCK.
"Start transmission" is used to initialize SHT11, which is completed by a specific timing of SCK and DATA, as shown in Figure 6. At the rising edge of the SCK clock, DATA flips to a low level, and when the next SCK rising edge arrives, DATA flips to a high level, thus completing the "start transmission" timing.
The next command to be sent is a 1-byte command, including 3 address bits and 5 command bits. The transmission of the command requires 8 SCK cycles. After the command transmission is completed, SHT11 will give a DATA low-level pulse between the 8th and 9th SCK falling edges to indicate correct reception.
If a measurement command is sent ("00000101" represents relative humidity RH, "00000011" represents temperature T), the external controller must wait for the measurement to end. SHT11 indicates the end of the measurement by giving a DATA low-level pulse. Then transmit 2 bytes of measurement data and 1 byte of CRC parity. The external controller needs to confirm each byte by pulling down DATA to a low level. The data transmission timing is shown in Figure 7.
After obtaining the digital value of temperature and humidity, it is necessary to convert it into actual physical quantity according to the formula provided in the SHT11 manual. The temperature sensor of SHT11 uses the bandgap material PTAT, which has excellent linear performance. The digital value can be directly converted into temperature value according to the following formula:
Where SOT is the measured value, and the values of d1 and d2 are shown in Table 1.
The humidity sensor is nonlinear and needs to be calculated using the following correction formula:
SORH is the relative humidity measurement value of the sensor, and the values of the coefficients c1c2c3 are shown in Table 2.
When the actual measured temperature is significantly different from 25°C, the temperature correction coefficient of the humidity sensor should be considered:
the temperature correction coefficient is shown in Table 3.
6 The system control
node is based on the single-chip microcomputer system, which controls the coordinated work of each functional unit. The single-chip microcomputer has four main control tasks:
1) Control the transceiver circuit to complete the reception and transmission of data;
2) Interpret the command sent by the aggregation node into the corresponding control action (sub-nodes have it), collect and store the data of each sub-node (master node has it);
3) Timing control SHT11 to complete the temperature and humidity data collection:
4) Communicate with the PC and upload the temperature and humidity data.
The single-chip microcomputer selects the low-power MSP430 . MSP430 is a 16-bit, ultra-low-power hybrid single-chip microcomputer with a reduced instruction set. It has extremely low power consumption, rich on-chip peripherals and convenient and flexible development methods, and is very suitable for embedded applications.
The aggregation node and the sub-node adopt a simple master-slave communication protocol. The aggregation node sends a query command containing the node address code to each node in turn at regular intervals. The slave nodes are all programmed with different addresses, and only respond to commands that match their own addresses, and send the collected temperature and humidity data back to the master node. In order to improve the anti-interference ability of the system, an error retransmission mechanism is introduced in the software. After the aggregation node sends a query command to the child node, if no data is received within the specified time, the query command is initiated again. If the query fails three times, the node is considered to be faulty and the node number is recorded. After obtaining
the data from each slave node, the aggregation node packages the data and uploads it to the PC. The PC uses VC6.0 to design the host computer software, uses the MSComm control to realize serial port communication with the aggregation node, realizes the temperature and humidity display interface, and performs digital filtering on the measured data to effectively improve the measurement accuracy. The software flow charts of the aggregation node and the master node are shown in Figures 8 and 9.
7 Conclusion
Wireless temperature and humidity measurement is widely needed in the field of industrial and agricultural production. Solutions based on dedicated wireless modules are difficult to meet low-cost application requirements. This paper proposes a new idea of using CXA1191 to implement the RF front end, combining digital technology and high-performance SHT11 temperature and humidity collectors to design a wireless temperature and humidity measurement system with high cost performance. After actual testing, the system works stably. The data accuracy is within 3%, which can well meet the actual application needs.
Previous article:Application of CPCI Single Board Computer in Airbus Inflight Entertainment System
Next article:Research on the Automobile Remote Monitoring System Based on GPRS
- Popular Resources
- Popular amplifiers
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
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Prize live broadcast: TI takes you to learn mobile robots. This Friday at 10 am, make an appointment to watch and there will be a surprise~
- Altium Designer AD special-shaped plate layout skills
- Download Win Gift | Artesyn PMBus Interface Non-Isolated Digital DC-DC Converter
- TO92S enclosed 3-pin direct plug-in components have a pin spacing of only 0.45mm, and occasionally a short circuit will occur between the two pins after soldering
- [Erha Image Recognition Artificial Intelligence Vision Sensor] 3: Erha Image Recognition Vision Sensor and STM32 Communication to Realize Color Recognition Experiment
- The actual circuit does not match the simulation circuit. I don't know why. Please tell me. Thank you. The actual op amp is OP297.
- What is HAu(CN)2?
- How should the size of the drone be determined?
- Medical beauty industry, ultrasonic transducer
- Introduction to the Internet of Things Protocol Coap Protocol