Method and device for pairing and controlling electric bed based on Bluetooth communication protocol
Through the automatic pairing and control method based on the Bluetooth communication protocol, the automatic identification of the electric bed and the precise control of the snoring function are realized, which solves the problem of inconsistent motor load caused by different user weights in the prior art, and improves sleep quality.
Patent Information
- Application Number
- CN202311323953.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-12
- Publication Date
- 2025-04-15
AI Technical Summary
When the existing electric beds realize the anti-snoring function, they cannot accurately judge the user's weight, resulting in different motor loads and inconsistent head lifting angles, which affects the quality of sleep.
The automatic pairing and control method based on the Bluetooth communication protocol is adopted to determine the relative position of the electric bed through the Bluetooth signal transmission angle, and calculate the relative angle through AOA direction finding to automatically identify the left and right beds. At the same time, the motor running rate is adjusted in real time according to the user's weight, and the motor is controlled to slowly lift the head bed board through PWM speed regulation.
The automatic left and right bed setting of the electric bed and the precise control of the snoring function are realized, which reduces the user's operating burden, improves the accuracy and reliability of bed control, and ensures the snoring effect of users with different weights.
Smart Images

Figure CN119817934A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric bed control, and in particular to a method and device for pairing and controlling an electric bed based on a Bluetooth communication protocol. Background Art
[0002] With the improvement of modern living standards, electric smart beds have gradually entered various families. Compared with ordinary beds in the past, electric smart beds have added many powerful functions; each electric smart bed will be equipped with a remote control and a controller. Press the remote control button to control the lifting angle of the back and foot of the bed to achieve different modes, such as flat, reading and TV mode. At the same time, the controller includes a communication interface. When two single beds are combined into a double bed, the left side of a single bed is attached to the right side of another single bed, and a synchronization line is used to connect the communication interfaces of the two main controllers. Data interaction can be achieved between the two main controllers through the synchronization line. In this way, the two single beds can be synchronously controlled by the remote control, that is, the two single beds can be controlled to perform the same action. However, if you want to achieve separate control of the left bed or the right bed through the remote control, you need to set the left bed or the right bed for each single bed in the combined double bed. This is because the controller itself cannot directly determine whether the local bed is the left bed or the right bed; the traditional way is to set it by connecting the remote control or other intelligent terminal of the bed control system, which increases the difficulty of operation for users.
[0003] In addition, the smart electric bed is also equipped with a sleep monitoring system, which is what we call the anti-snoring function. It can lift the bed board to a certain angle, allowing people to breathe more smoothly and achieve the anti-snoring effect. Since the existing electric beds all use ripple detection to calculate the stroke of the DC brushed motor, when the controller uses PWM to realize the slow operation of the motor, the PWM signal overwhelms the ripple signal, and the correct ripple count cannot be obtained to achieve position control. In this case, the traditional way is that the controller drives the motor to run for a fixed time by fixing the PWM to achieve a certain angle of the head position. The problem caused by this is that due to different body weights, the motor load is different, and the PWM drive is fixed; especially when the motor load is large, that is, when the user's weight is too large, the angle of the head lift is very small, and sometimes it is not even lifted. Increasing the PWM will cause the head position of the anti-snoring intervention to lift too fast, waking up the sleeping person. Summary of the invention
[0004] The present invention provides a method for pairing and controlling an electric bed based on a Bluetooth communication protocol, which can automatically identify the left and right beds of a connected double bed and automatically adjust the operating speed of a driving motor according to the weight change of the user, thereby achieving a better anti-snoring function.
[0005] To this end, a method for pairing and controlling an electric bed based on a Bluetooth communication protocol is provided, wherein a first electric bed and a second electric bed arranged side by side are characterized in that the steps include:
[0006] S1: a first control assembly for controlling a first electric bed and a second control assembly for controlling a second electric bed are connected via Bluetooth communication;
[0007] S2: The first control assembly and the second control assembly start a synchronization mode;
[0008] S3: The first control assembly and the second control assembly start a combination mode;
[0009] S4: Determine the relative positions of the first electric bed and the second electric bed according to the transmission angle of the Bluetooth signal.
[0010] Furthermore, the synchronization mode includes the first control assembly and the second control assembly being synchronized via a communication line and performing half-duplex communication according to a communication protocol.
[0011] Furthermore, the combination mode includes a double bed mode in which only another bed can be determined to be connected, and one bed is agreed to be a signal transmitting source and the other bed is a signal receiving source through a protocol.
[0012] Furthermore, the first control assembly and the second control assembly operate the anti-snoring intervention function through PWM speed regulation and slow speed control of the motor.
[0013] Furthermore, the anti-snoring intervention function includes the following steps:
[0014] SS1: The control assembly receives external control instructions in real time. When receiving the instruction of the intelligent system to intervene in snoring, the snoring intervention function starts to run;
[0015] SS2: The control assembly detects whether the angle adjustment needs to be performed; if the angle adjustment is required, enter SS3; otherwise enter SS7;
[0016] SS3: AOA direction finding calculates the relative angle of the two control assemblies;
[0017] SS4: Calculate the running angle difference θ-θ0; where θ0 is the initial state angle, and θ is the angle after lifting; when the running angle difference is greater than the threshold angle, jump to SS7; otherwise, enter SS5;
[0018] SS5: Run for 5 seconds according to the set PWM gear value, slowly lift the head board, and enter SS6;
[0019] SS6: Calculate the current bed board running angle as θ, calculate the average angular velocity w = θ × π / 180 / 5, when w is less than the threshold w0, it is considered that the bed board running angular velocity is too small due to the heavy body weight and heavy motor load, then increase the PWM gear value and enter SS4, otherwise directly enter SS7;
[0020] SS7: Stop the motor and the anti-snoring intervention function is completed.
[0021] Furthermore, the algorithm for the initial state angle includes: when the controller obtains through the travel switch of the driver that the left and right beds are both in a flat state, running the initial angle calibration algorithm; using 100 angle sampling values as the calculation time window of the signal algorithm input, and using the median filtering algorithm to increase the initial state angle error to about 1°; when the first electric bed and the second electric bed are both in a flat state, the measured angle is the initial state angle.
[0022] Furthermore, the calculation method of the angle after lifting includes: when the motor speed regulation function is running, the Bluetooth angle test measures 10 angle sampling values, and uses the filtering algorithm to calculate the real-time angle θ of the sampling values; the threshold angular velocity is (θ-θ0) / t, t is the motor running time.
[0023] A device for pairing and controlling an electric bed based on a Bluetooth communication protocol, comprising:
[0024] Control assembly, the control assembly comprising a Bluetooth communication module, a synchronization module, and a combination module;
[0025] Bluetooth communication module: establishes Bluetooth communication based on the Bluetooth protocol, and can determine the relative position of the signal through the signal transmission angle;
[0026] Synchronization module: used to synchronize the real-time data between electric beds;
[0027] Combination module: used to determine one electric bed as a signal transmitter and the other electric bed as a signal receiver.
[0028] Furthermore, the control assembly also includes a drive motor control module and a calculation module;
[0029] Drive motor control module: used to control the running time and running speed of the drive motor, so as to achieve the anti-snoring function;
[0030] The calculation module is used to calculate the initial angle and the angle after the head bed board is turned over.
[0031] Furthermore, the step of driving the motor control module to realize the anti-snoring function includes:
[0032] SS2: The control assembly detects whether the angle adjustment needs to be performed; if the angle adjustment is required, enter SS3; otherwise enter SS7;
[0033] SS3: AOA direction finding calculates the relative angle of the two control assemblies;
[0034] SS4: Calculate the running angle difference θ-θ0; where θ0 is the initial state angle, and θ is the angle after lifting; when the running angle difference is greater than the threshold angle, jump to SS7; otherwise, enter SS5;
[0035] SS5: Run for 5 seconds according to the set PWM gear value, slowly lift the head board, and enter SS6;
[0036] SS6: Calculate the current bed board running angle as θ, calculate the average angular velocity w = θ × π / 180 / 5, when w is less than the threshold w0, it is considered that the bed board running angular velocity is too small due to the heavy body weight and heavy motor load, then increase the PWM gear value and enter SS4, otherwise directly enter SS7;
[0037] SS7: Stop the motor and the anti-snoring intervention function is completed.
[0038] The beneficial effects of this program are:
[0039] 1) The introduction of automatic left and right bed settings based on Bluetooth direction finding positioning in the controller can provide a more convenient, intelligent and automated bed control solution, reduce the user's operating burden, and provide more accurate and reliable bed control capabilities.
[0040] 2) The rate at which the electric bed board is lifted is compared with the threshold rate, and the rate is automatically controlled according to the weight of the user to achieve the threshold rate required for the anti-snoring function. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0042] Figure 1 A schematic diagram of a pairing process based on the Bluetooth communication protocol according to an embodiment of the present invention;
[0043] Figure 2 It is a structural schematic diagram of an electric bed device according to an embodiment of the present invention;
[0044] Figure 3 A schematic diagram of signal transmission and reception in a combined mode according to an embodiment of the present invention;
[0045] Figure 4 A schematic diagram of a Bluetooth signal transmission angle according to an embodiment of the present invention;
[0046] Figure 5 A schematic diagram of a flow chart of left and right bed identification according to an embodiment of the present invention;
[0047] Figure 6 The relative positions of the bed board and the control assembly when the anti-snoring intervention function is running in the embodiment of the present invention;
[0048] Figure 7 A schematic diagram of the process of the anti-snoring function intervention according to an embodiment of the present invention;
[0049] Explanation of the accompanying drawings: 1. First electric bed; 2. Second electric bed; 3. First control assembly; 4. Second control assembly. DETAILED DESCRIPTION
[0050] The present invention is further described in detail below in conjunction with the accompanying drawings.
[0051] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present invention are indicated by the claims.
[0052] It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations as sequential processes, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0053] The "server" referred to in this context refers to an intelligent electronic device that can perform predetermined processing processes such as numerical calculations and / or logical calculations by running predetermined programs or instructions. It may include a processor and a memory, and the processor executes program instructions pre-stored in the memory to perform the predetermined processing process, or the predetermined processing process is performed by hardware such as ASIC, FPGA, DSP, or a combination of the above two.
[0054] It should be noted that the user equipment, network equipment and network are only examples. Other existing or future computer equipment or networks that are applicable to the present application should also be included in the scope of protection of the present application and included here by reference.
[0055] The methods discussed later in this document (some of which are illustrated by flow charts) may be implemented by hardware, software, firmware, middleware, microcode, hardware description languages, or any combination thereof. When implemented by software, firmware, middleware, or microcode, program code or code segments to perform the necessary tasks may be stored in a machine or computer readable medium (such as a storage medium). (One or more) processors may perform the necessary tasks.
[0056] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.
[0057] The terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments. Unless the context clearly indicates otherwise, the singular forms "one", "one" and "one" used herein are also intended to include plural numbers. It should also be understood that the terms "include" and / or "comprise" used herein specify the existence of stated features, integers, steps, operations, units and / or components, without excluding the existence or addition of one or more other features, integers, steps, operations, units, components and / or combinations thereof.
[0058] The electric bed in the present invention comprises at least a driving motor and a bed board which can be lifted or flipped by the driving motor; the bed board comprises at least a hinged head board and a back board, and the electric bed also comprises a controller which can realize the pairing function and the anti-snoring function of the electric bed; the anti-snoring function is that when the snoring of a human body is detected, the anti-snoring function will be operated, that is, the controller will slowly lift the head position by 7° to 15°, which will not wake up the sleeping person on the one hand, and on the other hand, due to the lifting angle, it will make people breathe more smoothly, thus achieving the anti-snoring effect.
[0059] The control assembly can be installed in the control box and installed on the back of the headboard of the electric bed board through a fixture or other fixing device. The back position and angle of each smart electric bed are also fixed. For the convenience of explanation, the embodiment of the present invention adopts a double bed, that is, two electric beds spliced together. The same technical principle can also be applied to the splicing of multiple electric beds.
[0060] The electric bed of the present invention may also include an expansion unit, which may include a Bluetooth communication / control unit corresponding to the massage module, aromatherapy module, physiological monitoring module, environmental monitoring module, lighting equipment and other functional modules. Each functional module is provided with an access unit.
[0061] like Figure 1 As shown, a method for pairing and controlling an electric bed based on a Bluetooth communication protocol, wherein a first electric bed 1 and a second electric bed 22 arranged side by side are characterized in that the steps include:
[0062] S1: The first control assembly 3 for controlling the first electric bed 1 and the second control assembly 4 for controlling the second electric bed 22 are connected via Bluetooth communication;
[0063] S2: The first control assembly 3 and the second control assembly 4 start the synchronization mode;
[0064] S3: The first control assembly 3 and the second control assembly 4 start the combination mode; in this embodiment, the first electric bed 1 is set as a signal sending source, and the second electric bed 22 is set as a signal receiving source.
[0065] S4: Determine the relative position of the first electric bed 1 and the second electric bed 22 according to the transmission angle of the Bluetooth signal. In this embodiment, in order to better realize the recognition of the Bluetooth communication angle, the first electric bed 1 and the second electric bed 22 are placed horizontally, and the position of the BLE array antenna in the controller relative to the PCBA, the position of the controller, and the position and angle of the bed are also fixed.
[0066] Step S4 may be implemented by utilizing the angular phase shift that occurs between antennas when receiving (AoA) or transmitting (AoD) a radio frequency signal. By using antenna arrays at both ends of the communication link, phase shift data may be determined and the position calculated therefrom. Figure 2 As shown, in this system, the relative positions of the bed board, controller and BLE array antenna are almost in the same plane.
[0067] In this embodiment, the Bluetooth AOA direction finding positioning technology is used. The specific method is as follows: after the data of the first control assembly 3 and the second control assembly 4 are synchronized, the first control assembly 3 or the second control assembly 4 can only determine that another bed is connected and becomes one side of the combined double bed, but cannot determine whether the local bed is the left or right bed. However, through the agreement, one party is set as the signal transmitting source and the other party is set as the signal receiving source, such as Figure 3As shown, in the AoA system, the signal receiving side is equipped with an antenna array. By measuring the phase shift of the incident signal, the receiver can determine the direction of the incident signal. The frequency of the signal transmitted by the BLE device is approximately 2440MHz, depending on the channel in a given transmission, and the wavelength of the signal in a vacuum is approximately 12 cm. Typically, the distance between BLE devices is farther than this wavelength, which means that the signal undergoes multiple wave cycles during the propagation from the transmitter to the receiver. By measuring the phase difference of the signals received by different antennas, the angle of arrival (AoA) receiver can determine the direction in which the signal is received. This is achieved through simple triangulation, where the phase difference results in a difference in the propagation time of the signal, thereby calculating the propagation distance of the signal.
[0068] like Figure 3 As shown, the angle of arrival (AoA) can be calculated according to the following formula
[0069]
[0070] Among them, λ is the wavelength of the BLE signal frequency, ψ is the phase difference between the BLE signal reaching different antennas, and d is the distance between different antennas.
[0071] Bluetooth direction measurement uses IQ sampling, a phase and quadrature sampling technique, to measure the phase of the incident signal.
[0072] In IQ sampling, the receiver mixes the incident signal with the local oscillator (LO) at offsets of 0 and 90 degrees. This produces two orthogonal functions, called quadrature components, recorded as the real part (I) and the imaginary part (Q).
[0073] The amplitude and phase of the incident signal can be calculated using the following formulas:
[0074] Amplitude:
[0075] Phase: ψ=atan2(Q,I)
[0076] like Figure 4 As shown, when the control assembly of the second electric bed 22 calculates that the signal is from the first electric bed 1, it will calculate that when the angle θ is approximately 180±20°, the local bed is set to the right side. At the same time, since the controller is synchronized through the synchronization line data, the controller A correspondingly sets the local bed to the left side; and vice versa.
[0077] Furthermore, the synchronization mode includes the first control assembly 3 and the second control assembly 4 being synchronized via a communication line and performing half-duplex communication according to a communication protocol.
[0078] like Figure 5As shown, further, the combination mode includes a double bed mode that can only determine that another bed is connected, and a bed is agreed to be a signal transmitting source and the other bed is a signal receiving source through a protocol. In this embodiment, the control assembly of the first electric bed 1 and the second electric bed 22 always communicates according to the rules of the synchronous communication. When the control assembly of one of the electric beds, such as the control assembly of the first electric bed 1, finds that the left and right beds are not set, an AOA request will be initiated. After the second electric bed 22 receives the AOA request, it sets the local as the AOA positioning receiver and sends an AOA confirmation at the same time. After the first electric bed 1 receives the AOA confirmation, it sets the local as the AOA sender. When the control assembly of the second electric bed 22 does not calculate the arrival angle, the data frame AOA exchanged between the control assemblies of the first electric bed 1 and the second electric bed 22 is always in the running state. When the control assembly of the second electric bed 22 calculates the angle α, the left and right beds are immediately set, for example, the local is set to the right bed, and the left bed setting instruction is issued during the period of synchronous transmission. After the first electric bed 1 receives the left bed setting instruction, it sets the local to the left bed. At this time, the automatic left and right bed setting is completed.
[0079] like Figure 6 As shown, further, the first control assembly 3 and the second control assembly 4 control the motor to operate the anti-snoring intervention function through PWM speed regulation and slow speed control. In this embodiment, PWM waveform is used for speed regulation. The PWM control technology is to control the on and off of the switch device of the driving motor so that the output end obtains a series of pulses with equal amplitudes but unequal widths, and these pulses are used to replace sine waves or other required waveforms. By modulating the width of each pulse according to certain rules, the output voltage of the inverter circuit can be changed, and the output frequency can also be changed. Its control is simple, flexible and has good dynamic response, and it can have a better control effect on the motor movement in the anti-snoring function.
[0080] like Figure 7 As shown, further, the anti-snoring intervention function includes the following steps:
[0081] In this embodiment, the controller uses PWM speed regulation to control the motor to slowly lift the head position to implement the anti-snoring intervention function, and the head lifting angle of the anti-snoring function can be 7°~15°, so that the relative change angle of the spatial position between the main controllers of the two beds can be converted to 4°~9°.
[0082] The closed-loop control principle of adjusting the angle of anti-snoring intervention through AOA direction finding positioning technology is a position closed-loop control and speed closed-loop control based on the angular velocity feedback of the head bed board. Position closed-loop control is a process of measuring the position information of the motor based on the pulse accumulation of the encoder, comparing it with the target value, obtaining the control deviation, and then controlling the proportion, integration, and differentiation of the deviation to make the deviation tend to zero. After receiving the angle adjustment instruction of the anti-snoring intervention of the intelligent system, the control assembly begins to adjust the head position angle. In the process of slowly lifting the head bed board, the control assembly calculates the relative angular velocity of the main controller in real time through the AOA direction finding function, thereby controlling the angle and time of lifting the bed board, thereby achieving the predetermined anti-snoring function.
[0083] This needs to be achieved through the following algorithm steps.
[0084] SS1: The control assembly receives external control instructions in real time. When receiving the anti-snoring intervention instruction from the intelligent system, it starts to operate the anti-snoring intervention function; that is, slowly raise the head board by 7° to 15°.
[0085] SS2: The control assembly detects whether the angle adjustment needs to be performed; this includes whether the anti-snoring intervention function is set to be effective, whether the head bed board position based on closed-loop control has been moved to the specified angle of 7° to 15°, etc. If the body weight is too heavy, the head bed board lifting angle does not reach 7°, or the current bed board is already at a larger lifting angle (more than 15°), then when the angle adjustment is required, enter SS3; otherwise enter SS7.
[0086] SS3: AOA direction finding calculates the relative angle of the two control assemblies; that is, the local side is set as the signal receiver through the synchronous line communication protocol agreement, and the other side is the signal transmitter; at this time, the receiver can receive the CTE extension packet in real time for angle calculation. The CTE extension packet is a string of data, which has the function of fixed constant frequency after being encoded by the RF signal. The AoA (Angle of Arrival) method uses a transmitter and a receiver, where the receiver determines the direction to the transmitter by antenna switching. This is achieved by the transmitter adding a CTE (Constant Tone Extension) to the data packet, so that the specified part of the data packet has a fixed and constant frequency. Knowing this, the receiver can sample the IQ component of the waveform and determine the phase of the waveform. By doing this for multiple antennas, the receiver can calculate which angle the transmitter signal comes from. According to the Bluetooth core specification, the CTE part of the data packet includes a 4 microsecond guard period, an 8 microsecond reference period, and a certain number of antenna samples. When receiving a data packet containing an AoA CTE, the receiver should perform antenna switching at the rate and switching mode configured by the host. In both cases, the receiver should take an IQ sample every microsecond during the reference period and an IQ sample in every sample slot (so there will be 9 to 82 samples in total in the 8 microsecond reference IQ sample, 1 to 37 IQ samples in the 2 microsecond slot, and 2 to 74 IQ samples in the 1 microsecond slot).
[0087] SS4: Calculate the running angle difference θ-θ0, where θ0 is the initial state angle and θ is the angle after lifting; when the running angle difference is greater than the threshold angle, jump to SS7; otherwise, enter SS5; in this embodiment, the threshold angle is 6°.
[0088] SS5: Run for 5 seconds according to the set PWM gear value, and slowly lift the head bed board. Enter SS6. The PWM gear is set to 6 gears from low to high; the initial setting value P0 is when the bed board is unloaded, and the control assembly slowly lifts the bed board for 15 seconds to reach the PWM value of 7°. The P0 gear corresponds to the bed board angular velocity w0=7×π / 180 / 15, (unit rad / s); the maximum gear P5 is when the bed board is unloaded, and the control assembly slowly lifts the bed board for 15 seconds to reach the PWM value of 15°. The P5 gear corresponds to the bed board angular velocity w5=15×π / 180 / 15, (unit rad / s). The middle gear is set according to the average value between the initial gear and the maximum gear.
[0089] SS6: Calculate the current bed board running angle as θ, calculate the average angular velocity w = θ × π / 180 / 5, when w is less than the threshold w0, it is considered that the bed board running angular velocity is too small due to the heavy body weight and heavy motor load, then increase the PWM gear value and enter SS4, otherwise directly enter SS7;
[0090] SS7: Stop the motor and the anti-snoring intervention function is completed.
[0091] In a modular double bed, the function of automatically identifying and setting the left and right beds is realized by using direction finding positioning. This includes the BLE Bluetooth direction finding positioning method introduced previously, as well as other wireless direction finding positioning technologies such as WIFI, Sub-1GHz, and 5G.
[0092] Furthermore, the algorithm of the initial state angle includes: when the controller obtains that both the left and right beds are in a flat state through the travel switch of the driver, running the initial angle calibration algorithm; using 100 angle sampling values as the calculation time window of the signal algorithm input, using the median filtering algorithm, the initial state angle error is increased to about 1°; when the first electric bed 1 and the second electric bed 22 are both in a flat state, the measured angle is the initial state angle.
[0093] Furthermore, the calculation method of the angle after lifting includes: when the motor speed regulation function is running, the Bluetooth angle test measures 10 angle sampling values, and the sampling values are used to calculate the real-time angle θ using a filtering algorithm; the threshold angular velocity is (θ-θ0) / t, where t is the motor running time. In this embodiment, 10 angle sampling values are used, but the number of tests can be changed according to the actual working environment.
[0094] A device for pairing and controlling an electric bed based on a Bluetooth communication protocol, comprising:
[0095] Control assembly, the control assembly comprising a Bluetooth communication module, a synchronization module, and a combination module;
[0096] Bluetooth communication module: establishes Bluetooth communication based on the Bluetooth protocol, and can determine the relative position of the signal through the signal transmission angle;
[0097] Synchronization module: used to synchronize the real-time data between electric beds;
[0098] Combination module: used to determine one electric bed as a signal transmitter and the other electric bed as a signal receiver.
[0099] Furthermore, the control assembly also includes a drive motor control module and a calculation module;
[0100] Drive motor control module: used to control the running time and running speed of the drive motor, so as to achieve the anti-snoring function;
[0101] The calculation module is used to calculate the initial angle and the angle after the head bed board is turned over.
[0102] Furthermore, the step of driving the motor control module to realize the anti-snoring function includes:
[0103] SS2: The control assembly detects whether the angle adjustment needs to be performed; this includes whether the anti-snoring intervention function is set to be effective, whether the head bed board position based on closed-loop control has been moved to the specified angle of 7° to 15°, etc. If the body weight is too heavy, the head bed board lifting angle does not reach 7°, or the current bed board is already at a larger lifting angle (more than 15°), then when the angle adjustment is required, enter SS3; otherwise enter SS7.
[0104] SS3: AOA direction finding calculates the relative angle of the two control assemblies; that is, the local side is set as the signal receiver through the synchronization line communication protocol, and the other side is the signal transmitter; at this time, the receiver can receive the CTE extension package in real time for angle calculation.
[0105] SS4: Calculate the running angle difference θ-θ0, where θ0 is the initial state angle and θ is the angle after lifting; when the running angle difference is greater than the threshold angle, jump to SS7; otherwise, enter SS5; in this embodiment, the threshold angle is 6°.
[0106] SS5: Run for 5 seconds according to the set PWM gear value, and slowly lift the head bed board. Enter SS6. The 5 seconds here is the motor running time suitable for the snoring function of this application. The time can also be adjusted accordingly according to the power of the motor and the specific structure of the bed. The PWM gear is set to 6 gears from low to high; the initial setting value P0 is when the bed board is unloaded, and the control assembly slowly lifts the bed board for 15 seconds to reach the PWM value of 7°. The P0 gear corresponds to the bed board angular velocity w0=7×π / 180 / 15 (unit rad / s); the maximum gear P5 is when the bed board is unloaded, and the control assembly slowly lifts the bed board for 15 seconds to reach the PWM value of 15°. The P5 gear corresponds to the bed board angular velocity w5=15×π / 180 / 15 (unit rad / s). The middle gear is set according to the average value between the initial gear and the maximum gear. The PWM gear in this embodiment is positioned at 6 gears. Those skilled in the art can also set different gear numbers and gear intervals according to the actual power of the motor and the on-site configuration.
[0107] SS6: Calculate the current bed board running angle as θ, calculate the average angular velocity w = θ × π / 180 / 5, when w is less than the threshold w0, it is considered that the bed board running angular velocity is too small due to the heavy body weight and heavy motor load, then increase the PWM gear value and enter SS4, otherwise directly enter SS7;
[0108] SS7: Stop the motor and the anti-snoring intervention function is completed.
[0109] It will be appreciated that the present invention is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.
Claims
1. A method for pairing and controlling an electric bed based on a Bluetooth communication protocol, comprising: The first electric bed and the second electric bed are arranged side by side, characterized in that: S1: a first control assembly for controlling a first electric bed and a second control assembly for controlling a second electric bed are connected via Bluetooth communication; S2: The first control assembly and the second control assembly start a synchronization mode; S3: The first control assembly and the second control assembly start a combination mode; S4: Determine the relative positions of the first electric bed and the second electric bed according to the transmission angle of the Bluetooth signal.
2. The method for pairing and controlling an electric bed based on the Bluetooth communication protocol according to claim 1, characterized in that: The synchronization mode includes the first control assembly and the second control assembly being synchronized via a communication line and performing half-duplex communication according to a communication protocol.
3. The method for pairing and controlling an electric bed based on the Bluetooth communication protocol according to claim 1, characterized in that: The combination mode includes a double bed mode in which only another bed can be determined to be connected, and one bed is agreed to be a signal transmitting source and the other bed is a signal receiving source through a protocol.
4. The method for pairing and controlling an electric bed based on the Bluetooth communication protocol according to claim 1, characterized in that: The first control assembly and the second control assembly operate the anti-snoring intervention function by controlling the motor to run via PWM speed regulation and slow speed.
5. The method for pairing and controlling an electric bed based on the Bluetooth communication protocol according to claim 4, characterized in that: The anti-snoring intervention function includes the following steps: SS1: The control assembly receives external control instructions in real time. When receiving the instruction of the intelligent system to intervene in snoring, the snoring intervention function starts to run; SS2: The control assembly detects whether the angle adjustment needs to be performed; if the angle adjustment is required, enter SS3; otherwise enter SS7; SS3: AOA direction finding calculates the relative angle of the two control assemblies; SS4: Calculate the running angle difference θ-θ0; where θ0 is the initial state angle, and θ is the angle after lifting; when the running angle difference is greater than the threshold angle, jump to SS7; otherwise, enter SS5; SS5: Run for 5 seconds according to the set PWM gear value, slowly lift the head board, and enter SS6; SS6: Calculate the current bed board running angle as θ, calculate the average angular velocity w = θ × π / 180 / 5, when w is less than the threshold w0, it is considered that the bed board running angular velocity is too small due to the heavy body weight and heavy motor load, then increase the PWM gear value and enter SS4, otherwise directly enter SS7; SS7: Stop the motor and the anti-snoring intervention function is completed.
6. The method for pairing and controlling an electric bed based on the Bluetooth communication protocol according to claim 1, characterized in that: The algorithm for the initial state angle includes: when the controller obtains through the travel switch of the driver that the left and right beds are both in a flat state, running the initial angle calibration algorithm; using 100 angle sampling values as the calculation time window of the signal algorithm input, using the median filtering algorithm to increase the initial state angle error to about 1°; when the first electric bed and the second electric bed are both in a flat state, the measured angle is the initial state angle.
7. The method for pairing and controlling an electric bed based on the Bluetooth communication protocol according to claim 1, characterized in that: The calculation method of the angle after lifting includes: when the motor speed regulation function is running, the Bluetooth angle test measures 10 angle sampling values, and uses the sampling value to calculate the real-time angle θ using a filtering algorithm; the threshold angular velocity is (θ-θ0) / t, where t is the motor running time.
8. A device for pairing and controlling an electric bed based on Bluetooth communication protocol, characterized in that: include: A control assembly, the control assembly comprising a Bluetooth communication module, a synchronization module, and a combination module; Bluetooth communication module: establishes Bluetooth communication based on the Bluetooth protocol, and can determine the relative position of the signal through the signal transmission angle; Synchronization module: used to synchronize the real-time data between electric beds; Combination module: used to determine one electric bed as a signal transmitter and the other electric bed as a signal receiver.
9. The device for pairing and controlling an electric bed based on the Bluetooth communication protocol according to claim 8, characterized in that: The control assembly also includes a drive motor control module and a calculation module; Drive motor control module: used to control the running time and running speed of the drive motor, so as to achieve the anti-snoring function; The calculation module is used to calculate the initial angle and the angle after the head bed board is turned over.
10. The device for pairing and controlling an electric bed based on the Bluetooth communication protocol according to claim 9, characterized in that: The steps of driving the motor control module to realize the anti-snoring function include: SS2: The control assembly detects whether the angle adjustment needs to be performed; if the angle adjustment is required, enter SS3; otherwise enter SS7; SS3: AOA direction finding calculates the relative angle of the two control assemblies; SS4: Calculate the running angle difference θ-θ0; where θ0 is the initial state angle, and θ is the angle after lifting; when the running angle difference is greater than the threshold angle, jump to SS7; otherwise, enter SS5; SS5: Run for 5 seconds according to the set PWM gear value, slowly lift the head board, and enter SS6; SS6: Calculate the current bed board running angle as θ, calculate the average angular velocity w = θ × π / 180 / 5, when w is less than the threshold w0, it is considered that the bed board running angular velocity is too small due to the heavy body weight and heavy motor load, then increase the PWM gear value and enter SS4, otherwise directly enter SS7; SS7: Stop the motor and the anti-snoring intervention function is completed.