Distributed detection method of vibration signal based on C8051F020 and MXA2500GL sensor

Publisher:灵感火花Latest update time:2014-11-12 Source: 21icKeywords:C8051F020  MXA2500GL  sensor Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
        Introduction 

        Due to the distance limit of the connecting cable of the acceleration sensor and the charge amplifier, it is difficult to implement a centralized data acquisition and processing system in a space with a long distance, and its reliability and anti-interference problems are difficult to solve. Distributed detection method is often used: that is, multiple data acquisition sites are set up, each site uses a separate data acquisition and processing system, and each site is connected to each other through network communication, and then a system machine performs centralized data processing to extract relevant feature information. 

        Performance characteristics of C8051F020 microcontroller 

        CYGNAL's C8051F020 is a mixed signal system-level SOC (System On Chip) microcontroller integrating analog and digital signals, which is fully compatible with the currently commonly used 51 series microcontroller instruction set. It uses a 100-pin TQFP package, which is small in size and fast in computing speed. It uses CYGNAL's patented CIP-5l microprocessor core. CIP-5l takes a new approach to improve the speed of 805l, that is, it tries to implement pipeline operation for instruction operation while keeping the CISC structure and instruction system unchanged. In this mode, the concept of machine cycle is abolished, and instructions are run in clock cycles. On average, one single-cycle instruction can be executed per clock, which greatly improves the instruction running speed.

        Compared with 8051, the single-cycle instruction running speed of C8051F020 is 12 times that of the original under the same clock, and the average running speed of the entire instruction set is 9.5 times that of the original 8051, making the CYGNAL microcontroller series enter the ranks of 8-bit high-speed microcontrollers. At the same time, the C8051F020 microcontroller continues the priority digital cross switch configuration technology unique to the C8051F series. The core of this technology is to configure the port I/O pins for the internal digital resources in hardware. Unlike standard multiplexed digital I/O, this structure can support more functional combinations. PCA, comparators, timers, etc. are assigned to the selected port according to priority. Users can also allocate I/O pins only for the digital resources used. Any port I/O that is not configured for use is combined together as GPIO. 

        Performance characteristics of MXA2500GL accelerometerMXA2500GL 

        is a dual-axis absolute analog output accelerometer produced by MEMSIC's patented technology. It can measure dynamic acceleration (such as vibration) and static acceleration (such as gravity acceleration) on both axes based on the principle of thermal convection, so it is widely used in automotive stability control, safety control, approach angle control, blood pressure monitors, electronic compass tilt correction, digital cameras, elevators and other fields. Unlike ordinary piezoelectric accelerometers, MXA2500GL is actually a monolithic integrated circuit manufactured according to standard CMOS technology. Its output is a voltage signal of 0.1~4.9V (in the case of 5V power supply), which can be directly connected to the A/D card without a charge amplifier, so the entire test system is not only compact in structure, but also very anti-interference. The

        basic working principle is: a gas heat source is suspended in the cavity in the center of the silicon wafer, and aluminum/polysilicon thermocouples are evenly placed at the four diagonals of the heat source (i.e., the two axis directions). When the acceleration is zero, the temperature gradient of the heat source is symmetrical, so the temperature of the four thermoelectric piles is the same, so the two axis directions output the same voltage. Acceleration in any direction will disrupt this balanced temperature form, making the temperature gradient of the heat source asymmetrical. According to the free convection principle of heat conduction, the temperature of the four thermoelectric piles and their output signal - voltage are different. However, these voltage signals change proportionally with the acceleration. In this way, the value of acceleration can be determined by measuring the voltage. There are two identical acceleration signal channels on the sensor, one measuring the X direction and the other measuring the Y direction. Figure 1 shows its basic structure. Figure 1

Structure diagram of MXA2500GL acceleration sensor 

        Hardware architecture of the distributed detection system 

        The system uses the C8051F020 microcontroller as the slave and the PC as the host. Because the microcontroller is small in size, powerful in function and low in price, it has a very high cost performance. At present, mainstream PCs have two standard RS-232 serial ports, which use EIA level, while the TX pin (sending data) and RX pin (receiving data) of the C8051F020 microcontroller use TTL level. For reliable communication between the two, a level conversion chip must be used. The system uses MAX232/MAX485 chips. In order to achieve the goal of resource sharing and task sharing, the key in a distributed computer system is to ensure the accuracy and reliability of data communication between the host and each slave.

        Since the PC itself does not have the function of multi-machine communication, there are currently two commonly used communication methods: one is to use the "bridge" hardware - multi-machine communication card. Communication cards generally have two forms. The most widely used one is a communication card composed of 51 microcontrollers as the core and 8255, 6116, 2716 and other chips. The card can be inserted into the expansion slot of the PC, and each slave communicates serially with the microcontroller in the communication card, while the PC communicates in parallel with the microcontroller on the card through the 8255 chip. Another communication card is composed of a single chip (that is, a single chip is sacrificed as a communication relay), and the slave and the communication card and the PC and the communication card are all serial communications; another way is to simulate the 51 series single chip serial port programmable 9th bit data function on the PC serial port to achieve multi-machine communication. The system adopts the latter method. In addition, due to long-distance transmission, the MAX485 chip is used in the system, and optoelectronic isolation is also used to improve the system's anti-interference ability. Figure 2 shows the overall hardware architecture. Figure 2 Hardware

architecture of distributed detection system 

        Multi-machine communication protocol 

        C8051F020 single chip has a special function suitable for multi-machine communication, namely mode 2 (3). In these two modes, the received 9th bit enters RB8, and then it is the stop bit. The serial port can be programmed as follows: when the stop bit is received, a serial port interrupt is generated only when RB8=1. This feature can be controlled by setting SM2 in SCON. The way to use this feature in multi-machine communication is: when the host wants to send a data block to one of several slaves, it first sends an address byte of the target slave, with the 9th bit of the address byte being 1 and the 9th bit of the data byte being 0. When SM2=1, the data byte will not interrupt any slave, however, the address byte will interrupt all slaves, so that each slave can check the received address to see if it is addressed to itself. The addressed slave clears SM2 to 0 and prepares to receive the transmitted data byte. The slaves that are not addressed keep SM2 set and continue to process other tasks. The information frame format of the C8051F020 microcontroller in mode 3 is shown in

Figure 3. Figure 3 Information frame format of the C8051F020 microcontroller in mode 3 The

  asynchronous serial communication port of the PC is composed of a universal asynchronous receiver transmitter (UART) as the core. There are many UART product models, most of which use the Ins8250 chip. Programming the UART is actually the operation of its internal registers. There are 10 internal registers in the UART. When programming, the data format of serial communication must be determined first. This is done by writing the selected data format parameters into the line control register LCR. Next, the baud rate factor needs to be written into the baud rate factor register to determine the baud rate of both parties. Then, the line status register LSR is read to determine whether the chip is ready or has an error. The format of the communication line control register LCR is shown in Figure 4.    
 
Figure 4 Communication line control register LCR 

        By writing the parameter byte into the line control register, the UART can be programmed into the following serial communication data format: 1 start bit, 8 data bits, 1 parity bit, 1 stop bit, 11 bits in total for 1 frame. Since the 11-bit data format can be realized on the PC, and the parity bit can be set to "constant 1" or "constant 0" by changing the values ​​of the D5, D4, and D3 bits of the line control register, if the parity bit is set to "constant 1" when sending the address frame, and the parity bit is set to "constant 0" when sending the data bit, the multi-machine communication point of the 51 series microcontroller can be simulated on the PC, thereby directly using this feature to realize the master-slave distributed multi-machine communication between them.
  
        The host and the slave follow the master-slave principle. The host selects the slave by calling. The data is transmitted bidirectionally between the host and the slave. The mutual communication between the slaves needs to be mediated by the host. Some commands and status words for them to recognize should also be transmitted between the master and the slave, such as 00H for the host to send the slave to receive the command, and 01H for the slave to send the host to receive the command, etc. 

        Implementation method of PC host communication program 

        Programming of PC UART is the core of host communication program. Generally, there are two ways to implement the operation of UART. One is to directly access the underlying address to implement the operation of LCR, LSR, and baud rate factor registers. This method is only applicable to Windows 9X. In Windows NT environment, the system prohibits user programs from directly accessing hardware and physical addresses, so this method is not advisable. The specific process is implemented by calling standard communication functions inp() and outp(). Another way is to indirectly perform related operations on LCR, LSR, and baud rate factor registers through communication controls or Windows API functions. Therefore, this system also uses MSComm controls, and Windows API functions are more suitable for application in multiple current process fields. 

        Conclusion 

        Practice has proved that the vibration signal distributed detection system based on C8051F020 microcontroller and MXA2500GL sensor has reliable performance and greatly saves costs. Therefore, this system has great promotion value in the testing and diagnosis process of automobile complete vehicles and parts. 
Keywords:C8051F020  MXA2500GL  sensor Reference address:Distributed detection method of vibration signal based on C8051F020 and MXA2500GL sensor

Previous article:Research on Uninterruptible Power Supply Based on MR16 Single Chip Microcomputer
Next article:Design of infrared temperature monitoring system based on C8051F340 single chip microcomputer and CPLD

Recommended ReadingLatest update time:2024-11-16 19:42

A brief analysis of optical heart rate sensors for wearable fitness trackers
With the accelerated pace of life and the increasing pressure of work, more and more people are beginning to pay attention to fitness. As a result, wearable fitness tracking devices have become very popular. If you look closely, you will find that many friends around you have started using such devices, either for f
[Embedded]
A brief analysis of optical heart rate sensors for wearable fitness trackers
Wireless sensor network communication between LM3S1138 and CC2420
introduction Wireless Sensor Network (WSN) is a comprehensive intelligent information system that integrates information collection, information transmission, and information processing. It is composed of a large number of inexpensive micro sensor nodes deployed in the monitoring area. It is a multi-hop sel
[Industrial Control]
Integrated temperature sensor LM94022 and its application
LM94022 is an integrated temperature sensor with analog output, mainly used in mobile phones, wireless transceivers, battery management, automobiles, office equipment and household appliances. The main features of this sensor include low operating voltage, which can work at 1.5V; wide operating voltage range of -1.5
[sensor]
Integrated temperature sensor LM94022 and its application
Wireless sensor network system design
Wireless sensor network is an intelligent measurement and control network system composed of a large number of sensor units with communication and computing capabilities. It integrates sensor technology, microelectronics technology, embedded computing technology, modern network technology, wireless communication tec
[Power Management]
Wireless sensor network system design
Wireless Sensor Network Technology Patent Standard
  The development and application of sensor network technology has made great progress. This is particularly evident in markets such as home automation, industrial automation, building control, smart metering and power management. At the same time, the standardization of wireless sensor networks has progressed rapidly
[Analog Electronics]
Easy Drive ADC simplifies high impedance sensor measurements
Delta-sigma ADCs are ideal for direct measurement of many types of sensors due to their high accuracy and strong noise immunity. However, the input sampling current can overwhelm high source impedance or low bandwidth, micropower signal conditioning circuits. The LTC2484 family of delta-sigma converters solves this pr
[Test Measurement]
Easy Drive ADC simplifies high impedance sensor measurements
Jigao Electronics' CMOS image sensor packaging workshop enters trial production
According to Wuxi Daily, the world's top CMOS image sensor packaging workshop has recently entered trial production in the newly built factory building of Jigao Electronics (Wuxi) Co., Ltd. In addition, Wang Guojian, chairman of Jigao Electronics, said that Jigao Electronics, judging the situation, invested 150 mill
[Mobile phone portable]
Jigao Electronics' CMOS image sensor packaging workshop enters trial production
Electric vehicle cooling system and the role of pressure sensors
Electric vehicles appeal to buyers for many reasons: They produce fewer emissions, cost significantly less to operate, and have better long-term prospects than gasoline-fueled cars. However, one of the biggest challenges in getting more people to switch to electric vehicles has long been the limited range they
[Embedded]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号