A single-line multi-device priority communication method and system
By using a stepped-level data transmission method, the charging and communication compatibility issues of TWS Bluetooth earphone charging cases with two pins were resolved, achieving a simple structure, low cost, multi-device communication, and power-saving function.
Patent Information
- Application Number
- CN201911036872.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-29
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2039-10-29
AI Technical Summary
Existing TWS Bluetooth earphone charging cases, which use only two pins, struggle to achieve charging and communication compatibility. Furthermore, existing solutions are costly, structurally complex, or may affect signal quality.
The method of transmitting data using stepped voltage levels switches between charging voltage and communication voltage between the master power supply equipment and the slave equipment. It achieves compatibility between charging and communication by using level detection and control, and uses a single line for priority communication between multiple devices.
It achieves compatibility between charging and communication without increasing cost or space occupation, can communicate with multiple slave devices at the same time or specified, and indicates status in a level manner to achieve standby power saving, and is suitable for short-distance contact multi-unit devices.
Smart Images

Figure CN110636404B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent wireless devices, and in particular to a single-line multi-device priority communication method and system. Background Art
[0002] With the rapid development of 3G, 4G, and 5G mobile communication devices, the corresponding smart wireless wearable devices are also increasingly favored by the market, such as: Bluetooth headsets, TWS headsets, smart bracelets, smart remote controls, smart handles, dynamic game controllers, etc.
[0003] Take Bluetooth headsets as an example, especially TWS (true wireless stereo) Bluetooth headsets, because they are small enough to be worn directly in the ear, their batteries can only be extremely small, resulting in limited capacity, and can only be used for 3-4 hours, which means they need to be charged at any time. Therefore, a portable charging box will be configured.
[0004] There are some charging boxes on the market today, which have two pins (5V line, reference ground line). When the earphones are charged in the box, the pins touch the two contacts of the earphones, supplying 5V to the earphones for charging.
[0005] Because the charging box itself is also a battery, it may not be able to charge the earphones after it is completely discharged, so when the charging box is low on power, it is necessary to remind the user to charge as soon as possible. However, the user will only pay attention to the power of the charging box when using the earphones, so the earphones need to communicate with the charging box when in use, so as to know the power of the charging box and then inform the mobile phone through voice or Bluetooth communication.
[0006] Another situation is that when using TWS earphones, you first need to pair the left earphone with the right earphone, and then pair and connect them with the mobile phone. At a time, only one earphone can be connected to the mobile phone. For some reasons, such as the user only wants to use one earphone and the other one happens not to be connected to the mobile phone, then you need to switch the earphone in use to the main communication earphone (master-slave switching function). At this time, it is also necessary to sense the status (inside the box) through the charging box. After the master-slave switching is realized, the charging box can charge the earphone, and the charging box and earphone need to communicate.
[0007] The charging box communicates with the headset. Currently, there are several methods for charging boxes on the market:
[0008] In addition to the two lead pins of the charging cable and the reference ground, another pin is added to connect the charging box and the earphones to achieve communication (BOSS earphones, etc.). This gold-plated pin will significantly increase the cost due to the process and materials, and requires space to place. The earphones themselves are in a very small space, and adding a pin will also affect the aesthetics of the ID, as well as occupying the radio frequency space and affecting the quality of the received signal.
[0009] Another approach is to use low-power Bluetooth chips and protocols to communicate with the charging box via wireless air communication, but the cost will be higher and the RF quality also needs to be considered.
[0010] Another method is to communicate through pulse slotting on the 5V charging line. It directly consumes 5V power, and the speed is affected by the 5V power filter capacitor. The high and low levels cannot react quickly, and only a few very limited command functions can be realized. At the same time, the TWS earphones are a pair of left and right earphones. When they are charged in the box, it is impossible to distinguish which one is communicating with the charging box. If the HALL device is used for identification to distinguish whether it is in the box, its high cost and special location placement are not conducive to the structural layout.
[0011] Alternatively, an extreme implementation method is to add a logic chip to each of the left and right earphones and the charging box to modulate and demodulate the communication signal. The circuit is complex, the cost is high, and the space occupied is not conducive to the layout of the earphone structure.
[0012] The market is in urgent need of a method or system to solve the problem of achieving charging and communication compatibility using only two pins; at the same time, the structure is simple and the space occupied is small. Summary of the invention
[0013] In view of the above problems, the present invention aims to provide a single-line multi-device priority communication method and system which adopts ladder level data transmission and has a simple structure.
[0014] To achieve the technical purpose, the present invention provides a single-line multi-device priority communication method, including a master-end power supply device, the master-end power supply device can be electrically connected to one or more slave-end devices, the master-end power supply device can switch between a charging voltage V1 and a communication voltage V2, and the master-end power supply device can detect the level V a , the specific communication control method is as follows:
[0015] The first step is to divide the stage level and divide a voltage level into N step levels V x , each step level corresponds to a slave device or a state of a slave device;
[0016] The second step is power supply. When the slave device is connected, the master power supply device switches to V1 to reset the slave device.
[0017] The third step is communication control. When V a Equal to a certain step level V x When the master power supply device switches to the communication voltage V2, the master power supply device sends the master power information and communication instructions to the slave device; the master power supply device then switches back to the charging voltage V1 and continues to detect the level of the slave device. a Equal to the next step level Vx When V a Reach full power voltage V max ;
[0018] Step 4: Check again. The master power supply device continues to detect the level of the slave device. If there is V' x Still lower than V max , if there is another slave device, repeat steps 2 and 3.
[0019] As a preferred embodiment, in the second and third steps: when the master power supply device detects that the level of the slave device reaches the fully charged voltage V max When the master power supply device drops from V1 to the communication voltage V2, the master power supply device communicates the shutdown command to the slave device to let the slave enter the energy-saving shutdown mode. At this time, the master power supply device detects that the level of the slave device is the voltage V0 of the energy-saving shutdown state;
[0020] When the master power supply device confirms that the last communication command has been issued and the detected levels are all lower than V0, the master power supply device enters the sleep state or shutdown state;
[0021] When the cover is opened or a button action triggers the master-side power supply device to start up, the master-side power supply device switches to V1 to reset the slave-side device to start up.
[0022] An application of a single-line multi-device priority communication method, the specific control is as follows:
[0023] When the USB port is plugged into an AC charger and connected to a USB 5V power source, the charging circuit composed of the charging management chip charges the battery in the main power supply device;
[0024] When one or more slave devices are placed in the master power supply device and the cover is closed, the master power supply device sends a communication pulse to the slave device to enable it to perform the master-slave switching function. After receiving the response from the slave device, the MCU of the master power supply device turns on the charging chip and boosts the voltage to 5V to reset and charge the slave device.
[0025] When the master power supply device detects that the slave device is fully charged, the master power supply device switches from 5V to 3V for communication and transmits the power of the master power supply device to the slave device. The master power supply device then notifies the slave device to enter the energy-saving shutdown mode. Upon receiving the response, the slave device shuts down to save power. At this time, the slave device shuts down and the master power supply device also shuts down. If the cover opening action is detected by the sensor, the master power supply device re-boosts 5V to reset the slave device and start it up.
[0026] Preferably, the sensor is one or more of a Hall sensor, a distance sensor, or a pressure sensor.
[0027] A single-line multi-device priority communication system includes an MCU chip, a logic high level selection circuit, a logic low level selection circuit, and a slave device adapter circuit. The MCU chip pins pin6-pin14 are connected to the logic high level selection circuit, and the MCU chip pins pin25-pin31 are connected to the logic low level selection circuit. The logic high level selection circuit and the logic low level selection circuit realize each step level bias through resistor voltage division, and the slave device adapter circuit can directly detect output data using its GPIO port voltage division detection.
[0028] Preferably, the slave device adaptation circuit includes a slave main chip CTR_IN, which uses its own IO characteristics, i.e., logic below 0.8V is low and above 1V is high, to detect the CTR_IN waveform, and can pick up the data sent by the other end, realizing 1V step high and low logic digital reception, and by controlling the CTR_OUT level, can output the desired data to realize transmission and reception.
[0029] Preferably, the slave device adaptation circuit also includes resistors R23 and R25, which come from the COMM_LINE waveform level. After voltage division by R23, 1.5V step-by-step high and low logic digital reception is realized; by controlling the CTR_OUT level and the intervention of the R25 lower bias resistor, the expected data below 1.3V, i.e. low, can be output to realize transmission and reception.
[0030] Preferably, the slave device adaptation circuit also includes a transistor Q4, a resistor R31 and a resistor R30. The COMM_LINE waveform level flows into Q4 through R29. After Q4 is divided by R31 and R30, a base bias is formed to set the conduction threshold to achieve 4.5V step-by-step high and low logic digital reception. By controlling the CTR_OUT level and the intervention of the R28 bias resistor, the expected data below 4.3V, that is, low, can be output to achieve transmission and reception.
[0031] Preferably, the slave device utilizes the level ladder set by the master power supply device to identify the interruption, and utilizes the ladder level slot to achieve communication.
[0032] The beneficial effect of the present invention is that it adopts the principle of single-line multiplexing, and uses a certain level of the ladder as a device selection mark, and uses a very simple resistor voltage division method, or a comparator formed by triode bias, to send (the sending end) and detect (the receiving end) the logical high and low states of each ladder, and uses the level ladder as a state detection to achieve reset, charging or as a certain state mark, and to achieve communication according to the level change timing (logic). The patent of this invention solves the problem of charging and communication compatibility. The master end can specify a slave end to communicate, or communicate with multiple adjacent slave ends at the same time; it can also mark various states in a level manner to enable the slave end device to perform reset, standby and other actions. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Attached Figure 1 It is the principle diagram of the communication method of the present invention;
[0034] Attached Figure 2 It is a schematic diagram of a 9-step level circuit;
[0035] Attached Figure 3 This is a schematic diagram of the IO port distribution of the MCU chip;
[0036] Attached Figure 4 It is a circuit diagram of a low-end adapter circuit of a slave device;
[0037] Attached Figure 5 A schematic diagram of a mid-range adapter circuit for a slave device;
[0038] Attached Figure 6 It is a circuit diagram of a high-end adapter circuit of a slave device;
[0039] Attached Figure 7 This is a schematic diagram of the ladder logic level waveform on the communication line;
[0040] Attached Figure 8 This is the schematic diagram of the charging box;
[0041] Attached Fig. 9 This is the schematic diagram of the headphone end. DETAILED DESCRIPTION
[0042] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0043] like Figure 1-9 As shown, the specific embodiment of the present invention is a single-line multi-device priority communication method, including a master-end power supply device, the master-end power supply device can be electrically connected to one or more slave-end devices, the master-end power supply device can switch between a charging voltage V1 and a communication voltage V2, and the master-end power supply device can detect the level V a , the specific communication control method is as follows:
[0044] The first step is to divide the stage level and divide a voltage level into N step levels V x , each step level corresponds to a slave device or a state of a slave device;
[0045] The second step is power supply. When the slave device is connected, the master power supply device switches to V1 to reset the slave device.
[0046] The third step is communication control. When V a Equal to a certain step level V xWhen the master power supply device switches to the communication voltage V2, the master power supply device sends the master power information and communication instructions to the slave device; the master power supply device then switches back to the charging voltage V1 and continues to detect the level of the slave device. a Equal to the next step level V x When V a Reach full charge voltage V max ;
[0047] Step 4: Check again. The master power supply device continues to detect the level of the slave device. If there is V' x Still lower than V max , if there is another slave device, repeat steps 2 and 3.
[0048] In the second and third steps: When the master power supply device detects that the slave device level has reached the fully charged voltage V max When the master power supply device drops from V1 to the communication voltage V2, the master power supply device communicates the shutdown command to the slave device to let the slave enter the energy-saving shutdown mode. At this time, the master power supply device detects that the level of the slave device is the voltage V0 of the energy-saving shutdown state;
[0049] When the master power supply device confirms that the last communication command has been issued and the detected levels are all lower than V0, the master power supply device enters the sleep state or shutdown state;
[0050] When the cover is opened or a button action triggers the master-side power supply device to start up, the master-side power supply device switches to V1 to reset the slave-side device to start up.
[0051] This method can effectively solve the problem of using only 2 pins to achieve charging and communication compatibility; it can also specify one of the slave devices to communicate, or multiple slave devices to receive instructions from the master power supply device at the same time; it can also mark various states in a level manner, so that the slave device and the master power supply device can standby in time to save power. This method realizes similar complex functions as mentioned above, but the cost is comparable to that of an ordinary charging box; compared with a charging box with communication function, it reduces the cost and device space by multiples. Because of its single-line multi-state and multi-step logic communication method, it is suitable for more short-distance contact multi-connected device applications.
[0052] An application of a single-line multi-device priority communication method, the specific control is as follows:
[0053] When the USB port is plugged into an AC charger and connected to a USB 5V power source, the charging circuit composed of the charging management chip charges the battery in the main power supply device;
[0054] When one or more slave devices are placed in the master power supply device and the cover is closed, the master power supply device sends a communication pulse to the slave device to enable it to perform the master-slave switching function. After receiving the response from the slave device, the MCU of the master power supply device turns on the charging chip and boosts the voltage to 5V to reset and charge the slave device.
[0055] When the master power supply device detects that the slave device is fully charged, the master power supply device switches from 5V to 3V for communication, and transmits the power of the master power supply device to the slave device. Then the master power supply device notifies the slave device to enter the energy-saving shutdown mode, and shuts down to save power after receiving the response. At this time, the slave device is shut down and the master power supply device is also shut down; if the cover opening action is detected by the sensor, the master power supply device will re-boost 5V to reset the slave device to start up. For example: TWS Bluetooth headset, the master power supply device can be a charging box, and the slave devices are two Bluetooth headsets. Using the method of this application, the charging box does not need a Bluetooth communication module, and the power of the charging box and related information can be transmitted to the Bluetooth headset through 2 pins.
[0056] The sensor is one or more of a Hall sensor, a distance sensor, or a pressure sensor.
[0057] A single-line multi-device priority communication system includes an MCU chip, a logic high level selection circuit, a logic low level selection circuit, and a slave device adapter circuit. The MCU chip pins pin6-pin14 are connected to the logic high level selection circuit, and the MCU chip pins pin25-pin31 are connected to the logic low level selection circuit. The logic high level selection circuit and the logic low level selection circuit realize each step level bias through resistor voltage division, and the slave device adapter circuit can directly detect output data using its GPIO port voltage division detection.
[0058] The slave device adaptation circuit includes a slave main chip CTR_IN, which uses its own IO characteristics, that is, logic below 0.8V is low, and above 1V is high. By detecting the waveform of the CTR_IN end, the data sent by the opposite end can be picked up, and the high and low logic digital reception of the 1V ladder segment can be realized. By controlling the CTR_OUT level, the desired data can be output to realize the sending and receiving. The high level (upper) bias of each step is realized by using the resistor voltage division principle. The low level (lower) bias of each step is realized by using the resistor voltage division principle. The cross-step merging and simultaneous communication (accepting instructions) are realized by using the high and low level bias. Using a certain level ladder, the status indications such as charging, resetting, full, and underpowered are realized, that is, communication is realized by using the status. It can realize the information interaction of the left and right earphones, such as the master-slave switching in the box, the group pairing and other functions. It can realize the interaction between the left and right earphones and the charging bin, such as the charging bin reporting the power, notifying the earphones to enter the standby mode and other functions.
[0059] The slave device adaptation circuit also includes resistors R23 and R25, which come from the COMM_LINE waveform level. After voltage division by R23, 1.5V step-by-step high and low logic digital reception is realized; by controlling the CTR_OUT level and the intervention of the R25 lower bias resistor, the expected data below 1.3V, that is, low, can be output to realize transmission and reception.
[0060] The slave device adaptation circuit also includes a transistor Q4, a resistor R31 and a resistor R30. The COMM_LINE waveform level flows into Q4 through R29. After Q4 is divided by R31 and R30, a base bias is formed to set the conduction threshold to achieve 4.5V step-by-step high and low logic digital reception; by controlling the CTR_OUT level and the intervention of the R28 bias resistor, the expected data below 4.3V, that is, low, can be output to achieve transmission and reception.
[0061] As a slave device, it uses the level ladder set by the master power supply device to identify the interruption and use the ladder level slot to achieve communication.
[0062] like Figure 1 , a single-line multi-device priority communication method, divides a fixed voltage level into N step levels through a number of resistors, uses the step levels to identify devices and indicate states, or communicates with the step level priority. For example, a 5V level is divided into 10 stages, each stage corresponds to a device or a state, and by defining each stage of communication (without the need for complex encoding and decoding), communication between 9 devices or the transmission of 9 states can be achieved.
[0063] like Figure 2 Taking 9-step levels as an example, a single-line multi-device priority communication circuit includes an MCU chip, a logic high level selection circuit, a logic low level selection circuit, and a slave device adapter circuit. The MCU chip pins pin6-pin14 are connected to the logic high level selection circuit, and the MCU chip pins pin25-pin31 are connected to the logic low level selection circuit. The logic high level selection circuit and the logic low level selection circuit realize the bias of each step level through resistor voltage division, and the slave device adapter circuit can directly detect the output data by using its GPIO port voltage division detection.
[0064] like Figure 3 The MCU chip is the MCU of HuaDa Semiconductor Company, model HC32F030, which has low power consumption, built-in crystal oscillator circuit, and standard 115200bps serial port, which is convenient for users to debug online.
[0065] like Figure 4, the slave main chip CTR_IN, with its own IO characteristics, that is, the logic below 0.8V is low, and above 1V is high, detects the CTR_IN waveform, can detect the data sent by the other end, and realizes 1V step high and low logic digital reception. By controlling the CTR_OUT level, the desired data can be output to realize transmission and reception.
[0066] like Figure 5 , from the COMM_LINE waveform level, after voltage division by R26 and R23, the slave main chip CTR_IN, with its own IO characteristics, that is, logic below 0.8V is low, and above 1V is high, can detect the data sent by the other end and realize 1.5V step high and low logic digital reception; by controlling the CTR_OUT level and the intervention of the R25 bias resistor, the expected data below 1.3V, that is, low, can be output to realize transmission and reception.
[0067] like Figure 6 , from the COMM_LINE waveform level, flows into Q4 through R29, and after Q4 is divided by R31 and R30, a base bias is formed to set the conduction threshold (4.3V). The slave main chip CTR_IN, with its own IO characteristics, that is, logic below 0.8V is low and above 1V is high, can detect the data sent by the other end and realize 4.5V step-by-step high and low logic digital reception; by controlling the CTR_OUT level and the intervention of the R28 bias resistor, the expected data below 4.3V can be output, that is, low, to realize transmission and reception.
[0068] like Figure 7 As shown, the communication line (comm_line) ladder logic level waveform:
[0069] The waveform at level step i, 101, detects a high level, that is, generates a reset signal to reset the main chip;
[0070] The level is adjusted to the h step, waveform at 102, and maintained at a high level, and the charging state can be entered.
[0071] The level is in the h-step g-step communication, the waveform at 103, at this time, h and g both recognize high and low, that is, data can be obtained. If the transmitting end realizes the same data as the H device and the G end.
[0072] The level drops from step g to step d via step f and e, as shown in the waveform at 104, that is, e is detected to be low, which can be used as a fully charged mark;
[0073] The waveform at 105 realizes the communication process between the sender and the D device.
[0074] The waveform at 106 indicates a certain state, such as the mark inside the earphone box of the earphone charging box (the b step is always high when it can be seen at the earphone end).
[0075] As the earphone of the slave device, it uses the level ladder set by the master charging box to identify the interruption and use the ladder level slot to achieve communication.
[0076] like Figure 8-9 The present invention provides a single-line multi-device priority communication method for a Bluetooth headset. The USB port is plugged into an AC charger to access a USB 5V power supply, so that the charging circuit composed of a charging management chip ETA9697 charges the battery in a charging box; the left and right earphones are put into the box and the box is closed, and the charging box sends a communication pulse to the earphones to perform a master-slave switching function. After receiving a response from the earphones, the MCU turns on the charging chip and boosts 5V to reset and charge the earphones; when the charging box detects that the earphones are fully charged, it turns off the charging 5V and switches to 3V for communication, and transmits the power of the charging box to the earphones, and then the charging box notifies the earphones to enter an energy-saving shutdown mode, and turns off the power to save power after receiving a response. At this time, the earphones are turned off, and the charging box is also turned off. Only the box opening action is detected by the Hall device, and then the 5V reset earphones are turned on again.
[0077] The present application discloses a method for communication control by using ladder level to determine priority. The operation is simple, and it can meet the automatic switching of charging and communication of the main power supply equipment, and transmit relevant information. A single-line short-distance (within 10cm) multi-device communication system is realized by using a very simple circuit. The scheme can be set to send data at the same time and specify the priority device for communication. The present application adopts the principle of single-line multiplexing, and uses a certain level of the ladder as the device selection mark. The comparator formed by a very simple resistor voltage division method or a triode bias is used to send (transmitting end) and detect (receiving end) the logical high and low states of each ladder respectively. The level ladder is used as a state detection to achieve reset, charging or as a certain state mark, and communication is achieved according to the level change timing (logic). The present application solves the problem of charging and communication compatibility; it can be applied to TWS Bluetooth headsets, and can specify which headset is communicating, or two headsets can receive charging box instructions at the same time; at the same time, various states can be marked in a level manner, so that the headset and charging box can be put on standby and save power in time. Moreover, this application can realize the above-mentioned similar complex functions, but the cost is the same as that of ordinary charging boxes; compared with charging boxes with communication functions, the cost and device space are reduced exponentially. And because of its single-line multi-state, multi-step logic communication mode, with step identification as the device address, it can replace traditional USB, UART, IIC, RS485 and other protocols, and is suitable for more short-distance contact multi-connected device applications.
[0078] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any slight modification, equivalent substitution and improvement made to the above embodiment based on the technical essence of the present invention should be included in the protection scope of the technical solution of the present invention.
Claims
1. A single-line multi-device priority communication method, Features: The main power supply device includes a main power supply device, the main power supply device is electrically connected to one or more slave devices, and the main power supply device can be charged at a voltage V 1 , Communication voltage V 2 The master power supply device can detect the level V of the slave device. a , the specific communication control method is as follows: The first step is to divide the stage level and divide a voltage level into N step levels V x , each step level corresponds to a slave device or a state of a slave device; The second step is power supply. When the slave device is connected, the master power supply device switches to V 1 Reset power to the slave device; The third step is communication control. When V a Equal to a certain step level V x When the main power supply equipment switches to the communication voltage V 2 , the master power supply device sends the master power information and communication instructions to the slave device; the master power supply device then switches back to the charging voltage V 1 , continue to detect the level of the slave device, when V a Equal to the next step level V x When V a Reach full charge voltage V max ; Step 4: Check again. The master power supply device continues to detect the level of the slave device. If there is V' x Still lower than V max , then there is another slave device, repeat steps 2 and 3; In the second and third steps: When the master power supply device detects that the slave device level has reached the fully charged voltage V max When the main power supply device is powered from V 1 Drop to the communication voltage V 2 When the master power supply device sends the shutdown command to the slave device, the slave device enters the energy-saving shutdown mode. At this time, the master power supply device detects that the voltage level of the slave device is the energy-saving shutdown state V 0 ; When the master power supply equipment confirms that the last communication command has been issued and the detected levels are all lower than V 0 , the main power supply device enters the sleep state or shutdown state; When the cover is opened or the button is pressed, the main power supply device switches to V 1 Reset the slave device and power it on.
2. An application of the single-line multi-device priority communication method according to claim 1, Features: The specific controls are as follows: When the USB port is plugged into an AC charger and connected to a USB 5V power source, the charging circuit composed of the charging management chip charges the battery in the main power supply device; When one or more slave devices are placed in the master power supply device and the cover is closed, the master power supply device sends a communication pulse to the slave device to enable it to perform the master-slave switching function. After receiving the response from the slave device, the MCU of the master power supply device turns on the charging chip and boosts the voltage by 5V to reset and charge the slave device. When the master power supply device detects that the slave device is fully charged, the master power supply device switches from 5V to 3V for communication and transmits the power of the master power supply device to the slave device. The master power supply device then notifies the slave device to enter the energy-saving shutdown mode. Upon receiving the response, the slave device shuts down to save power. At this time, the slave device shuts down and the master power supply device also shuts down. If the cover opening action is detected by the sensor, the master power supply device re-boosts 5V to reset the slave device and start it up.
