Test circuit and headphones
By designing the control module and switching module in the headset, and using the existing interface to switch the working loop and the test loop, the problem of cumbersome testing or increased volume in the existing technology is solved, and signal testing without disassembly and adding interfaces is realized. .
Patent Information
- Application Number
- CN202410891767.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-07-04
AI Technical Summary
When performing signal testing on existing headsets, it is usually necessary to disassemble or add additional interfaces, which results in cumbersome testing or an increase in the size and weight of the equipment. There is a lack of test solutions that do not require additional interfaces and do not require disassembly.
A test circuit is designed, which includes a control module, a first switching module and a test module. It controls the disconnection and conduction of the working loop and the test loop by switching signals, and uses the existing interface to connect with external test equipment to implement signal testing.
It enables signal testing of headphones without adding additional interfaces and disassembling the device, simplifying the testing process and maintaining the normal functionality of the device.
Smart Images

Figure CN118433603B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of hardware circuits, and in particular to a test circuit and a headphone. Background Art
[0002] At present, in order to reduce the size and weight of the headset and improve wearing comfort, headphones generally only have one interface for charging and data transmission. In order to implement signal testing on headphones, there are usually two methods: one is to add test points on the internal circuit board of the headset and connect the test points to external test equipment for testing, but this will require disassembly of the headset, making the testing process cumbersome; the other is to set up an additional interface specifically for testing, but this will increase the size and weight of the device.
[0003] Therefore, how to implement testing without adding additional interfaces or disassembling the device is an urgent problem to be solved. Summary of the invention
[0004] The main purpose of this application is to provide a test circuit and headphones, aiming to solve the technical problem of how to implement testing without adding additional interfaces and without disassembling the device.
[0005] To achieve the above object, the present application provides a test circuit, the circuit comprising: a control module, a first switching module and a test module;
[0006] The first switching module is connected to the control module via a first control loop and a working loop, the first switching module is connected to the test module via a test loop, and the first switching module is also connected to an external test device via an interface;
[0007] The control module is configured to transmit the generated first switching signal to the first switching module through the first control loop when detecting that the current phase is the test phase, so that the first switching module disconnects the working loop and connects the test loop;
[0008] The test module is used to transmit the collected signal to be tested to the external test equipment through the interface for testing when the test loop is turned on.
[0009] In one embodiment, the control module includes: a power management unit and a microprocessor;
[0010] The power management unit and the microprocessor are both connected to the first switching module via the first control loop, the microprocessor is also connected to the first switching module via the working loop, and the interface is also connected to an external command terminal;
[0011] The power management unit is configured to transmit the generated first switching signal to the first switching module through the first control loop when detecting that the current phase is a test phase;
[0012] The microprocessor is configured to transmit the generated second switching signal to the first switching module through the first control loop when receiving the test instruction sent by the external instruction terminal;
[0013] The first switching module is used to disconnect the working loop and connect the test loop when receiving the first switching signal and the second switching signal.
[0014] In one embodiment, the interface is connected to the external test equipment and the external command terminal via an interface adapter board;
[0015] The microprocessor is further configured to transmit a generated test signal to the power management unit when detecting that the interface is successfully connected to the interface adapter board;
[0016] The power management unit is further configured to determine that the current phase is a test phase upon receiving the test signal.
[0017] In one embodiment, the first switching module includes: a first logic unit and a first switching unit;
[0018] The first logic unit is connected to the power management unit and the microprocessor respectively through the first control loop, the first logic unit is also connected to the interface through the first switching unit, the first switching unit is connected to the microprocessor through the working loop, and the first switching unit is also connected to the test module through the test loop;
[0019] The first logic unit is used to transmit the generated first logic signal to the first switching unit when receiving the first switching signal and the second switching signal, so that the first switching unit disconnects the working loop and connects the test loop.
[0020] In one embodiment, the test module includes: a phase detection unit and a signal processing unit;
[0021] The phase detection unit is connected to the first switching unit through the test loop, and the phase detection unit is also connected to the signal processing unit;
[0022] The phase detection unit is used to determine whether the phase of the collected signal to be tested is a reference phase when the test loop is turned on;
[0023] The phase detection unit is further configured to transmit the signal to be tested to the signal processing unit when the phase of the signal to be tested is the reference phase;
[0024] The signal processing unit is used to decode the signal to be tested, and transmit the decoded signal to be tested to the external testing device through the interface for testing.
[0025] In one embodiment, the test module further includes: an inverting unit;
[0026] The inverting unit is connected to the phase detection unit and the signal processing unit respectively;
[0027] The phase detection unit is further configured to transmit the signal to be tested to the inverting unit when the phase of the signal to be tested is not the reference phase;
[0028] The inverting unit is used to invert the signal to be tested and transmit the inverted signal to be tested to the signal processing unit;
[0029] The signal processing unit is further used to decode the inverted signal to be tested.
[0030] In one embodiment, the circuit further includes: a second switching module:
[0031] The second switching module is connected to the control module via a second control loop, the second switching module is also connected to the control module via the working loop, and the second switching module is also connected to the first switching module and the test module;
[0032] The control module is further configured to transmit the generated third switching signal to the second switching module through the second control loop when detecting that the current phase is the test phase, so that the second switching module disconnects the working loop and conducts with the test module;
[0033] The test module is further configured to transmit the collected signal to be tested to the external test device through the interface for testing when the test module is connected to the second switch module and the test loop between the first switch module is connected.
[0034] In one embodiment, the power management unit and the microprocessor are both connected to the second switching module via the second control loop, and the microprocessor is also connected to the second switching module via the working loop;
[0035] The power management unit is further configured to transmit the generated third switching signal to the second switching module through the second control loop when detecting that the current phase is a test phase;
[0036] The microprocessor is further configured to transmit the generated fourth switching signal to the second switching module through the second control loop when receiving the test instruction sent by the external instruction terminal;
[0037] The second switching module is further configured to disconnect the working loop and conduct with the testing module when receiving the third switching signal and the fourth switching signal.
[0038] In one embodiment, the second switching module includes: a second logic unit and a second switching unit;
[0039] The second logic unit is connected to the power management unit and the microprocessor respectively through the second control loop, the second logic unit is also connected to the second switching unit, the second switching unit is connected to the microprocessor through the working loop, and the second switching unit is also connected to the first switching module and the test module respectively;
[0040] The second logic unit is used to transmit the generated second logic signal to the second switching unit when receiving the third switching signal and the fourth switching signal, so that the second switching unit disconnects the working loop and is connected to the test module.
[0041] In addition, to achieve the above-mentioned purpose, the present application also provides a headset, which includes the test circuit as described above.
[0042] The present application provides a test circuit and a headset, the test circuit comprising: a control module, a first switching module and a test module; the first switching module and the control module are connected through a first control loop and a working loop, the first switching module and the test module are connected through a test loop, and the first switching module is also connected to an external test device through an interface; the control module is used to transmit the generated first switching signal to the first switching module through the first control loop when detecting that the current stage is a test stage, so that the first switching module disconnects the working loop and turns on the test loop; the test module is used to transmit the collected signal to be tested to the external test device through the interface when the test loop is turned on for testing. Since the present application disconnects the working loop connected to the control module through the first switching module and turns on the test loop connected to the test module when testing is required, and then the interface can be connected to the test module through the first switching module, and the test module can transmit the collected signal to be tested to the external test device through the interface for testing, compared with the existing, the present application can directly complete the signal test through the existing interface, thereby realizing the test without adding additional interfaces and without disassembling the machine. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0045] Figure 1 This is a schematic diagram of the structure of the first embodiment of the test circuit of the present application;
[0046] Figure 2 This is a schematic diagram of the structure of the second embodiment of the test circuit of the present application;
[0047] Figure 3 It is a schematic diagram of audio signal waveform;
[0048] Figure 4 This is a schematic diagram of the structure of the third embodiment of the test circuit of the present application;
[0049] Figure 5 This is a flow chart of the normal working stage of the third embodiment of the test circuit of the present application;
[0050] Figure 61 is a flow chart of the test phase of the third embodiment of the test circuit of the present application.
[0051] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0052] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0054] It should be noted that all directional indications in the embodiments of the present application (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0055] In addition, the descriptions of "first", "second", etc. in this application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0056] It is understandable that, at present, in order to reduce the size and weight of the headset and improve the wearing comfort, headphones generally only have one interface for charging and data transmission. In order to implement signal testing on headphones, there are usually two methods. One is to add test points on the internal circuit board of the headset and connect the test points to external test equipment for testing, but it will require disassembly for testing, and the testing process is cumbersome; the other is to set up an additional interface specifically for testing, but it will increase the size and weight of the device.
[0057] Therefore, how to implement testing without adding additional interfaces and without disassembling the machine is an urgent problem to be solved. In order to solve this problem, this embodiment provides a test circuit, which can disconnect the working loop connected to the control module through the first switching module when testing is required, and connect the test loop connected to the test module, and then the interface can be connected to the test module through the first switching module, and the test module can transmit the collected signal to be tested to the external test equipment through the interface for testing. Compared with the existing ones, this embodiment can directly complete the signal test through the existing interface, thereby realizing testing without adding additional interfaces and without disassembling the machine.
[0058] For ease of understanding, the following combination Figures 1 to 6 The test circuit provided in the embodiment of the present application is introduced in detail.
[0059] Reference Figure 1 , Figure 1 The structure diagram of the first embodiment of the test circuit of the present application is provided. Figure 1 As shown, in this embodiment, the circuit includes: a control module, a first switching module and a testing module;
[0060] The first switching module is connected to the control module via a first control loop and a working loop, the first switching module is connected to the test module via a test loop, and the first switching module is also connected to an external test device via an interface.
[0061] It should be understood that, for the convenience of subsequent description, the test circuit in this embodiment can be described using the scenario of audio signal testing of headphones. Of course, it can also be applied to other electronic products that require signal testing, and this embodiment does not limit this.
[0062] Furthermore, the control module may be a module in the headset for performing functions such as data processing and logic control. The first switching module may be provided with a first output terminal and a second output terminal, wherein a working circuit may be connected between the first output terminal of the first switching module and the control module, and the working circuit may be a circuit that puts the headset in a normal working state; under normal use, functions such as data transmission and logic control may be realized through the working circuit, for example, the headset is connected to an external host through an interface, so as to play audio and charge through the headset. A test circuit is connected between the second output terminal of the first switching module and the test module.
[0063] It should also be understood that the external test equipment may be a device for implementing audio signal testing, such as an oscilloscope, a logic analyzer, a multimeter, etc., and this embodiment does not limit this. The interface may be an interface for the headset to originally implement functions such as data transmission and logic control, and may be a Universal Serial Bus (USB) interface, a Type-C interface, etc.
[0064] The control module is configured to transmit the generated first switching signal to the first switching module through the first control loop when detecting that the current phase is the test phase, so that the first switching module disconnects the working loop and connects the test loop;
[0065] The test module is used to transmit the collected signal to be tested to the external test equipment through the interface for testing when the test loop is turned on.
[0066] It should also be noted that the above-mentioned test module can be arranged on the audio signal line in the headphone, and can collect the audio signal transmitted on the audio signal line as the above-mentioned signal to be tested.
[0067] It is understandable that the first switching signal can be a signal in the form of high and low levels. In this embodiment, the high level 1 can be used as the first switching signal. Furthermore, in a specific implementation, when the control module detects that the current stage is a normal working stage, it can output a low level 0 by default and transmit it to the first switching module through the first control loop. The first switching module can keep the test loop disconnected and the working loop turned on, so that the interface can be connected to the first switching module, and the first switching module is then connected to the control module through the working loop, and normal data transmission and logic control functions can be realized through the interface.
[0068] When the control module detects that the current stage is the test stage, the generated high level 1 can be transmitted to the first switching module through the first control loop. The first switching module disconnects the working loop and turns on the test loop, so that the interface can turn on the external test equipment with the first switching module, and the first switching module with the test module. The test module can transmit the collected signal to be tested to the external test equipment through the interface to realize the test of the audio signal.
[0069] To sum up, in this embodiment, when testing is needed, the working circuit connected to the control module can be disconnected by the first switching module, and the test circuit connected to the test module can be turned on, so that the interface can be connected to the test module through the first switching module, and the test module can transmit the collected signal to be tested to the external test equipment through the interface for testing. Compared with the existing ones, this embodiment can not only realize the normal headphone function through the interface, but also complete the signal test directly through the existing interface, thereby realizing testing without adding additional interfaces and without disassembling the machine.
[0070] Furthermore, in order to enter the testing phase only when users have testing needs, continue as follows Figure 1 As shown, in this embodiment, the control module includes: a power management unit and a microprocessor;
[0071] The power management unit and the microprocessor are both connected to the first switching module via the first control loop, the microprocessor is also connected to the first switching module via the working loop, and the interface is also connected to an external instruction terminal.
[0072] It is understandable that the power management unit may be a unit in the headset responsible for power path management, and may be composed of a power management unit (PMU) chip. The microprocessor may be a module in the headset responsible for logic control by the user, and may be composed of a single chip. The external command terminal may be a device for switching the headset to the test phase, and may be located in a communication device (such as a computer, etc.).
[0073] The power management unit is configured to transmit the generated first switching signal to the first switching module through the first control loop when detecting that the current phase is a test phase;
[0074] The microprocessor is configured to transmit the generated second switching signal to the first switching module through the first control loop when receiving the test instruction sent by the external instruction terminal;
[0075] The first switching module is used to disconnect the working loop and connect the test loop when receiving the first switching signal and the second switching signal.
[0076] It should be understood that the first switching module may be provided with a first input terminal (ie Figure 1 A) and the second input terminal (i.e. Figure 1GPIO1 in the middle). Then, in the normal working stage, the power management unit can output a low level 0 by default to the first input terminal of the first switching module through the first control loop. At the same time, since the external instruction terminal does not generate a test instruction at this time, the microprocessor does not generate a signal, and then the first switching module keeps the interface connected to the working loop and keeps the interface disconnected from the test loop.
[0077] When the user needs to perform an audio test, the power management unit can output a high level 1 as the above-mentioned first switching signal and give it to the first input end of the first switching module through the first control loop. At the same time, since the external instruction terminal generates a test instruction, the interface transmits the test instruction through the first switching module and the working loop to the microprocessor. The microprocessor can output a high level 1 as the above-mentioned second switching signal and give it to the second input end of the first switching module through the first control loop. Then, the first switching module simultaneously receives the first switching signal and the second switching signal, thereby disconnecting the interface from the working loop and connecting the interface to the test loop.
[0078] Further, in order to enable the power management unit to determine whether the current stage is a test stage, continue as follows Figure 1 As shown, the interface is connected to the external test equipment and the external command terminal through an interface adapter board;
[0079] The microprocessor is further configured to transmit a generated test signal to the power management unit when detecting that the interface is successfully connected to the interface adapter board;
[0080] The power management unit is further configured to determine that the current phase is a test phase upon receiving the test signal.
[0081] It should be noted that the interface adapter board can be provided with an interface matching the above interface, and can also be provided with an interface for connecting an external command terminal and an external test device, thereby realizing interface switching. At the same time, an identification unit can be provided on the interface adapter board, and the identification unit is used to make the power management unit identify the test stage.
[0082] It is understandable that the above-mentioned microprocessor can be connected to a power management unit ( Figure 1 ). In actual use, when the interface is connected to other devices, since the identification unit is not configured, the microprocessor does not detect the identification unit through the first switching module, and the microprocessor does not generate and transmit a test signal to the power management unit, and the power management unit determines that the current stage is a normal working stage;
[0083] When the interface adapter board with the identification unit is inserted into the interface, the microprocessor detects the insertion of the identification unit through the first switching module, and then generates a test signal to transmit to the power management unit. The power management unit can then determine that the current stage is a test stage.
[0084] When testing is needed, this embodiment can disconnect the working circuit connected to the control module through the first switching module, and connect the test circuit connected to the test module, so that the interface can be connected to the test module through the first switching module, and the test module can transmit the collected signal to be tested to the external test equipment through the interface for testing. Compared with the existing ones, this embodiment can not only realize the normal headphone function through the interface, but also complete the signal test directly through the existing interface, thereby realizing testing without adding additional interfaces and without disassembling the machine.
[0085] Reference Figure 2 , Figure 2 This is a structural diagram of a second embodiment of the test circuit of the present application. Based on the above-mentioned first embodiment, the second embodiment of the test circuit of the present application is proposed.
[0086] In order to make the first switching module disconnect the working circuit and conduct the test circuit only when receiving the first switching signal and the second switching signal, Figure 2 As shown, in this embodiment, the first switching module includes: a first logic unit and a first switching unit;
[0087] The first logic unit is connected to the power management unit and the microprocessor respectively through the first control loop, the first logic unit is also connected to the interface through the first switching unit, the first switching unit is connected to the microprocessor through the working loop, and the first switching unit is also connected to the test module through the test loop.
[0088] It should be noted that the first logic unit may be provided with a first input terminal (ie Figure 2 A) and the second input terminal (i.e. Figure 2 The first logic unit may be composed of an AND gate logic chip (or an equivalent logic circuit), that is, the output terminal is high level 1 only when both input terminals are high level 1.
[0089] It is understandable that the first switching unit may have an input terminal (i.e., a channel selection terminal) and two output terminals, wherein the input terminal is connected to the output terminal of the first logic unit, the first output terminal is connected to the working loop, and the other output terminal is connected to the test loop. The first switching unit may be a unit composed of devices such as a switching switch (or a chip with the same function).
[0090] The first logic unit is used to transmit the generated first logic signal to the first switching unit when receiving the first switching signal and the second switching signal, so that the first switching unit disconnects the working loop and connects the test loop.
[0091] In a specific implementation, when in a normal working stage, since the first input end of the first logic unit is at a low level 0, no matter the second input end is at a high level 1 or a low level 0, the output end of the first logic unit remains at a low level 0, and no first logic signal is transmitted to the first switching unit. When the input end of the first switching unit receives a low level 0, the interface is kept connected to the working circuit, and the interface is disconnected from the test circuit.
[0092] When in the test phase, since the first input end of the first logic unit receives a high level 1, the second input end of the first logic unit also receives a high level 1, and then the output end of the first logic unit outputs a high level 1, which is transmitted to the first switching unit as the above-mentioned first logic signal. The first switching unit then disconnects the interface from the working circuit and connects the interface to the test circuit.
[0093] Furthermore, considering that when performing an audio test, in order to detect whether the phase of the audio signal is consistent, continue as follows Figure 2 As shown, in this embodiment, the test module includes: a phase detection unit and a signal processing unit;
[0094] The phase detection unit is connected to the first switching unit through the test loop, and the phase detection unit is also connected to the signal processing unit.
[0095] It should be noted that the phase detection unit may be arranged on the audio signal line of the headphones to collect the transmitted audio signal as the signal to be tested.
[0096] The phase detection unit is used to determine whether the phase of the collected signal to be tested is a reference phase when the test loop is turned on;
[0097] The phase detection unit is further configured to transmit the signal to be tested to the signal processing unit when the phase of the signal to be tested is the reference phase;
[0098] The signal processing unit is used to decode the signal to be tested, and transmit the decoded signal to be tested to the external testing device through the interface for testing.
[0099] It should be understood that the reference phase may be the phase of a pre-stored reference signal, and in this embodiment, a reference signal may be pre-stored in the phase detection unit. When the phase detection unit detects that the test loop is turned on, an audio signal may be collected, and it may be determined whether the phase of the audio signal is the same as the phase of the reference signal; if they are the same, the audio signal may be transmitted to the signal processing unit.
[0100] The signal processing unit may be a unit that processes (e.g., decodes) the audio signal for subsequent testing, and may be composed of an audio codec. After receiving the audio signal, the signal processing unit may decode it and send the decoded audio signal to an external test device through an interface.
[0101] Further, when the phase of the collected audio signal is not the same as the phase of the reference signal, in order to make them the same, continue as follows Figure 2 As shown, the test module further includes: an inverting unit;
[0102] The inverting unit is connected to the phase detecting unit and the signal processing unit respectively.
[0103] It should be noted that, refer to Figure 3 , Figure 3 is a schematic diagram of the audio signal waveform, such as Figure 3 As shown, if Figure 3 The solid line waveform is the waveform of the reference signal. If the signal to be tested overlaps with the reference signal, it can be determined to be in the same phase as the reference signal. If it is opposite to the reference signal (i.e. Figure 3 The dotted line in the middle), it can be determined that it is not the same as the reference phase.
[0104] The phase detection unit is further configured to transmit the signal to be tested to the inverting unit when the phase of the signal to be tested is not the reference phase;
[0105] The inverting unit is used to invert the signal to be tested and transmit the inverted signal to be tested to the signal processing unit;
[0106] The signal processing unit is further used to decode the inverted signal to be tested.
[0107] It is understandable that the above phase detection unit may be provided with an in-phase output terminal (i.e. Figure 2 N) and the anti-phase output terminal (i.e. Figure 2R in the middle). When the phase of the signal to be tested is the same as the reference phase, the phase detection unit outputs the signal to be tested to the inverting unit through the same phase output terminal, and the inverting unit directly transmits the signal to be tested to the signal processing unit; when the phase of the signal to be tested is different from the reference phase, the phase detection unit outputs the signal to be tested to the inverting unit through the inverting phase output terminal, and the inverting unit first inverts the phase of the signal to be tested, and then transmits the inverted signal to be tested to the signal processing unit, the signal processing unit decodes the inverted signal to be tested, and then transmits it to the external test equipment through the interface.
[0108] In this embodiment, when the phase of the signal to be tested is the reference phase, it can be directly transmitted to the signal processing unit for processing; when it is not the reference phase, it can be inverted and then transmitted to the signal processing unit for processing.
[0109] Reference Figure 4 , Figure 4 This is a structural schematic diagram of a third embodiment of the test circuit of the present application. Based on the above embodiments, the third embodiment of the test circuit of the present application is proposed.
[0110] To ensure that the working circuit is disconnected before testing, Figure 4 As shown, in this embodiment, the circuit further includes: a second switching module:
[0111] The second switching module is connected to the control module via a second control loop, the second switching module is also connected to the control module via the working loop, and the second switching module is also connected to the first switching module and the test module.
[0112] The control module is further configured to transmit the generated third switching signal to the second switching module through the second control loop when detecting that the current phase is the test phase, so that the second switching module disconnects the working loop and conducts with the test module;
[0113] The test module is further configured to transmit the collected signal to be tested to the external test device through the interface for testing when the test module is connected to the second switch module and the test loop between the first switch module is connected.
[0114] In a specific implementation, similar to the first switching module, when in a normal working stage, the control module has no third switching signal transmitted to the second switching module. At this time, the first switching module keeps the interface connected to the second switching module and disconnects the interface from the test module. The second switching module keeps the working loop between the control module connected and disconnects the loop between the test module, thereby realizing normal data transmission and logic control functions through the interface, the first switching module, the second switching module, the working loop and the control module.
[0115] When in the test phase, the control module generates a third switching signal to the second switching module, the second switching module disconnects the working circuit between the control module and connects the circuit between the test module and the test module. Since the first switching module and the second switching module are disconnected at this time, and the first switching module and the test module are connected, the test module can first detect whether the test circuit is connected, and detect whether the circuit between the test module and the second switching module is connected; otherwise, no test is performed. If yes, the collected signal to be tested is transmitted to the external test equipment through the interface for testing.
[0116] Furthermore, since the control module may include a power management unit and a microprocessor, in order to achieve the switching, continue as follows Figure 4 As shown, the power management unit and the microprocessor are both connected to the second switching module through the second control loop, and the microprocessor is also connected to the second switching module through the working loop;
[0117] The power management unit is further configured to transmit the generated third switching signal to the second switching module through the second control loop when detecting that the current phase is a test phase;
[0118] The microprocessor is further configured to transmit the generated fourth switching signal to the second switching module through the second control loop when receiving the test instruction sent by the external instruction terminal;
[0119] The second switching module is further configured to disconnect the working loop and conduct with the testing module when receiving the third switching signal and the fourth switching signal.
[0120] It should be noted that the second switching module may also be provided with a first input terminal (ie Figure 4 B) and the second input terminal (i.e. Figure 4 In GPIO2, the first input terminal and the second input terminal are both connected to the control module through the second control loop, and the second switching module is also connected to the control module through the working loop.
[0121] Furthermore, when in the normal working stage, the power management unit can output a low level by default to the first input end of the second switching module through the second control loop, and at the same time no signal is generated by the microprocessor, so that the first switching module remains connected to the second switching module and disconnected from the test module, and the second switching module remains connected to the microprocessor and disconnected from the test module.
[0122] When in the audio test stage, the power management unit can output a high level 1 as the above-mentioned third switching signal and give it to the first input end of the second switching module through the second control loop. At the same time, the microprocessor can output a high level 1 as the above-mentioned fourth switching signal and give it to the second input end of the second switching module through the second control loop, so that the second switching module disconnects from the microprocessor (that is, disconnects the working loop) and connects to the test module.
[0123] Further, in order to achieve the switching, continue as follows Figure 4 As shown, the second switching module includes: a second logic unit and a second switching unit;
[0124] The second logic unit is connected to the power management unit and the microprocessor respectively through the second control loop, the second logic unit is also connected to the second switching unit, the second switching unit is connected to the microprocessor through the working loop, and the second switching unit is also connected to the first switching module and the test module respectively.
[0125] It is understandable that the second logic unit is consistent with the first logic unit, and the first input terminal (i.e. Figure 4 B) and the second input terminal (i.e. Figure 4 The second logic unit may also be composed of an AND gate logic chip (or an equivalent logic circuit), that is, the output terminal is high level 1 only when both input terminals are high level 1.
[0126] It is also understandable that the second switching unit may have an input terminal (i.e., a channel selection terminal) and two output terminals, wherein the input terminal is connected to the output terminal of the second logic unit, the first output terminal is connected to the microprocessor through a working loop, and the other output terminal is connected to the signal processing unit in the test module. The second switching unit may be a unit composed of devices such as a switching switch (or a chip with the same function).
[0127] The second logic unit is used to transmit the generated second logic signal to the second switching unit when receiving the third switching signal and the fourth switching signal, so that the second switching unit disconnects the working loop and is connected to the test module.
[0128] For ease of understanding, refer to Figure 5 , Figure 5 FIG. 1 is a flow chart of the normal working stage of the third embodiment of the test circuit of the present application. Figure 5 As shown, when in the normal working stage, the power management unit outputs a low level 0 to the first input end of the first logic unit and the second input end of the second logic unit (ie Figure 5The power management unit in the middle outputs a low level 0). At this time, no matter the GPIO1 and GPIO2 of the microprocessor output a high level 1 or a low level 0, the first logic unit and the second logic unit both output a low level 0 (i.e. Figure 5 The first logic unit and the second logic unit output a low level 0), the first switching unit remains connected to the second switching unit, and the test loop between the first switching unit and the phase detection unit is disconnected (i.e. Figure 5 The first switching unit points to the second switching unit, the second switching unit keeps the working loop between the microprocessor connected and disconnects the loop between the signal processing unit (i.e. Figure 5 The second switching unit points to the microprocessor), and the microprocessor now operates normally through the second switching unit, the first switching unit and the interface (ie Figure 5 The microprocessor in the headset controls the normal functions).
[0129] Reference Figure 6 , Figure 6 FIG. 1 is a flow chart of the test phase in the third embodiment of the test circuit of the present application. Figure 6 As shown, when in the test phase, the power management unit transmits the generated high level 1 as the first switching signal to the first input end of the first logic unit through the first control loop, and transmits the generated high level 1 as the third switching signal to the first input end of the second logic unit through the second control loop (i.e. Figure 6 The power management unit in the middle outputs a high level 1), and at the same time the microprocessor receives a test instruction sent by the external instruction terminal, and transmits the generated high level 1 as the second switching signal through the first control loop to the second input end of the first logic unit, and the microprocessor transmits the generated high level 1 as the fourth switching signal through the second control loop to the second input end of the second logic unit (i.e. Figure 6 The microprocessor GPIO1 and GPIO2 are controlled by the external command control terminal to output a high level 1). At this time, the first logic unit outputs a high level 1 and is transmitted to the first switching unit as a first logic signal. The first switching unit disconnects the loop between the first switching unit and the second switching unit, and connects the test loop with the phase detection unit. The second logic unit also outputs a high level 1 as a second logic signal and is transmitted to the second switching unit. The second switching unit disconnects the working loop with the microprocessor and connects the loop with the signal processing unit. Thus, the normal function of the headphones and the test of the audio signal are realized through the multiplexed interface.
[0130] In addition, to achieve the above-mentioned purpose, an embodiment of the present application further provides a headset, wherein the headset includes the test circuit as described above.
[0131] Other embodiments or specific implementations of the headphones of the present application may refer to the embodiments of the above-mentioned test circuits, which will not be described in detail here.
[0132] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A test circuit, characterized in that: The circuit comprises: a control module, a first switching module and a testing module; The first switching module is connected to the control module via a first control loop and a working loop, the first switching module is connected to the test module via a test loop, and the first switching module is also connected to an external test device via an interface; The control module is configured to transmit the generated first switching signal to the first switching module through the first control loop when detecting that the current phase is the test phase, so that the first switching module disconnects the working loop and connects the test loop; The test module is used to transmit the collected signal to be tested to the external test device through the interface for testing when the test loop is turned on; The circuit further includes: a second switching module: The second switching module is connected to the control module via a second control loop, the second switching module is also connected to the control module via the working loop, and the second switching module is also connected to the first switching module and the test module; The control module is further configured to transmit the generated third switching signal to the second switching module through the second control loop when detecting that the current phase is the test phase, so that the second switching module disconnects the working loop and conducts with the test module; The test module is further configured to transmit the collected signal to be tested to the external test device through the interface for testing when the test module is connected to the second switch module and the test loop between the first switch module is connected.
2. The circuit according to claim 1, characterized in that The control module includes: a power management unit and a microprocessor; The power management unit and the microprocessor are both connected to the first switching module via the first control loop, the microprocessor is also connected to the first switching module via the working loop, and the interface is also connected to an external command terminal; The power management unit is configured to transmit the generated first switching signal to the first switching module through the first control loop when detecting that the current phase is a test phase; The microprocessor is configured to transmit the generated second switching signal to the first switching module through the first control loop when receiving the test instruction sent by the external instruction terminal; The first switching module is used to disconnect the working loop and connect the test loop when receiving the first switching signal and the second switching signal.
3. The circuit according to claim 2, characterized in that The interface is connected to the external test equipment and the external command terminal via an interface adapter board; The microprocessor is further configured to transmit a generated test signal to the power management unit when detecting that the interface is successfully connected to the interface adapter board; The power management unit is further configured to determine that the current phase is a test phase upon receiving the test signal.
4. The circuit according to claim 2, characterized in that The first switching module includes: a first logic unit and a first switching unit; The first logic unit is connected to the power management unit and the microprocessor respectively through the first control loop, the first logic unit is also connected to the interface through the first switching unit, the first switching unit is connected to the microprocessor through the working loop, and the first switching unit is also connected to the test module through the test loop; The first logic unit is used to transmit the generated first logic signal to the first switching unit when receiving the first switching signal and the second switching signal, so that the first switching unit disconnects the working loop and connects the test loop.
5. The circuit according to claim 2, characterized in that The test module includes: a phase detection unit and a signal processing unit; The phase detection unit is connected to the first switching unit through the test loop, and the phase detection unit is also connected to the signal processing unit; The phase detection unit is used to determine whether the phase of the collected signal to be tested is a reference phase when the test loop is turned on; The phase detection unit is further configured to transmit the signal to be tested to the signal processing unit when the phase of the signal to be tested is the reference phase; The signal processing unit is used to decode the signal to be tested, and transmit the decoded signal to be tested to the external testing device through the interface for testing.
6. The circuit according to claim 5, characterized in that The test module further includes: an inverting unit; The inverting unit is connected to the phase detection unit and the signal processing unit respectively; The phase detection unit is further configured to transmit the signal to be tested to the inverting unit when the phase of the signal to be tested is not the reference phase; The inverting unit is used to invert the signal to be tested and transmit the inverted signal to be tested to the signal processing unit; The signal processing unit is further used to decode the inverted signal to be tested.
7. The circuit according to any one of claims 2 to 6, characterized in that The power management unit and the microprocessor are both connected to the second switching module via the second control loop, and the microprocessor is also connected to the second switching module via the working loop; The power management unit is further configured to transmit the generated third switching signal to the second switching module through the second control loop when detecting that the current phase is a test phase; The microprocessor is further configured to transmit the generated fourth switching signal to the second switching module through the second control loop when receiving the test instruction sent by the external instruction terminal; The second switching module is further configured to disconnect the working loop and conduct with the testing module when receiving the third switching signal and the fourth switching signal.
8. The circuit according to claim 7, characterized in that The second switching module includes: a second logic unit and a second switching unit; The second logic unit is connected to the power management unit and the microprocessor respectively through the second control loop, the second logic unit is also connected to the second switching unit, the second switching unit is connected to the microprocessor through the working loop, and the second switching unit is also connected to the first switching module and the test module respectively; The second logic unit is used to transmit the generated second logic signal to the second switching unit when receiving the third switching signal and the fourth switching signal, so that the second switching unit disconnects the working loop and is connected to the test module.
9. A headset, characterized in that: The headset comprises a test circuit as claimed in any one of claims 1 to 8.
