CN210247062U - Smart phone magnetic data exchange device based on spread spectrum modulation - Google Patents

Smart phone magnetic data exchange device based on spread spectrum modulation Download PDF

Info

Publication number
CN210247062U
CN210247062U CN201920697599.7U CN201920697599U CN210247062U CN 210247062 U CN210247062 U CN 210247062U CN 201920697599 U CN201920697599 U CN 201920697599U CN 210247062 U CN210247062 U CN 210247062U
Authority
CN
China
Prior art keywords
magnetic
data
smart phone
spread spectrum
data exchange
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
CN201920697599.7U
Other languages
Chinese (zh)
Inventor
Yangxia Xiang
向阳霞
Jianming Chen
陈建明
Caisen Chen
陈财森
Ziqiang Wang
王子强
Bingli Xu
徐丙立
Zhong Chen
陈重
Xiaoling Luo
罗晓玲
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.)
Academy of Armored Forces of PLA
Original Assignee
Academy of Armored Forces of PLA
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 Academy of Armored Forces of PLA filed Critical Academy of Armored Forces of PLA
Priority to CN201920697599.7U priority Critical patent/CN210247062U/en
Application granted granted Critical
Publication of CN210247062U publication Critical patent/CN210247062U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The utility model discloses a smart mobile phone magnetic data exchange device based on spread spectrum modulation, include: the system comprises a data exchange terminal, a smart phone and a background server; the data exchange terminal comprises a spread spectrum modulation unit, a BLE unit, a magnetic field emission unit, an NB-IoT communication unit and a direct current power supply unit; the smart phone comprises a built-in BLE module, a magnetometer sensor and a magnetic data demodulation module; the data exchange terminal is connected with the mobile phone through a BLE wireless link and a magnetic communication link and is connected with the background server through an NB-IoT wireless link. The data exchange terminal receives data to be sent, sends a BLE notification message and sends a magnetic data exchange frame; the smart phone continuously monitors BLE notification messages, and records receiving time and MAC addresses of the data exchange terminals; and forming a magnetic exchange data stream, packaging a magnetic data verification request and sending the magnetic data verification request to a background server for verification. The utility model discloses can improve anti magnetic field interference's ability and transmission distance, data transmission rate is fast.

Description

Smart phone magnetic data exchange device based on spread spectrum modulation
Technical Field
The utility model belongs to the technical field of data communication, a smart mobile phone magnetism data exchange technique is related to, especially relate to smart mobile phone magnetism data exchange device based on spread spectrum modulation, utilize the built-in magnetometer sensor of smart mobile phone, realize the magnetism data exchange that the distance is greater than 10cm through carrying out the spread spectrum modulation to magnetic field signal.
Background
The short-distance (near-field) communication has the advantages of short distance, high safety and the like, the mainstream technology of the short-distance communication of the smart phone is NFC (the communication distance is less than 10cm), and the near-field communication has important application value in the fields of payment, entrance guard, bus taking and the like. The iPhone mobile phone introduced by apple has integrated the NFC function since iPhone6, and Android mobile phone manufacturers such as samsung, millet and hua are all popularizing NFC in mid-to-high-end models of mobile phones.
Taking an automobile door lock as an example, the automobile door lock successively experiences key manual door opening, remote key manual remote door opening and Keyless door opening (PKE), the automobile provided with the PKE system does not need an automobile owner to take out a key, and the automobile door can be opened as long as the key is placed in a carry-on pocket, and the automobile owner can be automatically locked when the automobile owner leaves the pocket and the automobile owner is close to the automobile. Due to good user experience, the vehicle model is a necessary configuration for high-mix vehicle models of most vehicle models.
Subject to a range of less than 10cm, NFC cannot provide a PKE-like user experience. WiFi is far away from Bluetooth Low Energy (BLE), and it is difficult to limit the communication distance within a specified range, such as 0.5m or 1m, by controlling the transmission power due to the complicated indoor electromagnetic wave propagation environment.
SUMMERY OF THE UTILITY MODEL
In order to overcome above-mentioned prior art not enough, the utility model provides a smart mobile phone magnetism data exchange device based on spread spectrum modulation, spread spectrum modulation technique based on code division multiple access CDMA communication system, carry out the special data exchange terminal of spread spectrum modulation to transmission magnetic field signal through the design, utilize built-in magnetometer of smart mobile phone and magnetic field signal demodulation module, realize from data exchange terminal to smart mobile phone, the distance is greater than 10 cm's data interchange, can realize providing similar PKE's user experience through smart mobile phone from this.
The utility model provides a technical scheme is:
a smart phone magnetic data exchange device based on spread spectrum modulation comprises: data exchange terminal, smart mobile phone and backstage server. The data exchange terminal comprises a spread spectrum modulation unit, a low-power consumption Bluetooth BLE unit, a magnetic field emission unit, a narrowband Internet of things NB-IoT communication unit and a direct current power supply unit. The smart phone comprises a built-in BLE module, a magnetometer sensor and a magnetic data demodulation module (APP software); the data exchange terminal is connected with the smart phone through a wireless link (the working frequency Band is 2.4GHz) of the low-power-consumption Bluetooth BLE unit and a magnetic communication link of the magnetic field emission unit, and is connected with the background server through an NB-IoT (Narrow-Band Internet of Things) wireless link. The smart phone is connected with the background server through a wireless link (3G/4G).
In the data exchange terminal, the spread spectrum modulation unit is an embedded Microcontroller (MCU) of the data exchange terminal, realizes spread spectrum modulation of magnetic signals by adopting an embedded software or hardware acceleration core mode, and is provided with a plurality of paths of general input and output (GPIO) interfaces, at least 1 path of universal asynchronous receiver/transmitter (UART) interfaces and at least 1 path of Serial Peripheral (SPI) interfaces, wherein the GPIO interfaces are connected with the magnetic field emission unit, the UART interfaces are connected with the NB-IoT communication unit, and the SPI interfaces are connected with the BLE unit to realize the control and data transmission of the BLE unit. The BLE unit consists of a BLE chip and a PCB (printed Circuit Board) microstrip antenna with the frequency band of 2.4GHz and is used for transmitting the BLE notification message at a fixed frequency period. The NB-IoT communication unit is connected with the background server based on the NB-IoT wireless communication link, and acquires magnetic exchange data to be sent from the background server. The direct current power supply unit provides a working power supply for the data exchange terminal.
The magnetic field emission unit comprises 3 groups of magnetic excitation modules consisting of square wound coils and series resistors, and the wound coils of the 3 groups of magnetic excitation modules are orthogonal in space and are respectively called X, Y, Z-axis magnetic excitation modules (the square coil of the Z-axis magnetic excitation module is parallel to the ground plane, and the square coils of the X-axis and Y-axis magnetic excitation modules are perpendicular to the ground plane and are mutually perpendicular). The spread spectrum modulation unit is set as output GPIOs through 6 paths (X, Y, Z axis magnetic excitation modules correspond to 2 paths of GPIOs respectively), and magnetic exchange data after spread spectrum modulation are sent to the smart phone through the magnetic field transmitting unit. The side length, the number of turns and the current passing through the square wound coil determine the strength of the transmitted magnetic field signal.
Optionally, in order to improve the signal strength of the magnetic signal, the magnetic field emission unit may include 3 full-bridge driving circuits (X, Y, Z axis magnetic excitation modules correspond to 1 full-bridge driving circuit respectively), so as to improve the current driving capability, increase the current passing through the magnetic excitation module coil, and increase the magnetic field strength.
Further, the voltage of the dc power supply unit may be 5V, 9V, and 12V, and 9V by default.
The spread spectrum modulation unit of the data exchange terminal modulates the exchange data by N-order spread spectrum modulation, namely, the sequence with the length of N is used to transmit log2N data bits. The sequences have good autocorrelation and cross-correlation properties approaching 0, such as Gold, Walsh sequences, etc. For simplicity of description, the present invention takes Walsh sequences as an example, but not limited to Walsh sequences. And comprehensively considering the data rate and the transmission distance, wherein N takes values of 8, 16 and 32, and defaults to 16. The larger the N is, the larger the number of,the farther the transmission distance, the stronger the earth's magnetic field interference resistance, but the lower the data exchange rate.
The magnetic data exchange is transmitted in the form of frames, and in consideration of the jitter of a sampling clock of a built-in magnetometer of the smart phone, for example, when the sampling frequency is 50Hz, the sampling interval of the smart phone is jittered between 18 ms and 24ms and is not stabilized at 20ms (the sampling interval is less variable and is between 19 ms and 21ms due to more stable performance of the magnetometer of a high-end phone), so that the duration of a single sample point (which is a minimum unit in the magnetic data exchange frame and in which the intensity of the emitted magnetic field is kept at a specified value) of a magnetic data exchange frame should be not less than the maximum sampling interval of the built-in magnetometer of the smart phone when the sampling frequency is set (for example, when the built-in magnetometer of the smart phone sets the sampling frequency to be 50Hz, the maximum sampling interval is 24ms), so as to prevent the sampling clock jitter from causing the loss of the magnetic field intensity (unit is uT) of a sample value of a certain sample point in the magnetic data exchange frame.
The frame length and the frame structure of the magnetic data exchange depend on the spread spectrum modulation order N, and the duration of a single sampling point is T ms as an example:
when a.n ═ 16, the frame length is 20 × T ms, the frame header is 4 × T ms, and the frame includes 4 samples of "0 level", and the frame body is 16 × Tms, and a Walsh sequence of 16 length determined by 4bits of data is transmitted in accordance with 16 samples of "-level" and "+ level".
When b.n is 8, the frame length is 10 × T ms, the frame header 2 × T ms includes 2 "0 level" samples, and the frame body 8 × T ms transmits 1 Walsh sequence with a length of 8, and carries 3bits of data.
When C.N is 32, the frame length is 40 × T ms, the frame header 8 × T ms includes 8 "0 level" samples, and the frame body 32 × T ms transmits 1 Walsh sequence of length 32 and carries 5bits of data.
When the level is 0, 2 paths of GPIOs corresponding to X, Y, Z axis magnetic excitation modules of the magnetic field emission unit are all set to be low level; when the current level is + level, X, Y, Z axis magnetic excitation modules respectively correspond to 2 paths of GPIOs, wherein 1 path of GPIOs (a first path of GPIO) is set to be high level, and the other 1 path of GPIOs (a second path of GPIO) is set to be low level; and when the voltage is at the "-level", the first path of GPIO corresponding to each X, Y, Z axis magnetic excitation module is set to be at the low level, and the second path of GPIO is set to be at the high level.
Further, the duration of a single sample of the magnetic data exchange frame is set to 25ms by default.
The data exchange terminal periodically sends BLE notification information, and the notification information carries the data exchange terminal type identification UUID, the 1-byte spread spectrum modulation order and the data transmission state field. The lower 6bits of the byte represents the modulation order, 000000 represents 8-order modulation, 000001 represents 16-order modulation, 000010 represents 32-order modulation, and 000011-; when the high 2bits is 00, the new data starts, 01 corresponds to the current data transmission, and 11 indicates the magnetic data transmission of the last frame. The period of the BLE advertisement message defaults to 1 s.
After a magnetic data demodulation module in the smart phone detects a magnetic data exchange frame header through the change of the sample value of the magnetometer, according to the spread spectrum modulation order, all Walsh sequences corresponding to the order are respectively correlated with all sample values corresponding to the frame body to obtain a correlation value corresponding to each Walsh sequence, the Walsh sequence with the maximum correlation value is a transmitted Walsh sequence, and the data bits corresponding to the Walsh sequence is magnetic exchange data.
The correlation calculation of one Walsh sequence is specifically: when a certain element of the Walsh sequence is-1, the corresponding sampling value symbol is inverted, when a certain element of the Walsh sequence is +1, the corresponding sampling value symbol is kept unchanged, and the sampling values of all frame body sampling points are accumulated to be used as the correlation value of the Walsh sequence.
Because the cross-correlation of the Walsh sequences is 0, under an ideal situation without interference, only 1 Walsh sequence of the N-th order Walsh sequences has a correlation value much greater than 0, and the remaining N-1 Walsh sequences have a correlation value of 0.
Further, the smart phone comprises an iPhone and an Android phone, and the BLE module is in an open state.
Further, the sampling rate supported by the built-in magnetometer of the smart phone is not lower than 50Hz, and the default sampling rate is 50 Hz.
The background server is located at the cloud end, parameter configuration and data to be sent updating are carried out on the data exchange terminal through the operator NB-IoT wireless link, and magnetic exchange data received by the smart phone are verified.
When the smart phone magnetic data exchange device based on spread spectrum modulation works, the method comprises the following steps:
the method comprises the steps that firstly, a data exchange terminal is started, configuration parameters such as modulation orders are obtained from a background server through an NB-IoT link, then initialization configuration is completed, data to be sent are received, BLE notification messages in a specified format are sent in a specified frequency period, and then magnetic data exchange frames in a specified frame format are sent immediately;
and step two, after the smart phone is started, the BLE module continuously monitors BLE notification messages in a specified format, the magnetic data demodulation module is on duty, and the magnetometer is in a dormant state.
Step three, recording the receiving time of the BLE notification message and the MAC address of the data exchange terminal after the BLE notification message with the specified format is captured by the BLE module, and acquiring the spread spectrum modulation order and the data transmission state:
A. and if the data transmission state is the beginning of new data, after the magnetic data demodulation module starts the magnetometer, setting a specified sampling rate to perform magnetic field sampling, wherein the subsequent operation is the same as the operation in the data transmission state.
B. If the data transmission state is in data transmission, continuing to perform magnetic field sampling, and detecting a frame header based on a predefined frame format corresponding to the spread spectrum modulation order:
if the frame head is detected, recording the current position and the geomagnetic intensity at the current moment, continuing to sample the magnetic field, demodulating the magnetic data exchange frame body, and locally caching the demodulated data bits;
otherwise, the magnetic data demodulation module reenters the watch and sets the magnetometer to be dormant.
C. Otherwise, the same operation as that in the data transmission state is executed, after the operation is completed, the multi-frame demodulation data cached locally form a magnetic exchange data stream, and the magnetic exchange data stream, the MAC address of the data exchange terminal, the magnetic exchange data stream and the MAC address of the data exchange terminal are packaged into a magnetic data verification request to be sent to the background server for verification. And the magnetic data demodulation module reenters the watch and sets the magnetometer to be dormant so as to save the power consumption of the smart phone.
And step four, the background server receives a magnetic data verification request sent by the smart phone, compares the magnetic data verification request with corresponding information in the received magnetic data verification request according to the data exchange terminal MAC address, the magnetic exchange data stream and the validity period information stored in the local database, if the magnetic data verification request is consistent and within the validity period, the verification is successful, otherwise, the verification fails, and sends a verification result to the smart phone.
After the smart phone receives the verification result returned by the background server, if the verification is successful, the magnetic data exchange is successful; otherwise, the magnetic data exchange is unsuccessful.
Because the sample point duration of the magnetic data exchange frame is different from the sample interval of the magnetometer, the sample time information of the magnetometer must be considered when the magnetic data is demodulated, and the demodulation process of the magnetic data demodulation module in the third step is as follows:
31) 1 st sampling point detection of a magnetic data exchange frame: and if the time difference between the sampling time of the 1 st sampling point of the magnetometer and the receiving time of the BLE notification message is less than the set duration time of a single sampling point (default is 25ms), the 1 st sampling point is considered to be valid, and the sampling value is the value of the first sampling point.
32) Magnetic data exchange frame header detection: the magnetometer continuously samples a plurality of sampling points, and records the value and the sampling time of each sampling point until the distance between the sampling time of the sampling points and the receiving time of the BLE notification message is longer than the time length of the frame header. Selecting 1 sampling point farthest from the boundary of each sampling point duration interval, judging that the frame header detection is successful when the difference of the sampling values of the sampling points is less than a specified threshold, and recording the average sampling value of the sampling points as the intensity of the earth magnetic field at the current moment and the current position; otherwise, the demodulation process is terminated.
33) Magnetic data exchange frame body demodulation: and continuously sampling according to the frame duration, selecting 1 sampling point farthest from the interval boundary in each sampling point duration interval, and recording the difference value between the real sampling value and the geomagnetism as the processed sampling point sampling value. And then, correlating all Walsh sequences with corresponding orders with the sampling values processed by all sampling points, wherein the data bits corresponding to the Walsh sequence with the maximum correlation value is the magnetic exchange data.
Furthermore, by selecting 1 sampling point farthest from the boundary of each sampling point duration interval, the system is ensured not to sample edge signals between adjacent sampling points with level conversion caused by jitter of a sampling clock of a magnetometer sensor of the intelligent mobile phone, and the reliability of magnetic data exchange is improved.
Compared with the prior art, the beneficial effects of the utility model are that:
the utility model provides a smart mobile phone magnetic data exchange device based on spread spectrum modulation adopts the spread spectrum modulation to improve anti magnetic field interference's ability and transmission distance, during the concrete implementation, when adopting 8 th order spread spectrum modulation and frame length to be 250ms, can be in the highest data transmission rate that provides 12bps of distance department that is greater than 10cm, and data transmission rate is fast, provides similar PKE's experience for the smart mobile phone.
Drawings
Fig. 1 is a schematic view of the structure of the device according to the present invention.
Fig. 2 is a schematic view of the structure of the magnetic field emission unit of the device according to the present invention.
Fig. 3 is a signal waveform diagram of a magnetic data exchange frame modulated by 8-order and 16-order Walsh spreading according to an embodiment of the present invention.
Fig. 4 is a block diagram of a flow chart for implementing magnetic data exchange based on spread spectrum modulation according to the present invention.
Fig. 5 is a block diagram of a flow chart of magnetic data exchange frame demodulation by using the magnetic data demodulation module of the present invention.
Detailed Description
The invention will be further described by way of examples, without in any way limiting its scope, with reference to the accompanying drawings.
As shown in fig. 1, a smart phone magnetic data exchange device based on spread spectrum modulation includes: data exchange terminal, smart mobile phone and backstage server. The data exchange terminal is connected with the smart phone through the 2.4GHz BLE wireless link and the magnetic communication link and is connected with the background server through the NB-IoT wireless link. The smart phone is connected with the background server through a 3G/4G wireless link.
The data exchange terminal comprises a spread spectrum modulation unit, a low-power consumption Bluetooth BLE unit, a magnetic field emission unit, a narrowband Internet of things NB-IoT communication unit and a direct current power supply unit. The spread spectrum modulation unit is an embedded microcontroller MCU of a data exchange terminal, realizes spread spectrum modulation of magnetic signals by adopting an embedded software or hardware acceleration core mode, and is provided with a plurality of general input/output GPIO interfaces, at least 1 universal asynchronous transceiving UART interfaces and at least 1 serial peripheral SPI interface, wherein the GPIO interfaces are connected with the magnetic field emission unit, the UART interfaces are connected with the NB-IoT communication unit, and the SPI interfaces are connected with the BLE unit to realize the control and data transmission of the BLE unit. The BLE unit consists of a BLE chip and a PCB microstrip antenna with the frequency band of 2.4GHz and is used for periodically transmitting BLE notification messages at fixed frequency. The NB-IoT communication unit is connected with the background server based on the NB-IoT wireless communication link, and acquires magnetic exchange data to be sent from the background server. The direct current power supply unit provides a working power supply for the data exchange terminal.
As shown in fig. 2, the magnetic field emission unit includes 3 groups of magnetic excitation modules including square coils and series resistors, where the coils of the 3 groups of magnetic excitation modules are orthogonal in space (the square coil of the Z-axis magnetic excitation module is parallel to the ground plane, and the square coils of the X-axis and Y-axis magnetic excitation modules are perpendicular to the ground plane and are perpendicular to each other), which are respectively called X, Y, Z-axis magnetic excitation modules. The spread spectrum modulation unit is set to output GPIOs through 6 paths (X, Y, Z axis magnetic excitation modules respectively correspond to 2 paths of GPIOs, and are respectively marked as X axis GPIO-A, X axis GPIO-B, Y axis GPIO-A, Y axis GPIO-B, Z axis GPIO-A and Z axis GPIO-B in the figure), and magnetic exchange datA after spread spectrum modulation is sent to the smart phone through the magnetic field emission unit. The side length, the number of turns and the current passing through the square wound coil determine the strength of the transmitted magnetic field signal.
Optionally, in order to improve the signal strength of the magnetic signal, the magnetic field emission unit may include 3 full-bridge driving circuits (X, Y, Z axis magnetic excitation modules correspond to 1 full-bridge driving circuit respectively), so as to improve the current driving capability, increase the current passing through the magnetic excitation module coil, and increase the magnetic field strength.
Further, the voltage of the dc power supply unit may be 5V, 9V, and 12V, and 9V by default.
The spread spectrum modulation unit of the data exchange terminal modulates the exchange data by N-order spread spectrum modulation, namely, the sequence with the length of N is used to transmit log2N data bits: as shown in fig. 3, when N is 8, 3 data bits can be transmitted, and when N is 16, 4 data bits can be transmitted. The sequences have good autocorrelation and cross-correlation properties approaching 0, such as Gold, Walsh sequences, etc. For simplicity of description, the present invention takes Walsh sequences as an example, but not limited to Walsh sequences. And comprehensively considering the data rate and the transmission distance, wherein N takes values of 8, 16 and 32 and defaults to 16. The larger N is, the longer the transmission distance is, the stronger the magnetic field interference resistance is, but the lower the data exchange rate is.
Magnetic data exchange is transmitted in the form of frames, considering the jitter of the sampling clock of the built-in magnetometer of the smart phone, for example, when the sampling frequency is 50Hz, the sampling interval of the smart phone will jitter between 18-24ms, but is unstable at 20ms (the high-end phone has less variation of sampling interval due to more stable performance of the magnetometer), so the duration of a single sample point of a magnetic data exchange frame should not be less than the maximum sampling interval of the built-in magnetometer of the smart phone when the sampling frequency is set (for example, when the built-in magnetometer of the smart phone sets the sampling frequency to be 50Hz, the maximum sampling interval is 24ms), and the sampling clock jitter of the magnetometer is prevented from losing the sampling value of a certain sample point in the magnetic data exchange frame, the duration of a single sample point is set to be 25ms by default.
The magnetic data exchange frame length and the frame structure depend on the spread spectrum modulation order N, taking the single sampling point duration of 25ms as an example:
Figure DEST_PATH_GDA0002255047100000071
as shown in fig. 3(a.1), when N is 8, the frame length is 250ms, the frame header is 50ms, and includes 2 samples of "0 level", the frame body is 200ms, corresponding to 8 samples of "-level" and "+ level", a Walsh sequence of 8 length determined by 3bits of data is transmitted, and the data exchange rate is 12 bps.
Figure DEST_PATH_GDA0002255047100000072
As shown in fig. 3(b.1), when N is 16, the frame length is 500ms, the frame header is 100ms, and includes 4 samples of "0 level", the frame body is 400ms, corresponding to 16 samples of "-level" and "+ level", a Walsh sequence of 16 length determined by 4bits of data is transmitted, and the corresponding rate is 8 bps.
Figure DEST_PATH_GDA0002255047100000073
When N is 32, the frame length is 1s, the frame header is 200ms, and includes 8 "0 level" samples, the frame body is 800ms, 1 Walsh sequence with length of 32 is transmitted, and carries 5bits of data, and the data exchange rate is 5 bps.
When the level is 0, 2 paths of GPIOs corresponding to the X, Y, Z shaft magnetic excitation modules are all set to be low; when the voltage level is + level, X, Y, Z axis magnetic excitation modules respectively correspond to 2 paths of GPIOs, wherein GPIO-A is set to be high level, and GPIO-B is set to be low level; when the power level is negative, X, Y, Z axis magnetic excitation modules respectively corresponding GPIO-A is set to be low level, and GPIO-B is set to be high level.
The data exchange terminal periodically sends BLE notification information, and the BLE notification information carries the data exchange terminal type identification UUID, the 1-byte spread spectrum modulation order and the data transmission state field. The lower 6bits of the byte represents the modulation order, 000000 represents 8-order modulation, 000001 represents 16-order modulation, 000010 represents 32-order modulation, and 000011-; when the high 2bits is 00, the new data starts, 01 corresponds to the current data transmission, and 11 indicates the magnetic data transmission of the last frame. The transmission cycle interval of the BLE advertisement message defaults to 1 s.
The smart phone comprises a built-in BLE module, a magnetometer sensor and a magnetic data demodulation module in a software APP form. After detecting the magnetic data exchange frame head through the change of the magnetometer sampling value, the magnetic data demodulation module uses all Walsh sequences corresponding to the order to correlate with all sampling values corresponding to the frame body according to the spread spectrum modulation order to obtain a correlation value corresponding to each Walsh sequence, the Walsh sequence with the maximum correlation value is a transmitted Walsh sequence, and the data bits corresponding to the Walsh sequence is magnetic exchange data.
The correlation calculation of one Walsh sequence is specifically: when a certain element of the Walsh sequence is-1, the corresponding sampling value symbol is inverted, when a certain element of the Walsh sequence is +1, the corresponding sampling value symbol is kept unchanged, and the sampling values of all frame body sampling points are accumulated to be used as the correlation value of the Walsh sequence.
Because the cross-correlation of the Walsh sequences is 0, under an ideal situation without interference, only 1 Walsh sequence of the N-th order Walsh sequences has a correlation value much greater than 0, and the remaining N-1 Walsh sequences have a correlation value of 0.
Further, the smart phone comprises an iPhone and an Android phone, and the BLE module is in an open state.
Further, the sampling rate supported by the built-in magnetometer of the smart phone is not lower than 50Hz, and the default sampling rate is 50 Hz.
The background server is located at the cloud end, parameter configuration and data to be sent updating are carried out on the data exchange terminal through the operator NB-IoT wireless link, and magnetic exchange data received by the smart phone are verified.
As shown in fig. 4, the utility model discloses smart mobile phone magnetic data exchange device based on spread spectrum modulation is at the during operation, including following step:
the method comprises the steps that firstly, a data exchange terminal is started, configuration parameters such as modulation orders are obtained from a background server through an NB-IoT link, then initialization configuration is completed, data to be sent are received, BLE notification messages in a specified format are sent in a specified frequency period, and then magnetic data exchange frames in a specified frame format are sent immediately;
and step two, after the smart phone is started, the BLE module continuously monitors BLE notification messages in a specified format, the magnetic data demodulation module is on duty, and the magnetometer is in a dormant state.
Step three, recording the receiving time of the BLE notification message and the MAC address of the data exchange terminal after the BLE notification message with the specified format is captured by the BLE module, and acquiring the spread spectrum modulation order and the data transmission state:
if the data transmission state is the beginning of new data, the magnetic data demodulation module starts the magnetometer and then demodulates the exchange data, and the operation is the same as the operation when the data transmission state is data transmission.
If the data transmission state is in data transmission, continuing to perform magnetic field sampling, and detecting a frame header based on a predefined frame format corresponding to the spread spectrum modulation order:
■ if the frame head is detected, recording the current position and the geomagnetic intensity at the current moment, continuing to sample the magnetic field, demodulating the magnetic data exchange frame body, and locally caching the demodulated data bits;
■ otherwise, the magnetic data demodulation module re-enters the watch, setting the magnetometer to sleep.
And if not, executing the same operation as that in the data transmission state, forming the multi-frame demodulation data cached locally into a magnetic exchange data stream after the operation is finished, packaging the magnetic exchange data stream and the MAC address of the data exchange terminal into a magnetic data verification request, and sending the magnetic data verification request to the background server for verification. And the magnetic data demodulation module reenters the watch and sets the magnetometer to be dormant so as to save the power consumption of the smart phone.
And step four, the background server receives a magnetic data verification request sent by the smart phone, verifies according to the data exchange terminal MAC address, the magnetic exchange data stream and the validity period information stored in the local database, and sends a verification result to the smart phone.
After the smart phone receives the verification result returned by the background server, if the verification is passed, the magnetic data exchange is successful; otherwise, the magnetic data exchange is unsuccessful.
Because the sample point duration of the magnetic data exchange frame is different from the sample interval of the magnetometer, the magnetometer sample time information must be considered when demodulating the magnetic data, and the demodulation process of the magnetic data demodulation module in the above step three is shown in fig. 5, and includes the following steps:
step one, detecting the 1 st sampling point of a magnetic data exchange frame: the sample time of the 1 st sample point of the magnetometer is compared with the BLE advertisement message reception time, and if less than a single sample duration (25 ms by default), the sample is considered valid.
Step two, magnetic data exchange frame header detection: as shown in fig. 2, the magnetometer continuously samples a plurality of samples, and records the value and the sampling time of each sample until the sampling time of the sample is longer than the frame header duration from the time when the BLE advertisement message is received. Selecting 1 sampling point farthest from the boundary of each sampling point duration interval, judging that the frame header detection is successful when the difference of the sampling values of the sampling points is less than a specified threshold, and recording the average sampling value of the sampling points as the intensity of the earth magnetic field at the current moment and the current position; otherwise, the demodulation process is terminated.
Step three, magnetic data exchange frame body demodulation: and continuously sampling according to the frame duration, selecting 1 sampling point farthest from the interval boundary in each sampling point duration interval, and recording the difference value between the real sampling value and the geomagnetism as the processed sampling point sampling value. And then, correlating all Walsh sequences with corresponding orders with the sampling values processed by all sampling points, wherein the data bits corresponding to the Walsh sequence with the maximum correlation value is the magnetic exchange data.
Furthermore, 1 sampling point farthest from the interval boundary is selected in each sampling point duration interval, so that the system is ensured not to sample edge signals between adjacent sampling points subjected to level conversion due to the jitter of a sampling clock of a magnetometer sensor of the intelligent mobile phone, and the reliability of magnetic data exchange is improved.
Taking 8-order Walsh sequence spread spectrum modulation as an example, the smartphone correlates 8 Walsh sequences in (a.2) in fig. 3 with the processed 8 sample values, and when the transmission bit is 010, the smartphone correlates 8 sample values corresponding to 8 sample values "T T-T" (T is the size of the sample value, and geomagnetic noise is not considered), and when correlation operation is performed, in addition to the Walsh sequence "11-1-111-1-1" which can generate the accumulation of the sample values of 8 sample points with the symbol, i.e., T1 + (-T) (-1) + (-T) (-8T), the 8 sample points of the other 7 Walsh sequences are different from the sequence symbol, which results in mutual cancellation of the sample point sample values, for example, the Walsh sequence "1-11-11-11-1" corresponding to bit s is 001-11-11-1 "and" T T-T "(-8T) (-T) corresponding to bit s is 010 -T-T "correlation, resulting in a correlation value of T x 1+ T (-1) + (-T) × 1+ (-T) × (-1) + (-T) × 1+ T (-1) + (-T) × 1+ (-T) (-0, much less than the correlation value of 8T corresponding to Walsh sequence" 11-1-111-1-1 ", thereby determining that the magnetic exchange data is 010.
It is noted that the disclosed embodiments are intended to aid in further understanding of the invention, but those skilled in the art will appreciate that: various substitutions and modifications are possible without departing from the spirit and scope of the present invention and the appended claims. Therefore, the present invention should not be limited to the embodiments disclosed, and the scope of the present invention is defined by the appended claims.

Claims (9)

1. A smart phone magnetic data exchange device based on spread spectrum modulation comprises: the system comprises a data exchange terminal, a smart phone and a background server; the data exchange terminal is characterized by comprising a spread spectrum modulation unit, a low-power-consumption Bluetooth unit, a magnetic field emission unit, a narrow-band Internet of things communication unit and a direct current power supply unit; the smart phone comprises a built-in low-power-consumption Bluetooth module, a magnetometer sensor and a magnetic data demodulation module; the data exchange terminal is connected with the smart phone through a low-power-consumption Bluetooth wireless link and a magnetic communication link and is connected with the background server through a narrow-band Internet of things wireless link; the smart phone is connected with the background server through a wireless link;
in the data exchange terminal:
the spread spectrum modulation unit is an embedded microcontroller of a data exchange terminal, is provided with a plurality of paths of universal input and output interfaces, at least 1 path of universal asynchronous receiving and transmitting interfaces and at least 1 path of serial peripheral interfaces, and is used for realizing spread spectrum modulation of magnetic signals; the universal input/output interface is connected with the magnetic field transmitting unit, the universal asynchronous receiving/transmitting interface is connected with the narrow-band Internet of things communication unit, and the serial peripheral interface is connected with the low-power-consumption Bluetooth unit and used for realizing control and data transmission of the low-power-consumption Bluetooth unit;
the low-power Bluetooth unit is used for transmitting a low-power Bluetooth notification message at a fixed frequency period; the method comprises the steps that a background server is connected through a narrow-band Internet of things wireless communication link, and magnetic exchange data to be sent are obtained from the background server;
the magnetic field emission unit comprises 3 groups of magnetic excitation modules consisting of wound coils and series resistors; the wound coils of the magnetic excitation module are orthogonal in space and are respectively an X-axis magnetic excitation module, a Y-axis magnetic excitation module and a Z-axis magnetic excitation module; determining the strength of the transmitted magnetic field signal through the side length and the number of turns of the wound coil and through current;
the spread spectrum modulation unit transmits the magnetic exchange data after spread spectrum modulation to the smart phone through a magnetic field transmitting unit through a universal input/output interface with 6 paths set as output;
the direct current power supply unit is used for providing a working power supply;
the magnetic data demodulation module in the smart phone is used for detecting a magnetic data exchange frame header through the change of the magnetic field intensity sampling value of the magnetometer sensor; obtaining a transmitted sequence according to the spread spectrum modulation order of the spread spectrum modulation unit, wherein bit data corresponding to the sequence is magnetic exchange data;
the background server is located at the cloud end and used for carrying out parameter configuration and data updating to be sent on the data exchange terminal through the narrow-band internet of things wireless link and verifying the magnetic exchange data received by the smart phone.
2. The device according to claim 1, wherein the bluetooth low energy unit comprises a BLE chip and a PCB microstrip antenna.
3. The device for exchanging magnetic data of a smart phone based on spread spectrum modulation as claimed in claim 2, wherein the frequency band of the PCB microstrip antenna is 2.4GHz PCB microstrip antenna.
4. The smart phone magnetic data exchange device based on spread spectrum modulation as claimed in claim 1, wherein in the magnetic field emission unit, the wound coil is a square coil; the square coil of the Z-axis magnetic excitation module is parallel to the ground plane; the square coils of the X-axis magnetic excitation module and the Y-axis magnetic excitation module are vertical to the ground plane and are mutually vertical; the X-axis magnetic excitation module, the Y-axis magnetic excitation module and the Z-axis magnetic excitation module respectively correspond to the 2-path general input and output interface.
5. The device for exchanging magnetic data of a smart phone based on spread spectrum modulation as claimed in claim 1, wherein said magnetic field emission unit further comprises 3 paths of full bridge driving circuits, corresponding to the X-axis magnetic excitation module, the Y-axis magnetic excitation module, and the Z-axis magnetic excitation module, respectively.
6. The magnetic data exchange device of the smart phone based on the spread spectrum modulation as claimed in claim 1, wherein the voltage of the dc power supply unit is 5V, 9V or 12V.
7. The magnetic data exchange device of the smart phone based on the spread spectrum modulation as claimed in claim 6, wherein the voltage of the DC power supply unit is 9V.
8. The device as claimed in claim 1, wherein the spread spectrum modulation unit of the data exchange terminal modulates the exchanged data by N-order spread spectrum modulation, that is, transmits log by using a sequence with length N2N bit data; the sequences include, but are not limited to, Gold sequences or Walsh sequences; and N is 8, 16 or 32.
9. The device for exchanging magnetic data of a smart phone based on spread spectrum modulation according to claim 1, wherein the smart phone comprises an iPhone phone and an Android phone; the sampling rate of a built-in magnetometer of the smart phone is not lower than 50 Hz; the smart phone is connected with the background server through a 3G or 4G wireless link; the low-power-consumption Bluetooth module is in an open state, and the low-power-consumption Bluetooth wireless link is 2.4 GHz.
CN201920697599.7U 2019-05-15 2019-05-15 Smart phone magnetic data exchange device based on spread spectrum modulation Active CN210247062U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201920697599.7U CN210247062U (en) 2019-05-15 2019-05-15 Smart phone magnetic data exchange device based on spread spectrum modulation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201920697599.7U CN210247062U (en) 2019-05-15 2019-05-15 Smart phone magnetic data exchange device based on spread spectrum modulation

Publications (1)

Publication Number Publication Date
CN210247062U true CN210247062U (en) 2020-04-03

Family

ID=69969881

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201920697599.7U Active CN210247062U (en) 2019-05-15 2019-05-15 Smart phone magnetic data exchange device based on spread spectrum modulation

Country Status (1)

Country Link
CN (1) CN210247062U (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112040452A (en) * 2019-05-15 2020-12-04 中国人民解放军陆军装甲兵学院 Smart phone magnetic data exchange device and method based on spread spectrum modulation

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112040452A (en) * 2019-05-15 2020-12-04 中国人民解放军陆军装甲兵学院 Smart phone magnetic data exchange device and method based on spread spectrum modulation
CN112040452B (en) * 2019-05-15 2024-06-25 中国人民解放军陆军装甲兵学院 Smart phone magnetic data exchange device and method based on spread spectrum modulation

Similar Documents

Publication Publication Date Title
Froytlog et al. Ultra-low power wake-up radio for 5G IoT
CN112368970B (en) Tag device, electronic device, communication method, and storage medium in wireless communication system
WO2012136883A1 (en) Method, apparatus, and computer program product for special dedicated inquiry and inquiry response process for dedicated device search
JPWO2005094046A1 (en) Wireless communication system, fixed information device, portable terminal device
JPWO2013077100A1 (en) Portable machine
CN109586768B (en) Near field communication method based on magnetic sensor
JP2012253744A (en) Method for receiving channel selection information
CN210247062U (en) Smart phone magnetic data exchange device based on spread spectrum modulation
JP2017063405A (en) Data transmitter for correcting standard compliant radio signal
CN204598328U (en) A kind of double frequency WiFi module based on honeycomb fashion arouse machine processed
CN112040452B (en) Smart phone magnetic data exchange device and method based on spread spectrum modulation
CN202353560U (en) Bluetooth technology based mobile phone item finding apparatus
WO2023000175A1 (en) Wireless communication method, first device, and second device
CN203681483U (en) Automobile anti-theft device
CN104660536A (en) A conditioning system for directly sending subcarrier with active tag
CN115189860A (en) Method and apparatus for data signal transmission in network device
CN116918262A (en) Wireless communication method, terminal equipment and network equipment
JP4079196B2 (en) Wireless alarm device and program thereof
JP2009130622A (en) Information processor, radio device, setting change method, and program
JP2007195154A (en) Communication system, wireless alarm unit, and program thereof
CN118202718A (en) Information transmission method, terminal equipment and network equipment
CN110235379A (en) Clear channel assessment (CCA)
CN117136485A (en) Communication method and device, terminal equipment and network equipment
CN117353804B (en) Environment backscattering communication method and communication equipment
CN117204115A (en) Wireless communication method, terminal device and network device

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant