1. Introduction
With the continuous advancement of science and technology, in most fields, wired connections can no longer meet the requirements of rapid technological development. Wireless communication is entering various fields of our lives. Compared with wired connections, it has the advantages of being easy to carry, flexible to use, and no need to consider wiring. It has extremely wide applications in wireless alarm, industrial data acquisition, remote control, remote measurement radio frequency IC card, handheld PDA, wireless image transmission, non-stop toll collection, wireless meter reading, etc. The temperature measurement system introduced in this article is also one of the applications of wireless communication systems. It uses SOC microcontroller C8051F020 as the central controller, CC1000 as the wireless transmission module and temperature measurement circuit to form a multi-channel wireless temperature acquisition system.
The 8-channel temperature data is collected and sent wirelessly to the host C8051F020 for processing.
The modulation and demodulation are completed by CC1000. The system adopts frequency shift keying modulation (FSK), the carrier frequency is 433MHz, the bandwidth is 64kHz, and the data is sent using differential Manchester encoding. The data rate sent over the air can be set as needed. When sending, the controller C8051F020 microcontroller receives the acquisition command from the user interface, collects 8-channel temperature signals, and packages the collected temperature data into data frames and transmits them to CC1000, controlling CC1000 to send data.
When receiving, the controller C8051F020 receives the temperature data transmitted from CC1000, performs simple processing and transmits the data to the host computer for detailed analysis and processing. The hardware block diagram is shown in Figure 1 and Figure 2.
2. System hardware design
2.1 Wireless transceiver module
The wireless transceiver module of this design uses the high-performance RF transceiver chip CC1000 of ChipconComponent. It is a single-chip high-frequency wireless transceiver IC with low current consumption, adjustable communication rate, up to 72.8kbit/s, receiving sensitivity of -109dB.m, and adjustable transmission signal power within -20~10dB.m. The circuit is simple in design, the peripheral devices used are few, the coding is simple, and the operating frequency range can be changed within 300~1000MHz by changing the circuit and device parameters. At the same time, the device integrates the transmission power amplifier, FSK modulation/demodulation, low-noise receiving amplifier, mixer, voltage-controlled oscillator, phase detector and other circuits. It is a highly integrated chip that can communicate directly with the single-chip microcomputer. This IC is very suitable for embedding into various measurement or control systems with high low power requirements. We choose the 433MHz frequency band in this system. The internal structure diagram of CC1000 is shown in Figure 3.
2.2 Main control chip C8051F020 and control circuit
C8051Fxxx is a series of 8-bit high-speed system-on-chip (SOC) microcontrollers launched by Cygnal. C8051F020 is one of them. Its CIP-51 and MCS-51 instruction sets are fully compatible and have the following advantages: (1) High speed, with a maximum processing speed of up to 25MIPS; it fully meets the real-time requirements of this design. (2) High integration, with a wide range of analog and digital peripherals integrated on the chip: two multi-channel analog/digital conversion systems, including an 8-bit ADC and a 12-bit ADC, as well as two programmable gain amplifiers and two analog multiplexers; two 12-bit digital/analog conversion systems; two analog comparators; an on-chip temperature sensor; a wide range of bus interfaces including SMBus, UART, and SPI; five 16-bit general-purpose timers; eight 8-bit I/O ports; a 64K FLASH, a 256B internal RAM, and a 4096B external RAM (XRAM); and a watchdog circuit, etc.; these on-chip resources greatly simplify the hardware circuit design of this design and greatly shorten the development cycle. (3) The cross switch makes I/O port allocation more flexible.
Based on the on-chip resources of C8051F020, it can fully meet the real-time acquisition and processing of temperature data at multiple points. The control circuit of C8051F020 to CC1000 is shown in Figure 4.
As shown in Figure 4, the microcontroller C8051F020 uses P3.0, P3.1, and P3.2 to connect CC1000's PDATA (programming data), PCLK (programming clock), and PALE (programming enable) to program, configure, and calibrate CC1000, making it work at 433MHz, with a bandwidth of 64kHz, and data is sent using differential Manchester encoding. P0.2 and P0.3 of the single-chip microcomputer C8051F020 are connected to the DIO and DCLK of CC1000 to send and receive data. The single-chip microcomputer packages the collected temperature data and sends it to the DIO pin of CC1000 through the P0.2 pin. The digital signal input by the DIO pin is frequency-shift keyed (FSK) and sent to the power amplifier, and then transmitted through the antenna of CC1000; the RF signal received by the CC1000 antenna is amplified by the low-noise amplifier (LNA) and sent to the mixer, and then demodulated by the demodulator (DEMCO) into a digital signal and output by the DIO pin. The P0.2 pin of the single-chip microcomputer receives the digital signal of the DIO pin and transmits it to the host computer for analysis and processing.
2.3 Temperature measurement circuit
The temperature measurement amplifier circuit is shown in Figure 5. The temperature measurement part is performed by 8-way K-type thermocouples to convert the temperature signal into a voltage signal. The range of the thermocouple is 40.7uV/C. Since the range of the thermocouple is very small, it needs to be amplified. The amplifier circuit uses the integrated operational amplifier LM224 to form a unidirectional proportional operation circuit for amplification. The collected analog quantity Vi is amplified by the amplifier LM224 to Vo=(1+605/4.99)*Vi. The 8-way amplified analog signal Vo is connected to the analog input terminals AIN0.0~AIN0.7 of the 8-way 12-bit A/D of the SOC microcontroller C8051F020 for analog/digital conversion, and then converted into a temperature value for storage and waiting for wireless transmission.
3. System software design
The software used in this design is Kei C51, and the languages used are C language and assembly language. In order to obtain accurate delay, the delay subroutine is written in assembly language. The following mainly introduces the wireless communication part.
3.1 Design of communication protocol A reasonable communication protocol is the key to reliable wireless data transmission. For point-to-multipoint wireless communication, the protocol used in this design is representative. Since the wireless communication between the transmitter and the receiver is easily disturbed by external noise and generates erroneous data or data loss, this design packages the data to be sent and then sends it. The data organization format is shown in Figure 6.
The data packet format is OxAA OxAA 0xAA 0xAA 0x330xCC address data…data checksum, where 4 0xAA are the synchronization header and 0×33 0xCC is a special identifier. Since the probability of OxAA followed by 0×33 0xCC in noise is extremely small, 0×33 0xCC is sent after 4 OxAA as the identification header. Each time, only data with 4 OxAA 0×33 0xCC as the identification header is received, and then the address is sent. Each slave has a unique address. When receiving, the slave only receives packets with the same address as its own. Finally, the checksum method is used to ensure the reliability of the data.
3.2 Main program design process
The communication is initiated by the host computer. When communication is needed, the host computer first sends a synchronization header, then sends an address and then waits for the response from the lower computer. The lower computer communicates with the host computer by interruption, that is, the lower computer checks whether there is synchronization header information on the side every time it receives a data packet. If there is no synchronization header information, the wireless communication module goes into sleep mode; otherwise, the lower computer receives information from the host computer: if the received address is the local address, the data is analyzed and processed, otherwise it goes into sleep mode. Although this communication method is slow, it greatly reduces the power consumption of the lower computer and prolongs the battery life of the lower computer. The program flow chart is shown in Figure 7.
CC1000 has high requirements for both hardware and software. To achieve good wireless communication effects, you need to pay attention to the following points:
(1) The power supply filtering should be good. The microcontroller C8051F020 and CC1000 are powered by two power supplies. The power chip uses the LDO TPS7133Q chip to prevent crosstalk and ensure the stability of the output voltage.
(2) When laying out the PCB, RF and LF components should be laid out separately. The capacitors and inductors related to CC1000 should be placed closely around CC1000 to increase the grounding area and communication reliability of CC1000.
(3) The delay of mode switching must be sufficient.
4. Conclusion
This solution uses the C8051F020 microcontroller and the wireless transceiver chip CC1000 to realize the collection and wireless transmission of 8-channel temperature data. From the experimental results, it can be seen that the system meets the requirements of the wireless temperature measurement system well and effectively reduces the power consumption and volume of the system.
Previous article:Digital voltmeter based on ADC0809
Next article:Development and application of USB3.0 bus technology based on CYPRESS
- Popular Resources
- Popular amplifiers
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- 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
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Three steps to govern hybrid multicloud environments
- Three steps to govern hybrid multicloud environments
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- HuaDa HC32A460 Series Introduction (Part 3)
- Let's take a look at the 3D SmithChart made by experts
- RVB2601 development environment setup and the first program
- 15 "Wanli" Raspberry Pi car - photoelectric encoder learning (forward and reverse judgment)
- A TOF "image" sensor that is worth playing with, VL53L5CX
- ARM immediate number explanation--the difference between LDR and MOV
- i.MX283 latest virtual machine system guide
- TI C5000 compiler error message list
- TI Award-winning Live Broadcast: Talking about "packaged antenna" smart millimeter wave sensors, even novices can handle industrial robots
- The voltage of the TPS73033 buck chip drops to 0.7V after the load is connected