CN113573273B - Wireless intelligent acquisition synchronization method and system based on Bluetooth transmission - Google Patents

Wireless intelligent acquisition synchronization method and system based on Bluetooth transmission Download PDF

Info

Publication number
CN113573273B
CN113573273B CN202110880515.5A CN202110880515A CN113573273B CN 113573273 B CN113573273 B CN 113573273B CN 202110880515 A CN202110880515 A CN 202110880515A CN 113573273 B CN113573273 B CN 113573273B
Authority
CN
China
Prior art keywords
data
difference
sensor data
sensor
bluetooth
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110880515.5A
Other languages
Chinese (zh)
Other versions
CN113573273A (en
Inventor
夏中灵
林泽军
杨衍才
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Youmi Industrial Automation Equipment Co ltd
Original Assignee
Chongqing Youmi Industrial Automation Equipment Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Youmi Industrial Automation Equipment Co ltd filed Critical Chongqing Youmi Industrial Automation Equipment Co ltd
Priority to CN202110880515.5A priority Critical patent/CN113573273B/en
Publication of CN113573273A publication Critical patent/CN113573273A/en
Application granted granted Critical
Publication of CN113573273B publication Critical patent/CN113573273B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/38Services specially adapted for particular environments, situations or purposes for collecting sensor information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements

Abstract

The invention discloses a wireless intelligent acquisition synchronization method and system based on Bluetooth transmission; the method comprises the steps that a Bluetooth chip periodically starts each sensor through an interrupt signal of a timer, and acquires triaxial magnetic field sensor data and triaxial acceleration sensor data through a DMA (direct memory access) channel of an SPI (serial peripheral interface); collecting temperature data and noise data through an AD interface; the sensor data is subjected to fast Fourier transformation to obtain corresponding frequency information; aligning the phase points corresponding to the center frequency to obtain the center frequency, the frequency period and the phase information corresponding to the sensor data; and carrying out framing treatment on the data, compressing the sensor data after framing treatment, and transmitting the sensor data after compressing treatment to a gateway through Bluetooth. According to the invention, the device information acquired by the sensor is transmitted to the data center of the factory through Bluetooth transmission, so that the instantaneity and the effectiveness of the device in the intelligent acquisition process can be ensured.

Description

Wireless intelligent acquisition synchronization method and system based on Bluetooth transmission
Technical Field
The invention relates to the field of Bluetooth communication, in particular to a wireless intelligent acquisition synchronization method and system based on Bluetooth transmission.
Background
With the rapid development of the internet of things technology, the real-time acquisition and analysis of various data are widely applied to the field of modern industrial control, and the method also contributes more and more positive effects to industrial automation. In industrial automation, the failure rate of moving parts directly relates to the reliability of the whole automation system; in order to monitor the failure rate of the moving parts in real time, various parameters of industrial equipment need to be acquired in real time; because of the diversity of industrial environments, the real-time acquisition equipment is required to have the characteristics of intelligence, convenience, rapidness, long-distance real-time transmission change and the like.
The current common real-time acquisition mode is to adopt a Bluetooth technology, bluetooth is a wireless technical standard, and can realize short-distance data exchange among fixed equipment, mobile equipment and building personal area networks (UHF radio waves of an ISM wave band of 2.4-2.485 GHz are used); bluetooth has advantages such as low power consumption, high speed, and coverage is big, stability is good to bluetooth can connect a plurality of devices, can realize data synchronization.
In order to ensure the synchronism of data acquisition, the prior art generally adopts a mode of timing interruption to read data, however, the mode can not ensure the synchronism of the data among different devices; meanwhile, the acquired and transmitted data volume is very large, so that the real-time performance and effectiveness of the equipment in the intelligent acquisition process are very affected.
Disclosure of Invention
In view of the above-mentioned drawbacks of the prior art, the present invention aims to provide a wireless intelligent acquisition synchronization method and system based on bluetooth transmission, which ensure the synchronization of data of different moving parts and the real-time performance and effectiveness of the acquired data.
In a first aspect of the present invention, the present invention provides a wireless intelligent acquisition synchronization method based on bluetooth transmission, the method comprising:
the temperature sensor and the noise sensor are connected with the Bluetooth chip through an AD interface, and the triaxial magnetic field sensor and the triaxial acceleration sensor are connected with the Bluetooth chip through an SPI interface;
the Bluetooth chip periodically starts all sensors through an interrupt signal of a timer;
responding to the timer interrupt signal, starting DMA of the SPI interface by the Bluetooth chip, and acquiring triaxial magnetic field sensor data and triaxial acceleration sensor data through corresponding DMA channels; the Bluetooth chip starts AD conversion and collects temperature data and noise data through a corresponding AD interface;
the acquired triaxial magnetic field sensor data and triaxial acceleration sensor data are subjected to fast Fourier transformation to obtain frequency information of the triaxial magnetic field sensor data and the triaxial acceleration sensor data;
traversing frequency information of triaxial magnetic field sensor data and triaxial acceleration sensor data, aligning initial phase points determined by central frequency and synchronizing the initial phase points as starting points of temperature data and noise data to four sensor data; obtaining center frequency, frequency period and phase information corresponding to the sensor data;
and carrying out framing treatment on the data based on the central frequency, the frequency period and the phase information, carrying out compression treatment on the sensor data subjected to framing treatment, and transmitting the sensor data subjected to compression treatment to a gateway through Bluetooth.
In a second aspect of the invention, the invention also provides a wireless intelligent acquisition and synchronization system based on Bluetooth transmission, which comprises a data acquisition module, a data synchronization module, a data framing module, a data compression module and a data transmission module;
the data acquisition module is connected with the temperature sensor and the noise sensor through an AD interface and is connected with the triaxial magnetic field sensor and the triaxial acceleration sensor through an SPI interface;
the data synchronization module responds to the periodic timer interrupt signal, starts a DMA channel of the SPI interface, and acquires the data of the triaxial magnetic field sensor and the data of the triaxial acceleration sensor through the corresponding DMA channel; the AD conversion is started, and temperature data and noise data are collected through corresponding AD interfaces; the acquired triaxial magnetic field sensor data and triaxial acceleration sensor data are subjected to fast Fourier transformation to obtain frequency information of each sensor data; traversing the frequency information of each sensor data, aligning the phase points corresponding to the center frequency, and obtaining the center frequency, the frequency period and the phase information corresponding to the sensor data;
the data framing module carries out framing processing on data based on the center frequency, the frequency period and the phase information;
the data compression module compresses the sensor data subjected to framing treatment;
and the data transmission module transmits the sensor data after the compression processing to the gateway through Bluetooth.
The beneficial effects of the invention are as follows:
the invention collects various parameters of the moving parts during working through various sensors, can help a user to quickly obtain information such as equipment state, operation parameters, starting time and the like for monitoring various moving equipment in an industrial use environment, and sends the equipment information collected by the sensors to a data center of a factory in a wireless communication mode of Bluetooth transmission, and operators of the factory equipment can conveniently obtain various information of the equipment through a monitoring interface, thereby providing auxiliary comments for maintenance and repair of the equipment. Meanwhile, the invention also carries out synchronous processing on the data, can ensure the accuracy of the data, especially the motion data, and can enhance the data transmission rate and reduce the data transmission quantity to a certain extent through data framing and data compression processing, thereby ensuring the real-time performance and the effectiveness in the intelligent acquisition process of the equipment.
Drawings
FIG. 1 is a flow chart of a wireless intelligent acquisition synchronization method based on Bluetooth transmission in one embodiment of the invention;
FIG. 2 is a schematic diagram of timer interrupt signal triggering in an embodiment of the present invention;
FIG. 3 is a flow chart of data synchronization alignment in an embodiment of the invention;
FIG. 4 is a flow chart of data synchronization alignment in a preferred embodiment of the invention;
FIG. 5 is a flow chart of framing data in an embodiment of the invention;
FIG. 6 is a flow chart of data compression in an embodiment of the invention;
FIG. 7 is a schematic diagram of a wireless intelligent acquisition synchronization system based on Bluetooth transmission in an embodiment of the invention;
fig. 8 is a diagram of a wireless intelligent acquisition synchronization system based on bluetooth transmission in a preferred embodiment of the present invention.
Detailed Description
The present invention will be further described with reference to the drawings and examples, and it should be noted that in the description of the present invention, the terms "upper", "lower", "left", "right", "inner", "outer", and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, only for convenience in describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific manner, and thus should not be construed as limiting the present invention. The terms "first," "second," "third," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
As shown in fig. 1, fig. 1 is a flowchart of a wireless intelligent acquisition synchronization method based on bluetooth transmission in an embodiment of the present invention, where the bluetooth data transmission method includes:
101. the temperature sensor and the noise sensor are connected with the Bluetooth chip through an AD interface, and the triaxial magnetic field sensor and the triaxial acceleration sensor are connected with the Bluetooth chip through an SPI interface;
in the embodiment, in order to ensure the synchronism of data acquisition, the invention connects a temperature sensor and a noise sensor on an AD interface of a Bluetooth chip, and connects a triaxial magnetic field sensor and a triaxial acceleration sensor on an SPI interface of the Bluetooth chip;
in some embodiments, the Bluetooth chip can read data of the triaxial acceleration sensor and data of the triaxial magnetic field sensor through an SPI interface at a speed of maximum 10MHz/s, and temperature data and noise data are acquired through an AD interface.
In some embodiments, the effective use range of the acceleration speed of the triaxial acceleration sensor may be set to-200 g to 200g.
Preferably, the invention can also add a filter circuit in the peripheral circuit of the triaxial acceleration sensor. The sensor supports ultra low power consumption mode and digital SPI output.
In some embodiments, the magnetic field dynamic range of the tri-axis magnetic field sensor may be 50 gauss. The triaxial magnetic field sensor supports an ultra-low power consumption mode and digital SPI output.
In some embodiments, the sensitivity of the noise sensor is adjustable, the frequency band of the noise sensor can be 50 Hz-20 KHz, an analog signal is output, and the noise sensor is converted into the intensity of noise after being acquired through an AD interface of the MCU.
In some embodiments, the measurable temperature range of the temperature sensor may be-25 ℃ to 140 ℃.
In some embodiments, the Bluetooth chip comprises a reset circuit, a crystal oscillator circuit, a Bluetooth antenna circuit and IO interfaces connected with the sensors.
102. The Bluetooth chip periodically starts all the sensors through an interrupt signal of the timer;
in the embodiment, the data of the triaxial acceleration sensor and the triaxial magnetic field sensor are synchronously acquired through the DMA technology, and the data are read based on timing interruption in order to ensure the synchronization of data acquisition; the DMA technology directly relies on hardware to directly transfer data between the main memory and the I/O device, and the CPU or MCU intervention of a Bluetooth chip is not needed during the transfer; in view of the strong correlation between the triaxial magnetic field sensor and the triaxial acceleration sensor, the DMA can control one or more similar devices at the same time, so that the data synchronization of the triaxial acceleration sensor and the triaxial magnetic field sensor is realized by adopting the DMA technology.
103. Responding to the timer interrupt signal, starting DMA of the SPI interface by the Bluetooth chip, and acquiring triaxial magnetic field sensor data and triaxial acceleration sensor data through corresponding DMA channels; the Bluetooth chip starts AD conversion and collects temperature data and noise data through a corresponding AD interface;
and simultaneously opening channels of the two DMA through a timer interrupt signal so as to realize the synchronization of data collected by the two sensors. At the same time, the AD conversion interruption is started, and temperature and noise data are acquired. It should be noted here in particular that the acquisition process of all data is synchronized by a timer interrupt, so that all data acquired can be considered to be completely synchronized in time.
FIG. 2 is a schematic diagram of timer interrupt signal triggering in the embodiment of the invention, as shown in FIG. 2, when sensor data is input, the timer interrupt signal triggers a corresponding SPI module in the Bluetooth chip, and the DMA triaxial acceleration sensor data acquisition and the triaxial magnetic field sensor data acquisition are started; and meanwhile, AD interruption noise data acquisition and terminal temperature acquisition are started.
In this embodiment, in order to optimize the synchronization process, the present invention further calibrates the timer by using the clock source error ratio, that is, records the ratio between the current timer count value in the previous time and the real value in the previous time, and multiplies the ratio by the current timer count value to obtain the corrected current real count value.
104. The acquired triaxial magnetic field sensor data and triaxial acceleration sensor data are subjected to fast Fourier transformation to obtain frequency information of the triaxial magnetic field sensor data and the triaxial acceleration sensor data;
105. traversing frequency information of triaxial magnetic field sensor data and triaxial acceleration sensor data, aligning initial phase points determined by central frequency and synchronizing the initial phase points as starting points of temperature data and noise data to four sensor data; obtaining center frequency, frequency period and phase information corresponding to the sensor data;
fig. 3 is a flowchart of data synchronization alignment according to an embodiment of the present invention, and as shown in fig. 3, the synchronization alignment procedure includes:
301. the acquired triaxial magnetic field sensor data and triaxial acceleration sensor data are subjected to N-point fast Fourier transform (Fast Fourier transform, FFT for short);
302. calculating frequency information of the triaxial magnetic field sensor data and the triaxial acceleration sensor data, and sequencing the frequency information to determine corresponding center frequency;
303. calculating a frequency period according to the center frequency, and sequencing data in the frequency period;
304. calculating the position with the initial phase being 0, and aligning the sensor data according to the position with the initial phase being 0;
specifically, considering that the four sensor data are signals generated when the moving part moves, the frequencies of the four sensor data are in agreement in theory, the three-axis magnetic field sensor data and the three-axis acceleration sensor data are the most reflecting the movement condition of the moving part, the temperature data and the noise data are only used as auxiliary data, the temperature data and the noise data have little change in a short time, and therefore the result after the fast Fourier transform is not necessarily accurate, besides, the fast Fourier transform occupies a large amount of calculation resources, so the invention only adopts the fast Fourier transform for the three-axis magnetic field sensor data and the three-axis acceleration sensor data, obtains the center frequency after the frequency information of the three-axis magnetic field sensor data and the three-axis acceleration sensor data is processed, calculates the frequency period by using the center frequency, sorts all the frequency signals in the frequency period, finds the initial phase, and uses the time point corresponding to the initial phase as the starting point of the temperature data and the noise data after the initial phase is aligned, thereby completing the time synchronization for the four sensor data.
In some preferred embodiments, fig. 4 is a flowchart of the data synchronization alignment process in a preferred embodiment of the present invention, and as shown in fig. 4, the synchronization alignment process may further include:
311. determining the center frequency and the peak point frequency;
312. traversing peak points in the respective sensor data and selecting a maximum peak point in each sensor data from the peak points;
313. the phase points of different sensors are aligned according to the maximum peak point of each sensor, so that synchronously aligned sensor data are obtained.
106. And carrying out framing treatment on the data based on the central frequency, the frequency period and the phase information, carrying out compression treatment on the sensor data subjected to framing treatment, and transmitting the sensor data subjected to compression treatment to a gateway through Bluetooth.
Fig. 5 is a flowchart of a method for framing data according to an embodiment of the present invention, as shown in fig. 5, the framing data may include:
601. acquiring synchronous sensor data on a time axis;
602. and respectively performing fast Fourier transform on X-axis data in the synchronized triaxial magnetic field sensor data and Y-axis data in the triaxial acceleration sensor data.
The X-axis data of the triaxial magnetic field sensor and the Y-axis data of the triaxial acceleration sensor are selected by the invention:
1. the data in these two directions represent the main direction of change of the data;
2. the calculated amount is reduced, the efficiency is improved, and the fast Fourier transform is not small overhead for the system.
In some embodiments, the present invention may also perform a fast fourier transform on the sensor data of all axes in order to pursue the comprehensiveness and accuracy of the data signal.
603. Framing the sensor data after the fast Fourier transform and dividing the data frames with the same initial phase into the same data frame.
Fig. 6 is a flowchart of a data compression method according to an embodiment of the present invention, and as shown in fig. 6, the data compression may include:
611. acquiring one or more data frames subjected to framing processing;
612. extracting first data from the data frame, taking the first data as a compressed data index tag, and establishing a compressed data length tag; and determining the first data as a comparison data standard;
613. continuing to extract the next data from the data frame, and calculating a difference value between the extracted next data and a comparison data standard;
614. according to the magnitude relation between the absolute value of the difference and a preset threshold value, the corresponding processed difference sign, the difference reduction multiple and the absolute value of the difference form compressed data of the next data, the length label of the compressed data is updated, and the comparison data standard is updated according to the difference;
615. and repeatedly executing the extraction and updating operations until all data of the data frame are compressed, and transmitting the compressed data to the gateway.
In the embodiment of the invention, the core compression process of the Bluetooth data is completed through the relation between the absolute value of the difference value and a preset threshold value, and the method specifically comprises the following steps:
if the absolute value of the difference is smaller than the first threshold, the difference sign, the difference reduction multiple and the absolute value of the difference are formed into compressed data of the next data, the length label of the compressed data is updated, and the comparison data standard is updated according to the difference;
the difference sign at this time is judged according to the positive and negative conditions of the difference, the reduction multiple of the difference is 1, that is, the difference is not reduced, the absolute value of the difference is the absolute value corresponding to the difference, for example, the difference sign is-2333, the reduction multiple of the difference is 1, and the absolute value of the difference is 2333.
If the absolute value of the difference is larger than or equal to the first threshold value and smaller than the second threshold value, the difference is reduced, the reduced difference sign, the reduced multiple of the difference and the absolute value of the difference form compressed data of the next data, the length label of the compressed data is updated, and the comparison data standard is updated according to the difference.
The difference sign is still judged according to the positive and negative conditions of the difference, the reduction multiple of the difference is assumed to be 10, namely the original difference is reduced by 10 times, the absolute value of the difference is the absolute value corresponding to the reduced difference by 10 times and shaped, for example, the original difference is assumed to be-23333, the difference sign is-, the reduction multiple of the difference is 10, the reduced difference is shaped, and the finally determined absolute value of the difference is 2333.
The preset threshold value comprises the first threshold value and the second threshold value, and the first threshold value and the second threshold value can be calculated by the following modes:
first threshold valueN 1 Is expressed as the calculation formula ofN 1 =2 4X-2 -1;
Second threshold valueN 2 Is expressed as the calculation formula ofN 2 =K×N 1 =K×(2 4X-2 -1);
Wherein, the liquid crystal display device comprises a liquid crystal display device,Xexpressed as the number of bytes occupied by each original data in a data frame, i.e. 8XRepresenting the number of bits occupied by the original data,Xmeter/2Shown as the number of bytes occupied by each original data in a data frame, i.e. 4XRepresenting the number of bits occupied by the compressed data;Krepresenting a reduction in the difference.
The specific size of k=1, 2,3,4, …,10, K may be agreed by both transceivers, for example, the compressor may set k=3, the compressor may separately notify the decompressor of k=3, and when the decompressor knows that k=3, the data may be decompressed by k=3.
It will be appreciated that where the number of bits occupied by the compressed data is the number of bits occupied by the compressed data other than the first data, the first data is not compressed because there is no other reference standard, and therefore the first data is still occupiedXAnd a number of bytes.
The format of the compressed data is expressed as a symbol, a multiple and a data difference, namely, the compressed data respectively represent a difference symbol, and the difference is reduced by the multiple and the absolute value of the difference; in the compressed data, the symbol corresponding to the difference occupies 1 bit, and the symbol corresponding to the difference is represented as positive sign or negative sign; the 1 st bit is occupied by the reduction multiple of the difference value, which means that the reduction multiple of the difference value is 1 time or K time; the absolute value of the difference occupies the remaining 4X-position 2;Xexpressed as the number of bytes occupied by each original data in a data frame, i.e. 8XRepresenting the number of bits occupied by the original data.
For example, assume that the original data occupies 4 bytes and the compressed data occupies 2 bytes, i.e., the compressed data has 8×2=16 bits in total; then the symbol may occupy bit1, 1 may represent a positive sign, and 0 may represent a negative sign; the multiple can occupy the 2 nd bit, 1 can represent the multiple as 1, and 0 can represent the multiple as K; the remaining 14 bits are occupied by a data difference value, so the size of the data difference value must be less than or equal to 2 14 -1=16383 (16 is 0x3FFF and binary is 11111111111111).
It can be understood that in the symbol, multiple and data difference, the symbol may occupy the 1 st bit or the 2 nd bit, and the multiple may occupy the 1 st bit or the 2 nd bit; the data difference is typically the number of bits occupied; those skilled in the art can also set the value of 1 or 0 according to the actual situation, and the present invention is not limited thereto.
For example, a space is allocated for the compressed data, and the address is added with 2 bytes based on the last allocation, and the difference is stored in the address. The 2 bytes of memory are divided into the following 3 parts:
1. a symbol region with a length of 1 bit and only capable of representing a data region of 0-1;
2. a multiple region with a length of 1 bit and only capable of representing a data region of 0-1;
3. the difference area is 14 bits long, only can represent the data interval of 0-16383, and is replaced by hexadecimal, namely 0-0 x3FFF.
The difference needs to be further processed in combination with the parameters calculated in the above steps before the compressed data is saved. Further partitioning is performed according to whether the value of the difference is greater than or equal to 0, and if the difference is greater than or equal to 0, the highest Bit of the 2 bytes is 0, i.e. Bit15 is equal to 0. If the difference is less than 0, the most significant Bit of the 2 bytes is 1, i.e., bit15 is equal to 1. According to the multiple parameter obtained above, if the multiple parameter is 1, the 14 th Bit of the 2 bytes is 0, i.e., bit14 is equal to 0. If the multiple parameter is 10, then Bit14 of the 2 bytes is 1, i.e., bit14 is equal to 1. Bits 0-13 of the 2 bytes, i.e., bit 13-Bit 0, store the difference calculated above. So far, the new difference is that all Bit bits in the compressed data are processed.
In the above embodiment, the compressed data length label is also required to be updated, and the comparison data standard is updated according to the difference value, so that 1 needs to be added to the compressed data length label, that is, one compressed data is added; the difference is then compensated into the comparison data standard.
For example, in some embodiments, assuming that the absolute value of the difference is less than 16383, the original comparison data is 12383 and the difference is-11383, the updated comparison data is represented as 1000.
In some embodiments, assuming that the absolute difference is greater than or equal to 16383 and less than 163830, the raw comparison standard data is 12383 and the difference is 163814; then in the previous storage process, the difference needs to be reduced, that is, the quotient thereof is 16381.4, and the reduced difference needs to be reshaped, so that the reduced difference can be expressed as 16381; the obtained shaped quotient 16381 is taken as an increment, and is compensated into a comparison data standard, wherein the increment is signed, and the sign is the same as the sign obtained by calculation.
If the absolute value of the difference is greater than or equal to the second threshold, the next data is used as a new compressed data index tag, a new compressed data length tag is established, the next data is determined to be the comparison data standard, and the step 613 is returned.
The gateway may also be a next-stage communication device, where the next-stage communication device refers to a next-stage communication device for bluetooth data transmission, and may include, but is not limited to, a memory, a processor, a router, a mobile phone terminal, a computer, a server, a tablet computer, a personal digital assistant (Personal Digital Assistant, abbreviated as PDA), a mobile internet device (Mobile Internet Device, abbreviated as MID), and the like, where a device for storing and/or processing bluetooth data may be installed, which is not limited in this aspect of the invention.
Fig. 7 is a schematic diagram of a wireless intelligent acquisition synchronization system based on bluetooth transmission according to an embodiment of the present invention, as shown in fig. 7, the wireless intelligent acquisition synchronization system 700 based on bluetooth transmission includes a data acquisition module 701, a data synchronization module 702, a data framing module 703, a data compression module 704, and a data transmission module 705 integrated in a bluetooth chip; wherein:
the data acquisition module 701 is connected with the temperature sensor and the noise sensor through an AD interface and is connected with the triaxial magnetic field sensor and the triaxial acceleration sensor through an SPI interface;
the data synchronization module 702 responds to the periodic timer interrupt signal, starts a DMA channel of the SPI interface, and acquires the data of the triaxial magnetic field sensor and the data of the triaxial acceleration sensor through the corresponding DMA channel; the AD conversion is started, and temperature data and noise data are collected through corresponding AD interfaces; the acquired triaxial magnetic field sensor data and triaxial acceleration sensor data are subjected to fast Fourier transformation to obtain frequency information of the triaxial magnetic field sensor data and the triaxial acceleration sensor data; traversing frequency information of triaxial magnetic field sensor data and triaxial acceleration sensor data, aligning initial phase points determined by central frequency and synchronizing the initial phase points as starting points of temperature data and noise data to four sensor data; obtaining center frequency, frequency period and phase information corresponding to the sensor data;
the data framing module 703 performs framing processing on the data based on the center frequency, the frequency period and the phase information;
the data compression module 704 compresses the sensor data after framing;
the data transmission module 705 transmits the compressed sensor data to the gateway through bluetooth.
Fig. 8 is a schematic diagram of a wireless intelligent acquisition synchronization system based on bluetooth transmission according to a preferred embodiment of the present invention, as shown in fig. 8, the wireless intelligent acquisition synchronization system 710 based on bluetooth transmission includes a data acquisition module 711, a data synchronization module 712, a data framing module 713, a data compression module 714, a communication management module 716, and a data transmission module 715, which are integrated in a bluetooth chip; wherein:
the data acquisition module 711 is connected with the temperature sensor and the noise sensor through an AD interface and is connected with the triaxial magnetic field sensor and the triaxial acceleration sensor through an SPI interface;
the data synchronization module 712 responds to the periodic timer interrupt signal, and the data synchronization module responds to the periodic timer interrupt signal, starts the DMA channel of the SPI interface, and collects the triaxial magnetic field sensor data and the triaxial acceleration sensor data through the corresponding DMA channel; the AD conversion is started, and temperature data and noise data are collected through corresponding AD interfaces; the acquired triaxial magnetic field sensor data and triaxial acceleration sensor data are subjected to fast Fourier transformation to obtain frequency information of the triaxial magnetic field sensor data and the triaxial acceleration sensor data; traversing frequency information of triaxial magnetic field sensor data and triaxial acceleration sensor data, aligning initial phase points determined by central frequency and synchronizing the initial phase points as starting points of temperature data and noise data to four sensor data; obtaining center frequency, frequency period and phase information corresponding to the sensor data;
the data framing module 713 frames data based on the center frequency, frequency period, and phase information;
the data compression module 714 compresses the sensor data after framing;
the communication management module 716 controls connection communication between the data compression module and the data transmission module; the communication management module defaults to enter a connection mode; judging whether the connection between the data transmission module and the gateway is successful, if the connection between the data transmission module and the gateway is successful, starting the data acquisition, entering a transmission mode, judging whether the connection state is lost, if the connection state is lost, entering a sleep mode, otherwise, returning to continue starting the data acquisition; if the connection between the data transmission module and the gateway is unsuccessful, the data transmission module directly enters a sleep mode, and after entering the sleep mode, data acquisition is closed, and the data transmission module is awakened at regular time to enter a connection mode;
the data transmission module 715 transmits the compressed sensor data to the gateway through bluetooth.
It can be understood that a wireless intelligent acquisition synchronization method based on bluetooth transmission and a wireless intelligent acquisition synchronization system based on bluetooth transmission in the present invention belong to the same inventive concept, and the corresponding features thereof can be cited with each other, which is not particularly limited by the present invention.
The foregoing describes in detail preferred embodiments of the present invention. It should be understood that numerous modifications and variations can be made in accordance with the concepts of the invention by one of ordinary skill in the art without undue burden. Therefore, all technical solutions which can be obtained by logic analysis, reasoning or limited experiments based on the prior art by the person skilled in the art according to the inventive concept shall be within the scope of protection defined by the claims.

Claims (6)

1. A wireless intelligent acquisition synchronization method based on bluetooth transmission, the method comprising:
the temperature sensor and the noise sensor are connected with the Bluetooth chip through an AD interface, and the triaxial magnetic field sensor and the triaxial acceleration sensor are connected with the Bluetooth chip through an SPI interface;
the Bluetooth chip periodically starts all the sensors through an interrupt signal of the timer;
responding to the timer interrupt signal, starting DMA of the SPI interface by the Bluetooth chip, and acquiring triaxial magnetic field sensor data and triaxial acceleration sensor data through corresponding DMA channels; the Bluetooth chip starts AD conversion and collects temperature data and noise data through a corresponding AD interface;
the acquired triaxial magnetic field sensor data and triaxial acceleration sensor data are subjected to fast Fourier transformation to obtain frequency information of the triaxial magnetic field sensor data and the triaxial acceleration sensor data;
traversing frequency information of triaxial magnetic field sensor data and triaxial acceleration sensor data, aligning initial phase points determined by central frequency and synchronizing the initial phase points as starting points of temperature data and noise data to four sensor data; obtaining center frequency, frequency period and phase information corresponding to the sensor data;
based on the center frequency, the frequency period and the phase information, framing the data, compressing the sensor data after framing, and transmitting the sensor data after compressing to a gateway through Bluetooth;
the framing processing of the data comprises the steps of acquiring synchronous sensor data on a time axis, and respectively performing fast Fourier transform on X-axis data in the synchronous triaxial magnetic field sensor data and Y-axis data in the triaxial acceleration sensor data; framing the sensor data after the fast Fourier transformation, and dividing the data frames with the same initial phase into the same data frame;
the sensor data after framing processing is compressed and processed, and a data frame is acquired; extracting first data from the data frame, taking the first data as a compressed data index tag, and establishing a compressed data length tag; and determining the first data as a comparison data standard; continuing to extract the next data from the data frame, and calculating a difference value between the extracted next data and a comparison data standard; according to the magnitude relation between the absolute value of the difference and a preset threshold value, the corresponding processed difference sign, the difference reduction multiple and the absolute value of the difference form compressed data of the next data, the length label of the compressed data is updated, and the comparison data standard is updated according to the difference; repeatedly executing the extraction and updating operations until all data in the data frame are compressed, and transmitting the compressed data to the gateway;
updating the comparison data standard according to the difference value, wherein when the absolute value of the difference value is smaller than a first threshold value, the difference value is taken as an increment, and the comparison standard data is updated; when the absolute value of the difference is larger than a first threshold value and smaller than a second threshold value, the difference is reduced according to the reduction multiple of the difference, and the reduced difference is taken as an increment to update the comparison data standard; and when the absolute value of the difference is greater than or equal to a second threshold value, taking the next data as an updated comparison data standard.
2. The wireless intelligent acquisition synchronization method based on Bluetooth transmission according to claim 1, wherein a filtering circuit is further included in a peripheral circuit of the triaxial acceleration sensor, and the data of the triaxial acceleration sensor before acquisition is filtered by the filtering circuit.
3. A wireless intelligent acquisition synchronization method based on bluetooth transmission according to claim 1, wherein the timer interrupt signal is controlled by a timer, the timer is calibrated by a clock source error ratio, that is, a ratio between a current timer count value in a previous time and a real value in a previous time is recorded, and the ratio is multiplied by the current timer count value to obtain a corrected current real count value.
4. The wireless intelligent acquisition synchronization method based on bluetooth transmission of claim 1, further comprising entering a connected mode by default before transmitting to a gateway via bluetooth; judging whether the connection between the Bluetooth chip and the gateway is successful, if the connection between the Bluetooth chip and the gateway is successful, starting the data acquisition, entering a transmission mode, judging whether the connection state is lost, if the connection state is lost, entering a sleep mode, otherwise, returning to continue starting the data acquisition; if the connection between the Bluetooth chip and the gateway is unsuccessful, the Bluetooth chip directly enters a sleep mode, and after entering the sleep mode, data acquisition is closed, and the Bluetooth chip is awakened at regular time to enter a connection mode.
5. The wireless intelligent acquisition synchronization system based on Bluetooth transmission is characterized by comprising a data acquisition module, a data synchronization module, a data framing module, a data compression module and a data transmission module;
the data acquisition module is connected with the temperature sensor and the noise sensor through an AD interface and is connected with the triaxial magnetic field sensor and the triaxial acceleration sensor through an SPI interface;
the data synchronization module responds to the periodic timer interrupt signal, starts a DMA channel of the SPI interface, and acquires the data of the triaxial magnetic field sensor and the data of the triaxial acceleration sensor through the corresponding DMA channel; the AD conversion is started, and temperature data and noise data are collected through corresponding AD interfaces; the acquired triaxial magnetic field sensor data and triaxial acceleration sensor data are subjected to fast Fourier transformation to obtain frequency information of the triaxial magnetic field sensor data and the triaxial acceleration sensor data; traversing frequency information of triaxial magnetic field sensor data and triaxial acceleration sensor data, aligning initial phase points determined by central frequency and synchronizing the initial phase points as starting points of temperature data and noise data to four sensor data; obtaining center frequency, frequency period and phase information corresponding to the sensor data;
the data framing module carries out framing processing on data based on the center frequency, the frequency period and the phase information; the framing processing of the data comprises the steps of acquiring synchronous sensor data on a time axis, and respectively performing fast Fourier transform on X-axis data in the synchronous triaxial magnetic field sensor data and Y-axis data in the triaxial acceleration sensor data; framing the sensor data after the fast Fourier transformation, and dividing the data frames with the same initial phase into the same data frame;
the data compression module compresses the sensor data subjected to framing treatment; the sensor data after framing processing is compressed and processed, and a data frame is acquired; extracting first data from the data frame, taking the first data as a compressed data index tag, and establishing a compressed data length tag; and determining the first data as a comparison data standard; continuing to extract the next data from the data frame, and calculating a difference value between the extracted next data and a comparison data standard; according to the magnitude relation between the absolute value of the difference and a preset threshold value, the corresponding processed difference sign, the difference reduction multiple and the absolute value of the difference form compressed data of the next data, the length label of the compressed data is updated, and the comparison data standard is updated according to the difference; repeatedly executing the extraction and updating operations until all data in the data frame are compressed, and transmitting the compressed data to the gateway;
updating the comparison data standard according to the difference value, wherein when the absolute value of the difference value is smaller than a first threshold value, the difference value is taken as an increment, and the comparison standard data is updated; when the absolute value of the difference is larger than a first threshold value and smaller than a second threshold value, the difference is reduced according to the reduction multiple of the difference, and the reduced difference is taken as an increment to update the comparison data standard; when the absolute value of the difference is greater than or equal to a second threshold value, taking the next data as an updated comparison data standard;
and the data transmission module transmits the sensor data after the compression processing to the gateway through Bluetooth.
6. The wireless intelligent acquisition synchronization system based on bluetooth transmission according to claim 5, further comprising a communication management module, wherein the communication management module controls connection communication between the data compression module and the data transmission module; the communication management module defaults to enter a connection mode; judging whether the connection between the data transmission module and the gateway is successful, if the connection between the data transmission module and the gateway is successful, starting the data acquisition, entering a transmission mode, judging whether the connection state is lost, if the connection state is lost, entering a sleep mode, otherwise, returning to continue starting the data acquisition; if the connection between the data transmission module and the gateway is unsuccessful, the data transmission module directly enters a sleep mode, and after entering the sleep mode, data acquisition is closed, and the data transmission module is awakened at regular time to enter a connection mode.
CN202110880515.5A 2021-08-02 2021-08-02 Wireless intelligent acquisition synchronization method and system based on Bluetooth transmission Active CN113573273B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110880515.5A CN113573273B (en) 2021-08-02 2021-08-02 Wireless intelligent acquisition synchronization method and system based on Bluetooth transmission

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110880515.5A CN113573273B (en) 2021-08-02 2021-08-02 Wireless intelligent acquisition synchronization method and system based on Bluetooth transmission

Publications (2)

Publication Number Publication Date
CN113573273A CN113573273A (en) 2021-10-29
CN113573273B true CN113573273B (en) 2023-09-15

Family

ID=78169914

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110880515.5A Active CN113573273B (en) 2021-08-02 2021-08-02 Wireless intelligent acquisition synchronization method and system based on Bluetooth transmission

Country Status (1)

Country Link
CN (1) CN113573273B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104579397A (en) * 2014-12-29 2015-04-29 北京中体动力数字技术有限公司 Zigbee-based data acquisition terminal
CN105686833A (en) * 2016-01-13 2016-06-22 上海交通大学 Wearable multinode three dimensional motion monitoring system based on wireless body area network
CN106851548A (en) * 2017-03-31 2017-06-13 福建师范大学 Wearable walking monitoring system and its monitoring method based on wireless body area network
CN107550457A (en) * 2016-06-30 2018-01-09 诺基亚技术有限公司 Method and apparatus for transmitting heart sound data
CN108680244A (en) * 2018-04-26 2018-10-19 浙江大学 A kind of rotating machinery vibrating wireless monitoring device and method
CN108921867A (en) * 2018-06-01 2018-11-30 天津煋鸟科技有限公司 A kind of motion detection and human body recognition method of panoramic picture
CN109194667A (en) * 2018-09-18 2019-01-11 上海创远仪器技术股份有限公司 The device of realization I/Q data signal data compression and transfer function based on frequency domain detection
CN209400897U (en) * 2019-03-05 2019-09-17 江西飞尚科技有限公司 A kind of guardrail board condition monitoring system based on six axle sensors
CN110286774A (en) * 2019-07-03 2019-09-27 中国科学技术大学 A kind of sign Language Recognition Method based on Wrist-sport sensor
CN110719577A (en) * 2019-10-08 2020-01-21 浙江大学 Wireless data acquisition system based on data frame format optimization and data compression
CN111929724A (en) * 2020-07-28 2020-11-13 中国地震局地震研究所 Early warning-oriented seismic signal compressed sensing acquisition transmission method
CN112134678A (en) * 2020-09-22 2020-12-25 上海无线电设备研究所 Double-node phase synchronization method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103246839B (en) * 2013-04-27 2015-10-28 飞天诚信科技股份有限公司 A kind of method of work of intelligent cipher key equipment

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104579397A (en) * 2014-12-29 2015-04-29 北京中体动力数字技术有限公司 Zigbee-based data acquisition terminal
CN105686833A (en) * 2016-01-13 2016-06-22 上海交通大学 Wearable multinode three dimensional motion monitoring system based on wireless body area network
CN107550457A (en) * 2016-06-30 2018-01-09 诺基亚技术有限公司 Method and apparatus for transmitting heart sound data
CN106851548A (en) * 2017-03-31 2017-06-13 福建师范大学 Wearable walking monitoring system and its monitoring method based on wireless body area network
CN108680244A (en) * 2018-04-26 2018-10-19 浙江大学 A kind of rotating machinery vibrating wireless monitoring device and method
CN108921867A (en) * 2018-06-01 2018-11-30 天津煋鸟科技有限公司 A kind of motion detection and human body recognition method of panoramic picture
CN109194667A (en) * 2018-09-18 2019-01-11 上海创远仪器技术股份有限公司 The device of realization I/Q data signal data compression and transfer function based on frequency domain detection
CN209400897U (en) * 2019-03-05 2019-09-17 江西飞尚科技有限公司 A kind of guardrail board condition monitoring system based on six axle sensors
CN110286774A (en) * 2019-07-03 2019-09-27 中国科学技术大学 A kind of sign Language Recognition Method based on Wrist-sport sensor
CN110719577A (en) * 2019-10-08 2020-01-21 浙江大学 Wireless data acquisition system based on data frame format optimization and data compression
CN111929724A (en) * 2020-07-28 2020-11-13 中国地震局地震研究所 Early warning-oriented seismic signal compressed sensing acquisition transmission method
CN112134678A (en) * 2020-09-22 2020-12-25 上海无线电设备研究所 Double-node phase synchronization method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于掌上终端的蓝牙微微网无线数据采集控制系统;邢璐;别红霞;;微计算机信息(32);全文 *

Also Published As

Publication number Publication date
CN113573273A (en) 2021-10-29

Similar Documents

Publication Publication Date Title
US11026196B2 (en) Methods, devices, and systems for scheduled sensing
WO2022148477A1 (en) Wifi-based human body detection method, and smart device
CN104185141A (en) Bluetooth beacon device based system and method for detecting stay time of user in area
CN113065365B (en) Multi-subcarrier multi-address passive wireless sensing system based on backscattering technology
CN111918232A (en) Wireless Internet of things transmission system
CN113573273B (en) Wireless intelligent acquisition synchronization method and system based on Bluetooth transmission
CN107801107B (en) Method for realizing upper computer multi-data fusion interface of virtual time counter-passive direction finder
CN111510997A (en) Method and device for receiving signals
CN114915983A (en) Data acquisition method and device
CN111149313A (en) Data transmission method and equipment
CN203387692U (en) Wireless gateway equipment capable of data conversion of ZigBee signal with Wi-Fi signal
US20190082498A1 (en) Ultra low power sub-wireless sensor network (sub-wsn) for internet of things (iot) system
JP6438477B2 (en) Wireless communication apparatus and wireless communication method
CN113590888A (en) Data acquisition method of intelligent sensing device
CN114245200B (en) Monitoring scene change determining method, device, system and electronic device
CN114641056B (en) Processing unit and method for adjusting gain of receiver
CN220398611U (en) Humiture monitoring system
CN216286215U (en) Wireless analog quantity and switching value acquisition device based on WIFI
CN214098192U (en) Data acquisition unit and data acquisition system
CN116744226B (en) Electronic fence data acquisition method and electronic equipment
KR101584136B1 (en) Position tracking device module at three dimension
CN203414485U (en) Wireless accelerometer
CN215449265U (en) Thing networking soil and air temperature and humidity detection device based on loRa
CN213239035U (en) Be applicable to wireless temperature and humidity sensor closely
CN210488582U (en) Inspection well cover monitoring system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20230814

Address after: 401120 No.107 dataguzhong Road, Xiantao street, Yubei District, Chongqing

Applicant after: CHONGQING YOUMI INDUSTRIAL AUTOMATION EQUIPMENT Co.,Ltd.

Address before: 400000 No. 107, datagu Middle Road, Xiantao street, Yubei District, Chongqing

Applicant before: Yaomi (Chongqing) Intelligent Technology Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant