Background technology
According to the knowledge of the applicant, the searching technique for fixing of current mobility car natural frequency of electric horn still is in the stage of manual shift natural frequency of electric horn, and its technology is summarised as follows:
1) adopts multivibrator control electric horn technology.Its RC multivibrator that utilizes Resistor-Capacitor Unit to constitute produces the RC vibration, determine the output frequency of this multivibrator by the capacity of the resistance of resistance R and capacitor C, the resistance by the manual shift resistance R and the capacity of capacitor C are regulated the output frequency of this multivibrator.
2) adopt Single-chip Controlling electric horn technology.Existing has two kinds, a kind of be with crystal oscillator as signal source, make the single-chip microcomputer output frequency adapt to natural frequency of electric horn by single-chip microcomputer being write distinct program.Another kind be with RC vibration as single-chip microcomputer external clock signal, the capacity of resistance and capacitor C by the manual shift resistance R, thus make the single-chip microcomputer output frequency adapt to the electronic horn natural frequency.
3) adopt sensor to add control circuit control electric horn technology.Utilize sensors such as Hall, light idol to substitute the contact, the sensitive time of manual shift Hall and light coupling device spare adapts to natural frequency of electric horn.
More than several control modes to electric horn, all being based upon manual shift controller output frequency adapts on the basis of natural frequency of electric horn, fail to realize the natural frequency of electric horn of motor vehicle fixing robotization of searching automatically, more can not accurately measure natural frequency of electric horn of motor vehicle, be difficult to simplify the production technology of motor vehicle electronic loudspeaker.
Summary of the invention
The objective of the invention is,, realize that automatic searching of natural frequency of electric horn fixed, propose method for automatically searching and fixing natural frequency of electric horn of motor vehicle in order to overcome above-mentioned the deficiencies in the prior art.
Technical solution of the present invention is, adopt with the crystal oscillator be the single-chip microcomputer of clock as the control core, the frequency finder is gone in programming in single-chip microcomputer; By single-chip microcomputer running frequency finder, the control wave that the single-chip microcomputer output duty cycle is 1/3, every 1/4Hz order frequency increments or order frequency are successively decreased is by the fet power pipe of this pulse signal controlling and driving electric horn coil; Single-chip microcomputer in the 650Hz frequency band, is selected frequency according to the control wave that every 1/4Hz increases progressively in proper order or order is successively decreased at 240Hz; Utilize the A/D translation function of single-chip microcomputer, by the pin with A/D translation function of single-chip microcomputer each increase progressively or the frequency that successively decreases on, the tube voltage drop of the fet power pipe of control electric horn coil is sampled; And with the voltage drop value input single-chip microcomputer that samples, algorithm routine by single-chip microcomputer calculates the induction reactance of controlled electric horn, choose the induction reactance value of the controlled electric horn frequency when maximum, design feature according to controlled electric horn, determine the frequency values of this frequency or natural frequency value or the natural period value that periodic quantity is controlled electric horn, deposit this value in single-chip microcomputer.
It is characterized in that, the natural frequency value of controlled electric horn or the periodic quantity of natural frequency are stored among the EEPROM or FLASH of single-chip microcomputer inside.
It is characterized in that, the natural frequency value of controlled electric horn or the periodic quantity of natural frequency are stored among the EEPROM or FLASH of the outside expansion of single-chip microcomputer.
Thereby searching is fixing automatically to realize natural frequency of electric horn of motor vehicle.
Advantage of the present invention is that novel, method is effective, and is simple and easy to do.Realized the fixing robotization of searching automatically of motor vehicle electronic natural frequency of electric horn.Make the measurement of motor vehicle electronic natural frequency of electric horn more accurate.Simplified the production technology of motor vehicle electronic electric horn.
Embodiment
As Fig. 1, Fig. 2, shown in Figure 3, in using embodiments of the invention, anti-reverse unit 2 is made of diode D1, damages the circuit elements device when preventing the circuit reversal connection.Voltage regulation unit 3 is made of voltage stabilizing diode D2, resistance R 1 and capacitor C 2.Single-chip microcomputer 5 is made up of integrated chip PIC12F675, crystal oscillator Y1 and reset circuit.Power amplification unit 4 is made of fet power pipe Q1.Voltage acquisition unit 6 is made of the A/D modular converter of resistance and single-chip microcomputer 5.When the horn of motor vehicle button was pressed, power supply 1 was connected, because anti-reverse unit 2 and voltage regulation unit 3 and power supply 1 connect, the The whole control circuit carries out anti-reverse protection by anti-reverse unit 2.The solenoid of power amplification unit 4 and loudspeaker 7 connects, single-chip microcomputer 5 when energising output duty cycle be the control square wave of 1/3 increasing or decreasing frequency, controlling filed effect power tube Q1, fet power pipe Q1 drives the solenoid of loudspeaker 7.With the voltage acquisition unit 6 that power amplification 4, single-chip microcomputer 5 connect, the tube voltage drop of on the frequency of each increasing or decreasing frequency, gathering the fet power pipe Q1 of power amplification 4, and with the voltage drop value input single-chip microcomputer 5 that samples.The voltage drop value that samples is calculated the induction reactance of controlled electric horn by the single-chip microcomputer algorithm routine, choose the induction reactance value of the controlled electric horn frequency when maximum, according to this electric horn design feature, determine the frequency values of this frequency or natural frequency value or the natural period value that periodic quantity is controlled electric horn.The periodic quantity of this controlled natural frequency of electric horn value or natural frequency of electric horn is deposited in the data-carrier store of single-chip microcomputer 5.When frequency sweeping finishes, the periodic quantity of the natural frequency of electric horn value obtained or natural frequency is write among the EEPROM of single-chip microcomputer 5 inside or the FLASH and stored, perhaps the periodic quantity of the natural frequency of electric horn value obtained or natural frequency is write among the EEPROM of single-chip microcomputer 5 outside expansions or the FLASH and stored.
Single-chip microcomputer 5 is selected the core devices of PIC12F675 model single-chip microcomputer as control in an embodiment of the present invention for use, selecting IRF540 for use is power amplification unit 4, PIC12F675 model single-chip microcomputer includes A/D converter module, EEPROM, the drain electrode of IRF540 fet power pipe, source electrode also are connected to parasitic Zener diode, the back-emf of the horn coil of can effectively releasing.As Fig. 2, capacitor C 1 is connected between VDD and the GND, improves the Electro Magnetic Compatibility of entire circuit.The D1 positive pole meets VDD, and an end of negative pole connecting resistance R1 and horn coil makes horn coil and control circuit be subjected to the anti-reverse protection of D1.Resistance R 1 one termination D1 negative poles, an end voltage stabilizing diode D2 negative pole.The positive pole of voltage stabilizing diode D2 meets GND.Capacitor C 2 one termination D2 negative poles, an end D2 anode.1 pin that connects end and single-chip microcomputer altogether of resistance R 2, voltage stabilizing diode D2, capacitor C 2 and resistance R 1 joins.Resistance R 1, voltage stabilizing diode D2, the capacitor C 2 common stabilized voltage supplys that constitute single-chip microcomputer.1 pin of resistance R 2 one termination single-chip microcomputers, the other end of resistance R 2 connects 4 pin of single-chip microcomputer 5, makes single-chip microcomputer 5 active homings.8 pin of single-chip microcomputer 5 meet GND.1 pin of crystal oscillator Y1 connects 2 pin of single- chip microcomputer 5, and 2 pin of crystal oscillator Y1 connect 3 pin of single- chip microcomputer 5,2 pin of capacitor C 3 one termination single-chip microcomputers 5, capacitor C 3 other end GND, 3 pin of capacitor C 4 one termination single-chip microcomputers 5, capacitor C 4 other end GND, crystal oscillator Y1, capacitor C 3 and capacitor C 4 are formed the external clock of single-chip microcomputer 5.7 pin of resistance R 3 one termination single-chip microcomputers 5, the drain electrode of resistance R 3 another termination fet power pipe Q1 makes single-chip microcomputer 5 gather fet power pipe Q1 tube voltage drop by resistance R 3.The source electrode of Q1 meets GND.The negative pole of loudspeaker LS1 (horn coil) termination D1, the drain electrode of another termination fet power pipe of loudspeaker LS1 Q1, the grid of fet power pipe Q1 connects 5 pin of single- chip microcomputer 5, and 6 pin of single-chip microcomputer 5 are unsettled.
The first course of work of entire circuit is as follows:
1) during circuit energized 1, crystal oscillator Y1 starting of oscillation, single-chip microcomputer 5 resets.
2) single-chip microcomputer 5 operation initialize routines.
3) whether single-chip microcomputer 5 operation natural frequencys scan determining program, the searching fixation mark of inquiry loudspeaker natural frequency in EEPROM.
4) whether single-chip microcomputer 5 operation loudspeaker natural frequency scannings fix determining program, and whether the searching fixation mark of inquiry loudspeaker natural frequency in EEPROM or FLASH is carried out natural frequency scanning to electric horn and fixedly judged.
5) single-chip microcomputer 5 operation natural frequency scanning sequences, the control square wave that 5 pin of single-chip microcomputer 5 are exported 1/3 dutycycle, the every 1/4HZ of frequency increases progressively in proper order or order is successively decreased, the break-make of controlling filed effect power tube Q1, single-chip microcomputer 5 is gathered fet power pipe tube voltage drop by resistance R 3 and single-chip microcomputer 5 inner A/D converter modules on the frequency of each increasing or decreasing frequency, and with the voltage drop value input single-chip microcomputer 5 that samples.
A) 5 pairs of voltage drop values that sample of single-chip microcomputer calculate loudspeaker induction reactance by the algorithm routine of single-chip microcomputer 5, choose the induction reactance value of the controlled electric horn frequency when maximum, according to this controlled electric horn design feature, determine the frequency values of this frequency or natural frequency value or the natural period value that periodic quantity is tested electric horn.
B) periodic quantity of tested natural frequency of electric horn value or natural frequency of electric horn is deposited in the data-carrier store of single-chip microcomputer 5.
6) when frequency sweeping finishes, the periodic quantity of natural frequency of electric horn value or natural frequency is write among the EEPROM of single-chip microcomputer 5 inside or the FLASH and stored, perhaps the periodic quantity of natural frequency of electric horn value or natural frequency is write among single-chip microcomputer 5 outside EEPROM that expand or the FLASH and stored, the searching of mark loudspeaker natural frequency fixedly finishes in EEPROM or FLASH simultaneously.
The entire circuit course of normal operation is as follows:
1) during circuit energized 1, crystal oscillator Y1 starting of oscillation, single-chip microcomputer 5 resets.
2) single-chip microcomputer 5 operation initialize routines.
3) whether single-chip microcomputer 5 operation natural frequencys scan determining program, and whether the searching fixation mark of inquiry loudspeaker natural frequency in EEPROM or FLASH is carried out natural frequency scanning to electric horn and fixedly judged.
4) scanning of loudspeaker natural frequency fixedly finishes.
5) periodic quantity of natural frequency of electric horn value or natural frequency among single-chip microcomputer extraction EEPROM or the FLASH.
6) periodic quantity of single-chip microcomputer operation natural frequency of electric horn value or natural frequency.
7) control circuit output natural frequency of electric horn control signal.
8) field effect transistor rhythm with natural frequency of electric horn under the control of natural frequency of electric horn control signal drives horn coil.
9) electric horn is promptly rung on natural frequency.