[summary of the invention]
The present invention has overcome the deficiency of above-mentioned technology, provides a kind of and can judge that left and right loudspeaker connect instead, judges the signal of loudspeaker output and the polarity testing device of horns of the phase difference between the standard signal exactly.
For achieving the above object, the present invention has adopted following technical proposal:
A kind of polarity testing device of horns, it includes
Single-chip microcomputer produces square-wave signal output;
The L channel output control circuit, to delivering to tested left horn after the square-wave signal arrangement, left horn causes the vibration of diaphragm under this signal effect, form the acoustic matrix signal;
Left side microphone becomes sine wave signal with the sound conversion of signals of shaking;
Left side microphone forward voltage amplifying circuit, offset of sinusoidal ripple signal carries out voltage amplification;
Left side power amplification circuit, the signal that left microphone forward voltage amplifying circuit is exported carries out the electric current amplification;
Left side zero passage comparison circuit, sine wave signal to left power amplification circuit output carries out the positive-negative half-cycle separation, form the two-way square-wave signal and input to single-chip microcomputer, whether described single-chip microcomputer is with two-way square wave and the inner square wave that produces relatively and judge this tested loudspeaker polarity and connect instead;
The R channel output control circuit, to delivering to tested right horn after the arrangement of single-chip microcomputer generation square-wave signal, right horn causes the vibration of diaphragm under this signal effect, form the acoustic matrix signal;
Right microphone becomes sine wave signal with the sound conversion of signals of shaking;
Right microphone forward voltage amplifying circuit, offset of sinusoidal ripple signal carries out voltage amplification;
Right power amplification circuit, the signal that right microphone forward voltage amplifying circuit is exported carries out the electric current amplification;
Right zero passage comparison circuit, sine wave signal to right power amplification circuit output carries out the positive-negative half-cycle separation, form the two-way square-wave signal and input to single-chip microcomputer, whether described single-chip microcomputer is with two-way square wave and the inner square wave that produces relatively and judge this tested loudspeaker polarity and connect instead;
Warning circuit connects anti-and left horn and right horn connect anti-the warning to left and right loudspeaker polarity.
Compared with prior art, the invention has the beneficial effects as follows:
1, the left and right loudspeaker when earphone connect inverse time, go to detect with this device, with the L channel output control circuit in this device to the anodal input signal of left horn, if the right microphone of this device detects voice signal, this device just judges that left and right loudspeaker connect instead, therefore, removes to detect mass-produced earphone product with this device, whether have left and right loudspeaker connect anti-problem, to improve the outgoing of earphone if can detect earphone easily.
2, this device can be judged the voice signal of loudspeaker output and the phase difference between the standard signal exactly.
3, this device has warning circuit, can make corresponding warning to the testing result of loudspeaker in time, deals with in time with the testing staff of announcement.
[embodiment]
Be described in further detail below in conjunction with accompanying drawing and embodiments of the present invention:
Referring to Fig. 2-5, the present invention introduces a kind of polarity testing device of horns, and it includes: single-chip microcomputer 1, L channel output control circuit 2, left microphone 3, left microphone forward voltage amplifying circuit 4, left side power amplification circuit 5, left zero passage comparison circuit 6, R channel output control circuit 7, right microphone 8, right microphone forward voltage amplifying circuit 9, right power amplification circuit 10, right zero passage comparison circuit 11, warning circuit, Keyboard Control/function conversion circuit 13, power circuit 14.
The model of described single-
chip microcomputer 1 is ATmega8, and it can produce the 1st square-wave signal among Fig. 4 that frequency is 1KZ (can certainly be other frequency), is reference square wave with this square-wave signal, and other signal and this signal compare.This reference square wave passes through pin
Export to L channel
output control circuit 2, pass through pin
Export to R channel output control circuit 7.Single-
chip microcomputer 1 also can receive through left zero passage comparison circuit 6 or right zero passage comparison circuit 11 and handle two-way that the back forms such as the 3rd and the 4th square-wave signal among Fig. 4, this two-way square wave while and reference square wave signal is relatively obtained the phase difference square wave of the 5th of Fig. 4.
Deliver to tested left horn after 2 pairs of square-wave signal arrangements of L channel output control circuit, L channel
output control circuit 2 includes resistance R 1029, R1050, R1030, R1052, switch S 1000, S1001, S1002, capacitor C 1006, C1002 and triode U1009.Described resistance R 1,029 one ends are connected the back as L channel
output control circuit 2 inputs and single-
chip microcomputer 1 pin with capacitor C 1,006 one ends
Connect, resistance R 1029 other end ground connection, capacitor C 1006 other ends are connected respectively with the end of resistance R 1050, R1030, R1052, the other end of resistance R 1050, R1030, R1052 all is connected with switch S 1000, S1001, S1002, the other end of switch S 1000, S1001, S1002 all is connected with an end and the triode U1009 base stage of capacitor C 1002, the other end ground connection of capacitor C 1002, the grounded emitter of triode U1009.When detecting loudspeaker, the left horn negative pole of earphone can be connected with the collector electrode of triode U1009, the left horn positive pole of earphone is connected with power supply VCC.Left horn causes the vibration (positive pole causes that diaphragm outwards vibrates, and negative pole causes that diaphragm is to internal vibration) of diaphragm under this square-wave signal effect, form the acoustic matrix signal.
The acoustic matrix signal that left side microphone 3 typings should tested left horn be exported, and convert sine wave signal to and be defeated by left microphone forward voltage amplifying circuit 4.
Left side microphone forward voltage amplifying circuit 4 offset of sinusoidal ripple signals carry out voltage amplification; Left side microphone forward voltage amplifying circuit 4 includes resistance R 1000, R1002, R1004, R1006, capacitor C 1000, C1004, C1008, C1009, C1012, and comparator U1000A.Resistance R 1000, input as this circuit after one end of resistance R 1002 and capacitor C 1000 links together is connected with left microphone 3, the other end of resistance R 1000 and capacitor C 1,004 one ends are connected with+5V power supply, capacitor C 1004 other end ground connection, the other end of resistance R 1002 is connected with comparator U1000A inverting input by capacitor C 1008, the other end ground connection of capacitor C 1000, comparator U1000A in-phase input end connects+the 5V power supply by capacitor C 1012, comparator U1000A output is successively by capacitor C 1009, resistance R 1004 ground connection, contact between capacitor C 1009 and the resistance R 1004 is connected with contact between resistance R 1002 and the capacitor C 1008, resistance R 1,006 one ends are connected with comparator U1000A inverting input, and resistance R 1006 other ends are connected with comparator U1000A output.
The signal of 5 pairs of left microphone forward voltage amplifying circuit 4 outputs of left side power amplification circuit carries out electric current and amplifies; Left side power amplification circuit 5 includes resistance R 1008, R1010, R1012, R1014, R1016, R1018, capacitor C 1016, C1018, C1019, C1013 and comparator U1000B.The in-phase input end of described comparator U1000B is connected with+5V power supply by resistance R 1012, be connected with comparator U1000A in-phase input end simultaneously, the inverting input of comparator U1000B is successively by capacitor C 1018, resistance R 1008, capacitor C 1016 is connected with comparator U1000A output, resistance R 1,010 one ends be connected with capacitor C 1,019 one ends the back with capacitor C 1018 and resistance R 1008 between contact be connected, resistance R 1010 other end ground connection, capacitor C 1019 other ends are connected the back and are connected with comparator U1000B output with resistance R 1,018 one ends, resistance R 1018 other end ground connection, resistance R 1,014 one ends are connected the back and are connected with comparator U1000B in-phase input end with capacitor C 1,013 one ends, resistance R 1014 other ends and capacitor C 1013 other ends are ground connection all, resistance R 1,016 one ends are connected with the inverting input of comparator U1000B, and resistance R 1016 other ends are connected with comparator U1000B output.Referring to Fig. 4, the sine wave among the figure is by the microphone typing, forms through comparator U1000A, twice amplification of U1000B, and through the processing of circuit in the loudspeaker, sine wave signal is compared with square-wave signal and moved an angle after phase place has taken place.After move that to reach 180 be that the polarity of loudspeaker connects anti-when spending.
The sine wave signal of 6 pairs of left power amplification circuit 5 outputs of left side zero passage comparison circuit carries out positive-negative half-cycle separation formation two-way square-wave signal and inputs to single-chip microcomputer 1.Described left zero passage comparison circuit 6 includes resistance R 1020, R1022, R1023, R1024, R1034, R1035, R1036, R1037, R1038, R1039, R1044, zero-crossing comparator U1001A, U1001B.Described resistance R 1,020 one ends are connected with comparator U1000B output, and resistance R 1020 other ends are connected with the inverting input of zero-crossing comparator U1001A by resistance R 1037, are connected with the in-phase input end of zero-crossing comparator U1001B by resistance R 1036 simultaneously; The in-phase input end of zero-crossing comparator U1001A all is connected with resistance R 1,034 one ends with resistance R 1,022 one ends, resistance R 1022 another termination+5V power supplys, resistance R 1034 other end ground connection, the output of zero-crossing comparator U1001A all is connected with resistance R 1,038 one ends with resistance R 1,023 one ends, resistance R 1023 other end ground connection, resistance R 1038 other end PC
0As isolated positive half cycle square wave output, the pin of this output and single-
chip microcomputer 1
Connect.The inverting input of zero-crossing comparator U1001B all is connected with resistance R 1,044 one ends with resistance R 1,035 one ends, resistance R 1044 another termination+5V power supplys, resistance R 1035 other end ground connection; The output of zero-crossing comparator U1001B all is connected with resistance R 1,039 one ends with resistance R 1,024 one ends, resistance R 1024 other end ground connection, resistance R 1039 other end PC
1As isolated negative half period square wave output, the pin of this output and single-
chip microcomputer 1
Connect.The comparator U1001A of left side zero passage comparison circuit 6 converts the sine wave of positive half period among Fig. 4 first comparison square wave (i.e. the 3rd signal graph), is defeated by the pin of single-
chip microcomputer 1 then
The comparator U1001B of left side zero passage comparison circuit 6 converts the sine wave of negative half-cycle among Fig. 4 second comparison square wave (i.e. the 4th signal graph), is defeated by the pin of single-
chip microcomputer 1 then
Deliver to right tested loudspeaker after 7 pairs of square-wave signal arrangements of R channel output control circuit, this circuit includes resistance R 1031, R1051, R1032, R1053, switch S 1003, S1004, S1005, capacitor C 1007, C1003 and triode U1010.The circuit connection structure of this circuit is identical with L channel output control circuit 2, referring to Fig. 2, is not described in detail at this.When detecting loudspeaker, the right horn negative pole of earphone can be connected with the collector electrode of triode U1010, the right horn positive pole of earphone is connected with power supply VCC.Right horn causes the vibration (positive pole causes that diaphragm outwards vibrates, and negative pole causes that diaphragm is to internal vibration) of diaphragm under this square-wave signal effect, form the acoustic matrix signal.
The acoustic matrix signal that right microphone 8 typings should tested right horn be exported, and convert sine wave to and be defeated by right microphone forward voltage amplifying circuit 9.
Right microphone forward voltage amplifying circuit 9 offset of sinusoidal ripple signals carry out voltage amplification, right microphone forward voltage amplifying circuit 9 includes resistance R 1001, R1003, R1005, R1007, capacitor C 1001, C1005, C1010, C1011, C1014, and comparator U1002A.Input as this circuit after one end of resistance R 1001, resistance R 1003 and capacitor C 1001 links together is connected with right microphone.This circuit has identical circuit connection structure with left microphone forward voltage amplifying circuit 4, referring to Fig. 2, is not described in detail at this.
The signal of 10 pairs of right microphone forward voltage amplifying circuit 9 outputs of right power amplification circuit carries out electric current and amplifies, right power amplification circuit 10 includes resistance R 1009, R1011, R1013, R1015, R1017, R1019, capacitor C 1017, C1020, C1021, C1015 and comparator U1002B.The circuit connection structure of this circuit is identical with left power amplification circuit, syndeton between this circuit and the right microphone forward voltage amplifying circuit is identical with syndeton between left power amplification circuit and the microphone forward voltage amplifying circuit, is not described in detail at this.Right power amplification circuit 10 produces as the sine wave among Fig. 4.
The sine wave signal of 11 pairs of right
power amplification circuit 10 outputs of right zero passage comparison circuit carries out positive-negative half-cycle separation formation two-way square-wave signal and inputs to single-
chip microcomputer 1, right zero passage comparison circuit 11 includes resistance R 1021, R1022, R1025, R1026, R1034, R1035, R1040, R1041, R1042, R1043, R1044, zero-crossing comparator U1003A, U1003B.Described resistance R 1,021 one ends are connected with comparator U1002B output, and resistance R 1021 other ends are connected with the inverting input of zero-crossing comparator U1003A by resistance R 1040, are connected with the in-phase input end of zero-crossing comparator U1003B by resistance R1041 simultaneously; The in-phase input end of zero-crossing comparator U1003A all is connected with resistance R 1,034 one ends with resistance R 1,022 one ends, resistance R 1022 another termination+5V power supplys, resistance R 1034 other end ground connection, the output of zero-crossing comparator U1003A all is connected with resistance R 1,042 one ends with resistance R 1,025 one ends, resistance R 1025 other end ground connection, resistance R 1042 other end PC
2As isolated positive half cycle square wave output, the pin of this output and single-
chip microcomputer 1
Connect.The inverting input of zero-crossing comparator U1003B all is connected with resistance R 1,044 one ends with resistance R 1,035 one ends, resistance R 1044 another termination+5V power supplys, resistance R 1035 other end ground connection; The output of zero-crossing comparator U1003B all is connected with resistance R 1,043 one ends with resistance R 1,026 one ends, resistance R 1026 other end ground connection,
resistance R 1043 other end PC
3As isolated negative half period square wave output, the pin of this output and single-
chip microcomputer 1
Connect.Zero-crossing comparator U1003B can produce the 3rd square wave among Fig. 4, and zero-crossing comparator U1003B can produce the 4th square wave among Fig. 4.
Described warning circuit connects anti-to left and right loudspeaker polarity and left horn and right horn connect anti-the warning.Described warning circuit includes LED warning circuit 15 and sound warning circuit 16.LED warning circuit 15 includes four light-emitting diode D1004, D1005, D1006, D1007, and wherein light-emitting diode D1004, D1006 can glow, and light-emitting diode D1005, D1007 can green light; The positive pole of light-emitting diode D1004, D1005, D1006, D1007 respectively the pin by resistance R 1045, R1046, R1047, R1048 and single-chip microcomputer 1 2., 3., 4., 5. be connected, the negative pole of light-emitting diode D1004, D1005, D1006, D1007 is distinguished ground connection.
Audible alarm circuit 16 includes buzzer SPK1000 and triode U1008, the input termination power VCC of buzzer SPK1000, the other end is connected with the collector electrode of triode U1008, the grounded emitter of triode U1008, the base stage of triode U1008 is by the pin of resistance R 1049 with single-chip microcomputer 1
Connect.When a left side or R channel polarity do not connect inverse time, light-emitting diode D1005 or D1007 carry out the green light indication, and buzzer sends " dripping " simultaneously; If the polarity of a left side or R channel connects inverse time, light-emitting diode D1004 or D1006 glow to glimmer and indicate, and buzzer sends long sound simultaneously, leaves microphone up to tested loudspeaker, the detected blackout of microphone.If left and right sound channels connects instead, light-emitting diode D1004 or D1006 glow simultaneously to glimmer and indicate, and buzzer sends long sound simultaneously.
Keyboard Control/function conversion circuit 13 includes two hilted broadsword lists and puts switch S 1006, S1007, and wherein switch S 1006 is a list/dual track change over switch, one end ground connection, the pin of the other end and resistance R 1,033 one ends and single-
chip microcomputer 1
All connect, resistance R 1033 other ends are connected with power supply VCC; When cut-off switch S1006, this device is a dual track, and promptly left and right sound channels can detect respectively; When Closing Switch S1006, this device is a monophony, and promptly left and right sound channels can only detect simultaneously.Switch S 1007 for just/the negative polarity change over switch, switch S 1,007 one end and power grounds, the pin of the other end and resistance R 1,028 one ends and single-
chip microcomputer 1
All connect, resistance R 1028 other ends are connected with power supply VCC, and so-called positive polarity is exactly that polarity connection with loudspeaker just correctly is being judged as, and the polarity of loudspeaker is connect the anti-negative mode that is judged as, and are exactly the type of alarm of foregoing description.And negative polarity is just opposite with positivity, the polarity connection of loudspeaker correctly is judged as negative, and the polarity of loudspeaker is connect the anti-positive mode that is judged as, this kind mode, when a left side or R channel polarity connect inverse time, light-emitting diode D1005 or D1007 carry out the green light indication, and buzzer sends " dripping " simultaneously; If the polarity of a left side or R channel does not connect inverse time, light-emitting diode D1004 or D1006 glow to glimmer and indicate, and buzzer sends long sound simultaneously, leaves microphone up to tested loudspeaker, the detected blackout of microphone.If left and right sound channels connects instead, light-emitting diode D1004 and D1006 glow simultaneously to glimmer and indicate, and buzzer sends long sound simultaneously.
Power circuit 14 is commonplace circuit, here is not described in detail.
Introduce the operation principle of this device below in detail:
1, the loudspeaker polarity of dual track detects
Switch S 1006 is disconnected, make this device be in the dual track working method, switch S 1007 is disconnected, make this device be in the positive polarity judgment mode.Left horn negative pole with earphone is connected with the collector electrode of the triode U1009 of L channel then, be connected with power supply VCC the left horn of earphone is anodal, and with the close left microphone of left horn; The right horn negative pole of earphone is connected with the collector electrode of the triode U1010 of R channel, is connected with power supply VCC the right horn of earphone is anodal, and with the close right microphone of right horn.Detect earlier left horn, single-
chip microcomputer 1 produces among Fig. 4 that frequency is 1KZ the 1st square-wave signal, and determines that this signal is a reference signal, and this square-wave signal is by pin
U1009 passes to left horn by triode, this moment, triode U1010 quit work, be that single-chip microcomputer is not carried square-wave signal to right horn, left horn produces voice output after receiving square-wave signal, left side microphone detects sine wave signal from left horn, through comparator U1000A, the 2nd sine wave signal among the back formation of amplification successively Fig. 4 of U1000B, zero-crossing comparator U1001A converts the positive half cycle of sine wave signal in the square wave " 1 " signal, convert the negative half period of sine wave signal in the square wave " 0 " signal, thereby form the 3rd square-wave signal among Fig. 4; Zero-crossing comparator U1001B converts the negative half period of sine wave signal in the square wave " 1 " signal, converts the positive half cycle of sine wave signal in the square wave " 0 " signal, thereby forms the 4th square-wave signal among Fig. 4; The pin of single-
chip microcomputer 1
Difference typing two-way square-wave signal, single-
chip microcomputer 1 compares two-way square-wave signal and reference square wave signal, and mode relatively is: at one time, when reference square wave was " 1 ", the 3rd square wave should be " 1 ", and the 4th square wave should be " 0 "; When reference square wave was " 0 ", the 3rd square wave should be " 0 ", and the 4th square wave should be " 1 ".Just formed the 5th signal graph according to above-mentioned standard of comparison, on behalf of loudspeaker, dash area just the phase range of quality problems occurs when output sound among this figure, so this device can accurately be judged the error phase of loudspeaker when transaudient, dash area does not cover whole the 5th square wave, and tested loudspeaker connect anti-problem with regard to polarity not occurring.If at one time, when reference square wave is " 1 ", the 3rd square wave is " 0 ", the 4th square wave is " 1 ", when reference square wave is " 0 ", the 3rd square wave is " 1 ", the 4th square wave be " 0, referring to Fig. 5; make that the 3rd square wave is opposite fully with reference square wave; when the 4th square wave and reference square wave were identical, dash area covered whole the 5th square wave, and tested loudspeaker connect anti-problem with regard to polarity occurring; single-chip microcomputer is judged this loudspeaker polarity and connect instead; light-emitting diode D1004 glows, and buzzer sends long sound simultaneously, since the polarity of expression left horn connect instead; Otherwise, light-emitting diode D1005 green light, simultaneously buzzer sends " dripping " sound, since represent that the polarity of left horn does not connect instead.And then the detection right horn, it is the same with left horn to detect principle, in this few description.
2, the left and right sides loudspeaker of dual track connect the reverse-examination survey
Switch S 1006 is disconnected, make this device be in the dual track working method, switch S 1007 is disconnected, make this device be in the positive polarity judgment mode.Left horn negative pole with earphone is connected with the collector electrode of the triode U1009 of L channel then, be connected with power supply VCC the left horn of earphone is anodal, and with the close left microphone of left horn; The right horn negative pole of earphone is connected with the collector electrode of the triode U1010 of R channel, is connected with power supply VCC the right horn of earphone is anodal, and with the close right microphone of right horn.The square-wave signal that single-chip microcomputer is produced sends left horn to by the L channel output control circuit, if right microphone can detect signal, and left microphone detects less than signal, single-chip microcomputer just judges that left and right loudspeaker connect instead, be exactly that left and right acoustic channels connects instead, light-emitting diode D1004 and D1006 glow simultaneously to glimmer and indicate, and buzzer sends long sound simultaneously, connects instead to represent left and right loudspeaker.
3, monaural loudspeaker polarity detects
If the loudspeaker that detect are single loudspeaker, with switch S 1006 closures, make this device be in the mono-operation mode, switch S 1007 is disconnected, make this device be in the positive polarity judgment mode.Then the collector electrode of single loudspeaker negative pole with the triode U1009 (or triode U1010) of L channel (or R channel) is connected, the loudspeaker positive pole is connected with power supply VCC, and with the close left microphone (right microphone) of loudspeaker; The detection principle of loudspeaker of principle of polarity and dual track that detects single loudspeaker is identical, in this few description.