CN112945226A - Headset wearing detection method and device and computer readable storage medium - Google Patents

Headset wearing detection method and device and computer readable storage medium Download PDF

Info

Publication number
CN112945226A
CN112945226A CN202110079725.4A CN202110079725A CN112945226A CN 112945226 A CN112945226 A CN 112945226A CN 202110079725 A CN202110079725 A CN 202110079725A CN 112945226 A CN112945226 A CN 112945226A
Authority
CN
China
Prior art keywords
sensor
headphone
signal
detection sensor
sensor signal
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.)
Granted
Application number
CN202110079725.4A
Other languages
Chinese (zh)
Other versions
CN112945226B (en
Inventor
郎允森
万声国
蔡永桂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN202110079725.4A priority Critical patent/CN112945226B/en
Publication of CN112945226A publication Critical patent/CN112945226A/en
Application granted granted Critical
Publication of CN112945226B publication Critical patent/CN112945226B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/10Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration
    • G01C21/12Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning
    • G01C21/16Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning by integrating acceleration or speed, i.e. inertial navigation
    • G01C21/165Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning by integrating acceleration or speed, i.e. inertial navigation combined with non-inertial navigation instruments

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Automation & Control Theory (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Headphones And Earphones (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a method and a device for detecting wearing of a headset and a computer readable storage medium, wherein a first sensor signal detected by a stretching detection sensor is obtained, and a second sensor signal detected by the wearing detection sensor is obtained when a cross beam is determined to be stretched according to the first sensor signal; or, a third sensor signal detected by the inertial sensor is acquired, and when it is determined that the headphone is picked up based on the third sensor signal, a second sensor signal detected by the wearing detection sensor is acquired. The invention improves the accuracy of the detection result of the wearing condition.

Description

Headset wearing detection method and device and computer readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for detecting wear of a headphone, and a computer-readable storage medium.
Background
With the development of the consumer electronics industry, various consumer electronics products are coming up endlessly. The headphone is a commonly used electronic product, has the characteristics of good sound field, no sound entering the ear and the like, and is popular with consumers. The headset can be used for wearing detection function in order to save the electric quantity to the maximum extent and increase the standby time. When the wearing of the headset is not detected, the headset can enter a low power consumption mode, current consumption is reduced, the service time can be prolonged to the maximum extent, and user experience is improved.
The headset that uses at present wears to detect, and it is main to confirm the state of wearing through the earmuff that detects the headset has or not to cover and establish on the ear, but when the headset was placed on the table, the false impression that the earmuff cover was established on the ear can appear, leads to wearing the degree of accuracy of detecting lower.
Disclosure of Invention
The invention mainly aims to provide a method and a device for detecting wearing of a headset and a computer readable storage medium, aiming at solving the problem of low accuracy of wearing detection.
In order to achieve the above object, the present invention provides a method for detecting wearing of a headphone, including the steps of:
acquiring a first sensor signal detected by the stretching detection sensor, and acquiring a second sensor signal detected by the wearing detection sensor when the beam is determined to be stretched according to the first sensor signal;
or, a third sensor signal detected by the inertial sensor is acquired, and when it is determined that the headset is picked up according to the third sensor signal, a second sensor signal detected by the wearing detection sensor is acquired;
determining whether the headset is worn based on the second sensor signal.
In one embodiment, the stretch detecting sensor includes a flexible sensor, and the step of acquiring a first sensor signal detected by the stretch detecting sensor includes:
and detecting the resistance value of the flexible sensor, and taking the resistance value as a first sensor signal, wherein when the resistance value is smaller than a preset resistance value, the beam is judged to be stretched.
In one embodiment, the stretch detecting sensor includes a bending sensor, and the step of acquiring the first sensor signal detected by the stretch detecting sensor includes:
and detecting a differential capacitance value of the bending sensor, and taking the differential capacitance value as a first sensor signal, wherein when the differential capacitance value is larger than a preset capacitance value, the beam is determined to be stretched.
In an embodiment, after the step of acquiring the first sensor signal detected by the stretch detecting sensor, the method further includes:
when the first sensor signal determines that the cross beam is not stretched, determining that the headset is not worn.
In an embodiment, after the step of determining whether the headset is worn according to the second sensor signal, the method further includes:
when the second sensor signal meets a preset condition, the headset is judged to be worn;
and when the second sensor signal does not meet the preset condition, judging that the headset is not worn.
In one embodiment, the wear detection sensor comprises an infrared sensor, and the step of acquiring a second sensor signal detected by the wear detection sensor comprises:
controlling the infrared sensor to emit an infrared signal, detecting the distance from the infrared sensor to a human body, and taking the distance as the second sensor signal, wherein when the distance is smaller than a preset distance, the earphone is judged to be worn;
or detecting the time difference between the infrared signal emitted by the infrared sensor and the received infrared signal and the phase difference between the emitted infrared signal and the received infrared signal, and taking the time difference and the phase difference as a second sensor signal, wherein the preset condition comprises that the time difference and the phase difference are smaller than a preset threshold value.
In one embodiment, the wear detection sensor comprises an ultrasonic detection sensor, and the step of acquiring the second sensor signal detected by the wear detection sensor comprises:
controlling the ultrasonic detection sensor to emit ultrasonic pulses, and detecting the signal amplitude of the ultrasonic pulses reflected by the human body and received by the ultrasonic detection sensor;
and taking the signal amplitude as a second sensor signal, wherein the preset condition comprises that the signal amplitude is larger than a preset signal amplitude.
In an embodiment, the wear detection sensor comprises a pressure sensor, and the step of acquiring a second sensor signal detected by the wear detection sensor comprises:
detecting the voltage value of the pressure sensor in real time;
and taking the voltage value as a second sensor signal, wherein the preset condition comprises that the voltage value is larger than a preset voltage value.
In order to achieve the above object, the present invention further provides a headphone wearing detection apparatus, including a stretch detection sensor, a wearing detection sensor, a memory, a processor, and a headphone wearing detection program stored in the memory and executable on the processor, the stretch detection sensor and the wearing detection sensor being connected to the processor, the headphone wearing detection program, when executed by the processor, implementing the steps of the headphone wearing detection method as described above.
To achieve the above object, the present invention also provides a computer-readable storage medium storing a headphone wear detection program that, when executed by a processor, implements the steps of the headphone wear detection method as described above.
According to the method and the device for detecting the wearing of the headset and the computer readable storage medium, the first sensor signal obtained by detecting the stretching detection sensor is used for acquiring the second sensor signal detected by the wearing detection sensor when the beam is judged to be stretched according to the first sensor signal, and whether the headset is worn or not is determined according to the second sensor signal. Or, when the headset is judged to be picked up according to the third sensor signal, the third sensor signal obtained through detection of the inertial sensor is used for acquiring the second sensor signal detected by the wearing detection sensor, and whether the headset is worn or not is determined according to the second sensor signal. Compared with a single detection sensor, the wearing condition of the earphone is judged comprehensively through stretching the detection sensor and wearing the detection sensor or integrating the inertia detection sensor and wearing the detection sensor, and the accuracy of the detection result of the wearing condition is improved.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of a device based on a headphone wearing detection according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a method for detecting wearing of a headphone according to a first embodiment of the present invention;
fig. 3 is a schematic flowchart of a headphone wearing detection method according to a second embodiment of the present invention;
fig. 4 is a schematic diagram of an external processing circuit of the headphone wear detection method of the present invention;
fig. 5 is a schematic flowchart of a headphone wearing detection method according to a third embodiment of the present invention;
FIG. 6 is a schematic diagram of an external analog front-end chip of the method for detecting wearing of a headphone according to the present invention;
fig. 7 is a detailed flowchart of the method for detecting wearing of a headphone according to the fourth embodiment of the present invention, wherein the second sensor signal detected by the wearing detection sensor is obtained in step S10 or step S20;
fig. 8 is a detailed flowchart of the method for detecting wearing of a headphone according to the fifth embodiment of the present invention, wherein the second sensor signal detected by the wearing detection sensor is obtained in step 10 or step S20;
FIG. 9 is a logic block diagram of the inside of an ultrasonic sensor of the headset wearing detection method of the present invention;
fig. 10 is a detailed flowchart of the method for detecting wearing of a headphone according to the sixth embodiment of the present invention, wherein the step 10 or the step S20 obtains the second sensor signal detected by the wearing detection sensor;
fig. 11 is a schematic diagram of an external analog front-end chip of the method for detecting wearing of a headphone according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the embodiment of the invention is as follows: acquiring a first sensor signal detected by the stretching detection sensor, and acquiring a second sensor signal detected by the wearing detection sensor when the beam is determined to be stretched according to the first sensor signal; or, a third sensor signal detected by the inertial sensor is acquired, and when it is determined that the headset is picked up according to the third sensor signal, a second sensor signal detected by the wearing detection sensor is acquired; determining whether the headset is worn based on the second sensor signal.
Compared with a single detection sensor, the wearing condition of the earphone is comprehensively judged through the stretching detection sensor and the wearing detection sensor, and the accuracy of the detection result of the wearing condition is improved.
As an implementation, the headset wearing detection apparatus may be as shown in fig. 1.
The embodiment of the invention relates to a headset wearing detection device, which comprises: a processor 101, e.g. a CPU, a memory 102, a communication bus 103. Wherein a communication bus 103 is used for enabling the connection communication between these components.
The memory 102 may be a high-speed RAM memory or a non-volatile memory (e.g., a disk memory). As shown in fig. 1, a headphone wearing detection program may be included in a memory 102 as a computer-readable storage medium; and the processor 101 may be configured to invoke the headset wearing detection program stored in the memory 102 and perform the following operations:
acquiring a first sensor signal detected by the stretching detection sensor, and acquiring a second sensor signal detected by the wearing detection sensor when the beam is determined to be stretched according to the first sensor signal;
or, a third sensor signal detected by the inertial sensor is acquired, and when it is determined that the headset is picked up according to the third sensor signal, a second sensor signal detected by the wearing detection sensor is acquired;
determining whether the headset is worn based on the second sensor signal.
In an embodiment, the processor 101 may be configured to invoke a headset wearing detection program stored in the memory 102 and perform the following operations:
and detecting the resistance value of the flexible sensor, and taking the resistance value as a first sensor signal, wherein when the resistance value is smaller than a preset resistance value, the beam is judged to be stretched.
In an embodiment, the processor 101 may be configured to invoke a headset wearing detection program stored in the memory 102 and perform the following operations:
and detecting a differential capacitance value of the bending sensor, and taking the differential capacitance value as a first sensor signal, wherein when the differential capacitance value is larger than a preset capacitance value, the beam is determined to be stretched.
In an embodiment, the processor 101 may be configured to invoke a headset wearing detection program stored in the memory 102 and perform the following operations:
when the first sensor signal determines that the cross beam is not stretched, determining that the headset is not worn.
In an embodiment, the processor 101 may be configured to invoke a headset wearing detection program stored in the memory 102 and perform the following operations:
when the second sensor signal meets a preset condition, the headset is judged to be worn;
and when the second sensor signal does not meet the preset condition, judging that the headset is not worn.
In an embodiment, the processor 101 may be configured to invoke a headset wearing detection program stored in the memory 102 and perform the following operations:
controlling the infrared sensor to emit an infrared signal, detecting the distance from the infrared sensor to a human body, and taking the distance as the second sensor signal, wherein when the distance is smaller than a preset distance, the earphone is judged to be worn;
or detecting the time difference between the infrared signal emitted by the infrared sensor and the received infrared signal and the phase difference between the emitted infrared signal and the received infrared signal, and taking the time difference and the phase difference as a second sensor signal, wherein the preset condition comprises that the time difference and the phase difference are smaller than a preset threshold value.
In an embodiment, the processor 101 may be configured to invoke a headset wearing detection program stored in the memory 102 and perform the following operations:
controlling the ultrasonic detection sensor to emit ultrasonic pulses, and detecting the signal amplitude of the ultrasonic pulses reflected by the human body and received by the ultrasonic detection sensor;
and taking the signal amplitude as a second sensor signal, wherein the preset condition comprises that the signal amplitude is larger than a preset signal amplitude.
In an embodiment, the processor 101 may be configured to invoke a headset wearing detection program stored in the memory 102 and perform the following operations:
detecting the voltage value of the pressure sensor in real time;
and taking the voltage value as a second sensor signal, wherein the preset condition comprises that the voltage value is larger than a preset voltage value.
Based on the hardware architecture of the headset wearing detection device, the embodiment of the headset wearing detection method is provided.
Referring to fig. 2, fig. 2 is a first embodiment of a headphone wearing detection method according to the present invention, the headphone wearing detection method including the steps of:
step S10, acquiring a first sensor signal detected by the tension detection sensor, and acquiring a second sensor signal detected by the wear detection sensor when it is determined that the cross beam is tensioned based on the first sensor signal;
specifically, the tension detection sensor is used to detect tension of the beam, and the tension detection sensor is not limited to the sensor mentioned in this application, and acquires a first sensor signal detected by the tension detection sensor, where the tension detection sensor may be a flexible sensor or a bending sensor, the tension detection sensor is disposed on the beam of the headphone, and detection points of the tension detection sensor may be on both sides of the beam of the headphone. And judging the stretching condition of the cross beam according to the first sensor signal, and judging that the headset is not worn when the cross beam is judged to be not stretched by the first sensor signal. When it is determined that the cross beam is stretched according to the first sensor signal, the wearing condition of the headphone needs to be determined in combination with the sensor signal of the wearing detection sensor.
The wearing detection sensor is provided on an ear shell of the headphone, and the wearing detection sensor may be at least one of an infrared sensor, an ultrasonic detection sensor, a time-of-flight proximity detection sensor, and a pressure sensor. Any wear detection sensor can be arranged in each of the two earmuffs, illustratively, the left earmuff is an infrared sensor, and the right earmuff is provided with an ultrasonic detection sensor. The second sensor signals of the wearing detection sensors of the two earmuffs are respectively checked for wearing detection, and the wearing detection has better accuracy rate than the wearing detection of a single sensor.
In the case where it is determined from the first sensor signal that the cross beam is stretched, a second sensor signal detected by the wear detection sensor is acquired.
Step S20, alternatively, a third sensor signal detected by the inertial sensor is acquired, and a second sensor signal detected by the wearing detection sensor is acquired when it is determined that the headphone is picked up based on the third sensor signal;
specifically, the inertial sensor is used to detect whether the headset is picked up, and the inertial sensor may be an attitude detection sensor, and is not limited to the sensor mentioned in this application, and acquires a third sensor signal detected by the inertial sensor, where the inertial sensor is disposed at any position on the headset. And when the headset is judged not to be picked up according to the third sensor signal, the headset is judged not to be worn. When it is determined that the headphone is picked up based on the third sensor signal, it is necessary to determine the wearing condition of the headphone by using the sensor signal of the wearing detection sensor. The wearing detection sensor will not be described herein. When it is determined that the headphone is lifted based on the third sensor signal, a second sensor signal detected by the wearing detection sensor is acquired.
Step S30, determining whether the headset is worn according to the second sensor signal.
Specifically, because the object is different from the second sensor signal when no object is close to the earmuff when being close to the earmuff, whether there is the object to be close to the earmuff, it is the ear of user that is close to the earmuff generally to judge by the second sensor signal. Judging whether the headset is worn or not according to the second sensor signal, and judging that the headset is worn when the second sensor signal meets a preset condition; and when the second sensor signal does not meet the preset condition, judging that the headset is not worn.
In the technical solution of this embodiment, when it is determined that the cross beam is stretched according to the first sensor signal that the first sensor signal is detected by the stretch detection sensor, the second sensor signal detected by the wear detection sensor is acquired, and whether the headphone is worn or not is determined according to the second sensor signal. Or, when the headset is judged to be picked up according to the third sensor signal, the third sensor signal obtained through detection of the inertial sensor is used for acquiring the second sensor signal detected by the wearing detection sensor, and whether the headset is worn or not is determined according to the second sensor signal. Compared with a single detection sensor, the wearing condition of the earphone is judged comprehensively through stretching the detection sensor and wearing the detection sensor or integrating the inertia detection sensor and wearing the detection sensor, and the accuracy of the detection result of the wearing condition is improved.
Referring to fig. 3, fig. 3 is a second embodiment of the method for detecting wearing of a headphone according to the present invention, where based on the first embodiment, the acquiring, in step S10, the first sensor signal detected by the stretch detection sensor includes:
and step S11, detecting the resistance value of the flexible sensor in real time, and using the resistance value as a first sensor signal, wherein when the resistance value is smaller than a preset resistance value, the beam is judged to be stretched.
Specifically, the tension detecting sensor may be a flexible sensor. When the earphone beam is stretched, the bending angle of the flexible sensor is changed, and the resistance output by the flexible sensor is changed accordingly. When the earphone cross beam is not stretched, the resistance output by the flexible sensor is the maximum, when the earphone is worn, the cross beam is stretched, the bending angle of the flexible sensor is increased, and the resistance output by the flexible sensor is correspondingly reduced. And taking the resistance value as a first sensor signal, and judging that the beam is stretched when the resistance value is smaller than a preset resistance value.
The first sensor signal can be transmitted to the corresponding micro control unit or the Bluetooth chip through an external processing circuit, whether the flexible sensor detects the change of the bending angle or not is identified, and whether the cross beam is stretched or not is judged according to the bending angle. For example, the external processing circuit may be connected in series with the flexible sensor through a resistor, and then the microcontroller unit or the bluetooth chip may collect the output voltage corresponding to the resistor. The external processing circuit can also add a comparator externally, as shown in fig. 4, R1 and R2 are connected in series to set a threshold voltage, R4 is a flexible sensor, when the beam is not stretched, the resistance value output by the flexible sensor is maximum, and the output of the output end is high level; when the flexible sensor is stretched, the resistance value is gradually reduced, and when the set threshold voltage is reached, the output of the output end is a low level, so that whether the flexible sensor is in an effective wearing state or not can be judged through the micro control unit or the Bluetooth chip.
In the technical scheme of this embodiment, regard as the first sensor signal with the resistance of flexible sensor, judge the tensile condition of crossbeam according to the resistance, when the resistance is less than predetermineeing the resistance, can confirm that the crossbeam is stretched, accurate tensile condition to the crossbeam has detected.
Referring to fig. 5, fig. 5 is a third embodiment of the method for detecting wearing of a headphone according to the present invention, where based on the first embodiment, the acquiring, in step S10, the first sensor signal detected by the stretch detection sensor includes:
step S12, detecting a differential capacitance value of the bending sensor in real time, and using the differential capacitance value as a first sensor signal, wherein when the differential capacitance value is greater than a preset capacitance value, it is determined that the beam is stretched.
Specifically, the stretching detection sensor may be a bending sensor, the bending sensor is configured to detect an angle change of two end points fixed to the cross beam along a stretching direction of the cross beam, when the cross beam is not worn, the angle is a minimum value, a differential capacitance output by the bending sensor is a minimum value, when the cross beam is stretched when the cross beam is worn, the angle is increased, and a differential capacitance output by the bending sensor is correspondingly increased. The differential capacitance output by the bending sensor has a linear relation with the angle, and along with the increase of the angle, the differential capacitance output by the bending sensor is correspondingly increased.
Because the change of the differential capacitance output by the bending sensor is small, generally at pf level, the change of the differential capacitance is difficult to directly detect by using a micro control unit or a Bluetooth chip. As shown in fig. 6, an analog front-end chip is externally connected to an output end of the bending sensor, and a differential capacitor changed by the bending sensor is processed by an amplifier AMP inside an analog front-end chip AFE, and then converted into a digital signal by an internal digital-to-analog conversion signal ADC and the like, and transmitted to a micro control unit or a bluetooth chip through an I2C interface. When the bending sensor is stretched, the differential capacitance corresponding to the bending sensor changes, then the signal is output to the micro control unit or the Bluetooth chip through the analog front end AFE processing, the micro control unit or the Bluetooth chip reads data in the analog front end AFE through the I2C to perform judgment processing, so that the angle of two end points on the bending sensor along the head-wearing stretching direction can be identified, and the stretching condition of the beam can be judged. The bending sensor is set with a low threshold and a high threshold by the micro control unit. When the headset is in a wearing state and the output signal processed by the bending sensor is greater than a set high threshold value, the micro control unit judges that the cross beam is stretched; when the headset is in a non-wearing state and the output signal processed by the bending sensor is smaller than a set low threshold value, the micro control unit judges that the cross beam is not stretched.
In the technical scheme of this embodiment, the differential capacitance value of the bending sensor is detected in real time, the differential capacitance value is used as a first sensor signal, the stretching condition of the beam is judged according to the differential capacitance value, and when the differential capacitance value is larger than a preset capacitance value, the beam is judged to be stretched, so that the stretching condition of the beam is accurately detected.
Referring to fig. 7, fig. 7 is a fourth embodiment of the method for detecting wearing of a headphone according to the present invention, where based on any one of the first to third embodiments, the acquiring of the second sensor signal detected by the wearing detection sensor in step 10 or step S20 includes:
step S21, controlling the infrared sensor to emit an infrared signal, detecting the distance from the infrared sensor to a human body, and taking the distance as the second sensor signal, wherein when the distance is smaller than a preset distance, the earphone is judged to be worn;
step S22, or detecting a time difference between the infrared signal emitted by the infrared sensor and the received infrared signal, and a phase difference between the infrared signal emitted by the infrared sensor and the received infrared signal, and using the time difference and the phase difference as a second sensor signal, where the preset condition includes that the time difference and the phase difference are smaller than a preset threshold.
Specifically, the wearing detection sensor may be an infrared sensor, the infrared sensor may be an infrared proximity detection sensor, the infrared proximity detection sensor is a sensor utilizing light sensing such as infrared, and the infrared proximity detection sensor includes an infrared emitting diode and a photosensitive receiving device inside. The infrared proximity detection sensor can reflect when infrared light emitted by the infrared proximity detection sensor meets a human body or an obstacle, so that the infrared proximity detection sensor is received by a photosensitive device in the infrared proximity detection sensor, the intensity of the reflected infrared light can be adjusted by adjusting the emitted current and pulse width modulation inside, the distance from the infrared proximity detection sensor to the obstacle or a detected object is determined according to the adjusted infrared light, and the wearing condition of the earphone can be judged. Illustratively, the infrared proximity detection sensor is connected to the bluetooth chip or the micro control unit through an I2C bus, wherein the infrared proximity detection sensor is set with a low threshold and a high threshold through the micro control unit, when the infrared proximity detection sensor detects that the distance from the human body or the obstacle to the sensor is greater than the set high threshold, the micro control unit determines that the headset is worn, otherwise, when the distance is less than the set low threshold, the micro control unit determines that the headset is not worn.
The infrared sensor can be a time-of-flight proximity detection sensor, the time-of-flight proximity detection sensor is a sensor which transmits 940nm infrared light, the infrared light is reflected after encountering an obstacle, the time-of-flight proximity detection sensor calculates the distance from the time-of-flight proximity detection sensor to the obstacle by calculating the time difference and the phase difference between infrared light transmission and reflection, and when the time difference and the phase difference are smaller than a preset threshold value, namely the distance from the time-of-flight proximity detection sensor to the obstacle is smaller than a preset distance, the earphone is judged to be worn. The judgment of the signals of the flight time proximity detection sensor in the micro control unit or the Bluetooth chip is similar to that of an infrared sensor, a high threshold value and a low threshold value are set in the micro control unit or the Bluetooth chip, the detection mode is also similar to that of the infrared proximity detection sensor, and in addition, detailed description is not needed.
In the technical scheme of the embodiment, an infrared sensor is controlled to emit an infrared signal, the distance from the infrared sensor to a human body is detected, and when the distance is smaller than a preset distance, the earphone is judged to be worn; or determining the time difference and the phase difference between the transmitted infrared signal and the received infrared signal, judging that the earphone is worn when the time difference and the phase difference are larger than a preset threshold value, and accurately judging the wearing condition of the earphone.
Referring to fig. 8, fig. 8 is a fifth embodiment of the method for detecting wearing of a headphone according to the present invention, where, based on any one of the first to third embodiments, the acquiring of the second sensor signal detected by the wearing detection sensor in step 10 or step S20 includes:
step S23, controlling the ultrasonic detection sensor to emit ultrasonic pulses and detecting the signal amplitude of the ultrasonic pulses reflected by the human body and received by the ultrasonic detection sensor;
step S24, using the signal amplitude as a second sensor signal, wherein the preset condition includes that the signal amplitude is greater than a preset signal amplitude.
Specifically, the wearing detection sensor may be an ultrasonic detection sensor, the amplitude of a signal received by the ultrasonic sensor when the headset is correctly worn is significantly higher than the amplitude of a signal received by the ultrasonic sensor when the headset is not worn, and when the amplitude of the signal is larger than a preset amplitude of the signal, it is determined that the headset is worn. As shown in fig. 9, which is a logic block diagram inside the ultrasonic sensor, the control line SCL and the data line SDA are connected to the micro control unit, the micro control unit controls the inside of the ultrasonic sensor to transmit ultrasonic pulses, the ultrasonic pulses are reflected after encountering an obstacle, the received reflected ultrasonic signals are processed by the internal digital-to-analog conversion signal ADC, and the signals are transmitted to the micro control unit through I2C, where I2C may be the data line SDA and the control line SCL, and the speed of sound wave propagating in the air is 343m/s, and the micro control unit can determine the distance from the obstacle to the ultrasonic sensor by processing the internal signals with the transmission time, thereby determining the wearing condition of the earphone. The ultrasonic detection sensor is similar to an infrared sensor in the micro control unit or the Bluetooth chip, a high threshold value and a low threshold value are set in the micro control unit or the Bluetooth chip, the detection mode is similar to the infrared sensor, and in addition, detailed description is not needed.
In the technical scheme of this embodiment, the ultrasonic detection sensor is controlled to emit ultrasonic pulses, the signal amplitude of the received ultrasonic pulses reflected by the human body is detected, the signal amplitude is used as a second sensor signal, when the signal amplitude is larger than the preset signal amplitude, it is determined that the earphone is worn, and the wearing condition of the earphone is accurately determined.
Referring to fig. 10, fig. 10 is a sixth embodiment of the method for detecting wearing of a headphone according to the present invention, where based on any one of the first to third embodiments, the acquiring of the second sensor signal detected by the wearing detection sensor in step 10 or step S20 includes:
step S27, detecting the voltage value of the pressure sensor in real time;
step S28, using the voltage value as a second sensor signal, wherein the preset condition includes that the voltage value is greater than a preset voltage value.
Specifically, the wear detection sensor may be a pressure sensor, and specifically may be a MEMS (micro electro Mechanical Systems) pressure detection sensor. When pressure is applied to the pressure detection sensor indirectly or directly, the output voltage of the pressure detection sensor slightly changes, generally in the mV level, and the output voltage of the pressure detection sensor obviously increases with the increase of the applied pressure, but due to small changes, if the external direct detection is performed by the micro control unit or the bluetooth chip, the internal processing is difficult and the resolution is low. Therefore, as shown in fig. 11, the external analog front end chip at the output end of the pressure detection sensor is used for processing the voltage value of the pressure detection sensor through an amplifier AMP inside the analog front end chip AFE, then converting the voltage value into a digital signal through an internal digital-to-analog conversion signal ADC and the like, and transmitting the digital signal to the micro control unit or the bluetooth chip through the I2C interface, when an external force is applied to the pressure detection sensor, the analog front end AFE outputs an interrupt signal to the micro control unit or the bluetooth chip, and then the micro control unit or the bluetooth chip reads data in the analog front end AFE through the I2C to perform judgment processing, so that whether the pressure detection sensors have effective external force application can be identified, and whether the second detection sensor is in an effective wearing state can be judged. The pressure detection sensor is connected to the bluetooth chip or the micro control unit through an I2C bus, wherein the pressure detection sensor is set with a low threshold and a high threshold through the micro control unit, which is similar to the infrared sensor detection processing and will not be described here.
In the technical scheme of this embodiment, the voltage value of the pressure sensor is detected in real time, the voltage value is used as a second sensor signal, when the voltage value is greater than a preset voltage value, the wearing of the earphone is judged, and the wearing condition of the earphone is accurately judged.
The present invention also provides a headphone wear detection apparatus, which includes a stretch detection sensor, a wear detection sensor, a memory, a processor, and a headphone wear detection program stored in the memory and executable on the processor, wherein the stretch detection sensor and the wear detection sensor are connected to the processor, and the headphone wear detection program, when executed by the processor, implements the steps of the headphone wear detection method according to the above embodiment.
The present invention also provides a computer-readable storage medium storing a headphone wear detection program, which when executed by a processor, implements the steps of the headphone wear detection method according to the above embodiment.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a computer-readable storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above, and includes several instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for detecting wearing of a headphone, the method being applied to the headphone, wherein a cross beam of the headphone is provided with a stretch detection sensor and the headphone is provided with an inertial sensor, an ear shield of the headphone is provided with a wearing detection sensor, and the method for detecting wearing of the headphone comprises:
acquiring a first sensor signal detected by the stretching detection sensor, and acquiring a second sensor signal detected by the wearing detection sensor when the beam is determined to be stretched according to the first sensor signal;
or, a third sensor signal detected by the inertial sensor is acquired, and when it is determined that the headset is picked up according to the third sensor signal, a second sensor signal detected by the wearing detection sensor is acquired;
determining whether the headset is worn based on the second sensor signal.
2. The headphone wear detection method according to claim 1, wherein the tension detection sensor includes a flexible sensor, and the step of acquiring the first sensor signal detected by the tension detection sensor includes:
and detecting the resistance value of the flexible sensor, and taking the resistance value as a first sensor signal, wherein when the resistance value is smaller than a preset resistance value, the beam is judged to be stretched.
3. The headphone wear detection method according to claim 1, wherein the tension detection sensor includes a bending sensor, and the step of acquiring the first sensor signal detected by the tension detection sensor includes:
and detecting a differential capacitance value of the bending sensor, and taking the differential capacitance value as a first sensor signal, wherein when the differential capacitance value is larger than a preset capacitance value, the beam is determined to be stretched.
4. The headphone wear detection method according to claim 1, wherein the step of acquiring the first sensor signal detected by the tension detection sensor further comprises:
when the first sensor signal determines that the cross beam is not stretched, determining that the headset is not worn.
5. The headphone wear detection method of claim 1, wherein the step of determining whether the headphone is worn from the second sensor signal further comprises, after the step of:
when the second sensor signal meets a preset condition, the headset is judged to be worn;
and when the second sensor signal does not meet the preset condition, judging that the headset is not worn.
6. The headphone wear detection method according to claim 5, wherein the wear detection sensor includes an infrared sensor, and the step of acquiring the second sensor signal detected by the wear detection sensor includes:
controlling the infrared sensor to emit an infrared signal, detecting the distance from the infrared sensor to a human body, and taking the distance as the second sensor signal, wherein when the distance is smaller than a preset distance, the earphone is judged to be worn;
or detecting the time difference between the infrared signal emitted by the infrared sensor and the received infrared signal and the phase difference between the emitted infrared signal and the received infrared signal, and taking the time difference and the phase difference as a second sensor signal, wherein the preset condition comprises that the time difference and the phase difference are smaller than a preset threshold value.
7. The headphone wear detection method according to claim 5, wherein the wear detection sensor includes an ultrasonic detection sensor, and the step of acquiring the second sensor signal detected by the wear detection sensor includes:
controlling the ultrasonic detection sensor to emit ultrasonic pulses, and detecting the signal amplitude of the ultrasonic pulses reflected by the human body and received by the ultrasonic detection sensor;
and taking the signal amplitude as a second sensor signal, wherein the preset condition comprises that the signal amplitude is larger than a preset signal amplitude.
8. The headphone wear detection method according to claim 5, wherein the wear detection sensor includes a pressure sensor, and the step of acquiring the second sensor signal detected by the wear detection sensor includes:
detecting the voltage value of the pressure sensor in real time;
and taking the voltage value as a second sensor signal, wherein the preset condition comprises that the voltage value is larger than a preset voltage value.
9. A headphone wear detection apparatus comprising a stretch detection sensor, a wear detection sensor, a memory, a processor, and a headphone wear detection program stored in the memory and executable on the processor, the stretch detection sensor and the wear detection sensor being connected to the processor, the headphone wear detection program, when executed by the processor, implementing the steps of the headphone wear detection method of any of claims 1-8.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a headphone wear detection program that realizes the steps of the headphone wear detection method according to any one of claims 1 to 8 when executed by a processor.
CN202110079725.4A 2021-01-26 2021-01-26 Headset wearing detection method, device and computer readable storage medium Active CN112945226B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110079725.4A CN112945226B (en) 2021-01-26 2021-01-26 Headset wearing detection method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110079725.4A CN112945226B (en) 2021-01-26 2021-01-26 Headset wearing detection method, device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112945226A true CN112945226A (en) 2021-06-11
CN112945226B CN112945226B (en) 2023-07-14

Family

ID=76235663

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110079725.4A Active CN112945226B (en) 2021-01-26 2021-01-26 Headset wearing detection method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112945226B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182051A (en) * 2014-08-29 2014-12-03 百度在线网络技术(北京)有限公司 Headset intelligent device and interactive system with same
KR20160036393A (en) * 2014-09-25 2016-04-04 하이브모션 주식회사 headset for measuring EEG signal and measuring method using the same
CN105474663A (en) * 2013-08-13 2016-04-06 索尼公司 Headphone-type acoustic device and method for controlling same
US20160165035A1 (en) * 2014-12-03 2016-06-09 Fih (Hong Kong) Limited Electronic device and method for controlling electronic device using headset
WO2017146671A1 (en) * 2016-02-22 2017-08-31 Honeywell International Inc. System and method for detecting earmuff worn status for true low power mode and real time fitment check
WO2018053677A1 (en) * 2016-09-20 2018-03-29 华为技术有限公司 Method of detecting whether smart device is being worn, and smart device
CN110099324A (en) * 2019-05-23 2019-08-06 歌尔科技有限公司 A kind of detection method, detection device and the earphone of earphone wearing state
CN110175014A (en) * 2019-05-28 2019-08-27 歌尔科技有限公司 A kind of wireless headset method for controlling volume, system and wireless headset and storage medium
CN110351646A (en) * 2019-06-19 2019-10-18 歌尔科技有限公司 A kind of wearing detection method and headphone for headphone
US10555106B1 (en) * 2017-01-27 2020-02-04 Facebook Technologies, Llc Gaze-directed audio enhancement
CN111083271A (en) * 2019-12-27 2020-04-28 歌尔股份有限公司 Wearing detection method, system, equipment and computer readable storage medium
CN111148009A (en) * 2019-12-31 2020-05-12 歌尔科技有限公司 Earphone wearing state determining method and device and earphone
CN111366175A (en) * 2020-04-20 2020-07-03 深圳市科奈信科技有限公司 Wireless earphone, method and device for detecting wearing state of wireless earphone and storage medium
CN111464908A (en) * 2020-04-28 2020-07-28 歌尔科技有限公司 Earphone and earphone control method

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105474663A (en) * 2013-08-13 2016-04-06 索尼公司 Headphone-type acoustic device and method for controlling same
CN104182051A (en) * 2014-08-29 2014-12-03 百度在线网络技术(北京)有限公司 Headset intelligent device and interactive system with same
KR20160036393A (en) * 2014-09-25 2016-04-04 하이브모션 주식회사 headset for measuring EEG signal and measuring method using the same
US20160165035A1 (en) * 2014-12-03 2016-06-09 Fih (Hong Kong) Limited Electronic device and method for controlling electronic device using headset
WO2017146671A1 (en) * 2016-02-22 2017-08-31 Honeywell International Inc. System and method for detecting earmuff worn status for true low power mode and real time fitment check
WO2018053677A1 (en) * 2016-09-20 2018-03-29 华为技术有限公司 Method of detecting whether smart device is being worn, and smart device
US10555106B1 (en) * 2017-01-27 2020-02-04 Facebook Technologies, Llc Gaze-directed audio enhancement
CN110099324A (en) * 2019-05-23 2019-08-06 歌尔科技有限公司 A kind of detection method, detection device and the earphone of earphone wearing state
CN110175014A (en) * 2019-05-28 2019-08-27 歌尔科技有限公司 A kind of wireless headset method for controlling volume, system and wireless headset and storage medium
CN110351646A (en) * 2019-06-19 2019-10-18 歌尔科技有限公司 A kind of wearing detection method and headphone for headphone
CN111083271A (en) * 2019-12-27 2020-04-28 歌尔股份有限公司 Wearing detection method, system, equipment and computer readable storage medium
CN111148009A (en) * 2019-12-31 2020-05-12 歌尔科技有限公司 Earphone wearing state determining method and device and earphone
CN111366175A (en) * 2020-04-20 2020-07-03 深圳市科奈信科技有限公司 Wireless earphone, method and device for detecting wearing state of wireless earphone and storage medium
CN111464908A (en) * 2020-04-28 2020-07-28 歌尔科技有限公司 Earphone and earphone control method

Also Published As

Publication number Publication date
CN112945226B (en) 2023-07-14

Similar Documents

Publication Publication Date Title
US10390123B2 (en) Proximity sensing headphones
US9734699B2 (en) System for providing alerts to vehicle occupants
CN110112984B (en) Vibration control method of linear motor and mobile terminal
KR101952798B1 (en) Detection distance calibration method, apparatus, and device
US20120162636A1 (en) Proximity detector including anti-falsing mechanism
CN108390117B (en) Charging method and mobile terminal
EP3130938B1 (en) Object detection device and object detection method
CN110139018B (en) Camera control module, camera movement control method and terminal
US10595115B2 (en) Earphone
CN111698601B (en) Bluetooth headset, and key sensitivity adjustment method, device and readable storage medium thereof
US9994173B2 (en) Increasing the availability of ultrasound-based driver assistance systems in the event of undervoltage in the vehicle
CN112945226B (en) Headset wearing detection method, device and computer readable storage medium
JPWO2012029376A1 (en) Calibration processing apparatus and calibration processing method for ultrasonic detection apparatus, and on-vehicle obstacle detection apparatus
CN111638522B (en) Proximity detection method and electronic device
KR102569543B1 (en) Obstacle sensing system and obstacle sensing method
CN107942333B (en) Data processing method of range finding sonar
KR102223653B1 (en) Apparatus and method for processing voice signal and terminal
CN113286220B (en) Wearing state detection method, wearable device and computer readable storage medium
US10942578B2 (en) System and method for recognition of the gesture of bringing a mobile electronic device to a user ear
JP2010186651A (en) Connector insertion-coupling determination device and connector insertion-coupling determination method
CN110912284B (en) Wireless charging control method and wireless charging assembly
CN110987154B (en) Detection method and device for knocking event, medium and head-mounted equipment
KR20210023050A (en) Electronic device adjusting output power of signal by using millimeter wave and method for controlling thereof
KR102479411B1 (en) Driving assistance device and warning method of thereof
CN112865862B (en) Ambient light detection method and apparatus for optical communication between electronic devices

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant