The control method of the digital controller of automobile wiper motor
Technical field
The present invention relates to a kind of control method of windshield wiper motor.
Background technology
The windshield wiper of cleaning vehicle panes is provided the power of motion by general electrical motor for scraping rain, rotating speed when mostly controlling the stopping of electrical motor for scraping rain, motion, quiescent interval and motion by the machinery of forming by combined switch, timer chip and relay etc., thus realize the cleaning of windshield wiper, scrape water at a high speed, low speed is scraped water and scraped functions such as water intermittence.Have following problem in the control method now: reliability is low, accuracy is not high, problems such as there was a mechanical failure easily.
Summary of the invention
The reliability that exists in the existing control method is low, accuracy is not high in order to solve, problems such as there was a mechanical failure easily, and a kind of control method of digital controller of automobile wiper motor is provided.
The digital controller of automobile wiper motor comprises combined switch K, and it also comprises on off state identification chip 1, microcontroller 2 and motor drive ic 3; Each level state output pin of combined switch K is connected on the input end of on off state identification chip 1, the two-way communication ports of on off state identification chip 1 is connected on the two-way communication ports of microcontroller 2, two output terminals of microcontroller 2 connect two input ends of motor drive ic 3, two output terminals of motor drive ic 3 connect two input ends of electrical motor for scraping rain M respectively, the motor playback signal output part of the turbine switch 4 on the electrical motor for scraping rain M connects the signal input part of microcontroller 2 respectively, and the every rotation one-period of electrical motor for scraping rain M is got back to position of rest and all passed through turbine switch 4 to a playback of microcontroller 2 outputs signal.
Described method is finished by the following step:
Step 1: chip initiation;
Step 2: on off state identification chip 1 is encoded according to the height of the level of each output pin of combined switch K, and exports to microcontroller 2;
Step 3: the coding of microcontroller 2 read switch state chips 1;
Step 4: microcontroller 2 is according to the gear of the coding schedule judgement combined switch K of inner setting, and microcontroller 2 distinguishes whether be to cut out gear; Not, execution in step five; Be execution in step nine;
Step 5: microcontroller 2 is according to the gear of the coding schedule judgement combined switch K of inner setting, and microcontroller 2 distinguishes whether be the gear at intermittence; Not, execution in step six; Be execution in step seven;
Step 6: microcontroller 2 sends the corresponding action order according to the different gears of combined switch K by the program of establishment in advance, and action command is sent in the motor drive ic 3; Execution in step eight;
Step 7: by the counter in the microcontroller 2 output combined switch K intermittence gear action command, this action command sends in the motor drive ic 3; Execution in step eight;
Step 8: motor drive ic 3 drives the corresponding gear coil of electrical motor for scraping rain M and turns round;
Step 9: microcontroller 2 judges whether the playback signal is low level signal; Not, execution in step ten; Be; Execution in step 11;
Step 10: the playback signal is a high level signal, then keeps the former gear running of electrical motor for scraping rain M, when the playback signal is jumped to low level down; Execution in step 11;
Step 11: microcontroller 2 order motor drive ics 3 stop the power supply to electrical motor for scraping rain M, and electrical motor for scraping rain M stops on the position of rest of turbine switch 4.
The present invention directly drives electrical motor for scraping rain M by digital chip for driving, on chip programming more accurately and reliably, and adopt programmed counting to set intermittently time slot, degree of accuracy is than the traditional approach height, the quiescent interval of electrical motor for scraping rain M defines by program, thereby make realization more flexible, and be greatly improved on the also more traditional control method of its degree of accuracy.
Description of drawings
Fig. 1 is the structural representation of the digital controller of car electrical motor for scraping rain; Fig. 2 is the synoptic diagram of turbine switch 4; Fig. 3 is the process flow diagram of control method of the digital controller of car electrical motor for scraping rain.
Embodiment
Embodiment one: in conjunction with Fig. 1, Fig. 2, Fig. 3 present embodiment is described, the digital controller of the automobile wiper motor in the present embodiment comprises combined switch K, and it also comprises on off state identification chip 1, microcontroller 2 and motor drive ic 3; Each level state output pin of combined switch K is connected on the input end of on off state identification chip 1, the two-way communication ports of on off state identification chip 1 is connected on the two-way communication ports of microcontroller 2, two output terminals of microcontroller 2 connect two input ends of motor drive ic 3, two output terminals of motor drive ic 3 connect two input ends of electrical motor for scraping rain M respectively, the motor playback signal output part of the turbine switch 4 on the electrical motor for scraping rain M connects the signal input part of microcontroller 2 respectively, and the every rotation one-period of electrical motor for scraping rain M is got back to position of rest and all passed through turbine switch 4 to a playback of microcontroller 2 outputs signal.
Described method is finished by the following step:
Step 1: chip initiation;
Step 2: on off state identification chip 1 is encoded according to the height of the level of each output pin of combined switch K, and exports to microcontroller 2;
Step 3: the coding of microcontroller 2 read switch state chips 1;
Step 4: microcontroller 2 is according to the gear of the coding schedule judgement combined switch K of inner setting, and microcontroller 2 distinguishes whether be to cut out gear; Not, execution in step five; Be execution in step nine;
Step 5: microcontroller 2 is according to the gear of the coding schedule judgement combined switch K of inner setting, and microcontroller 2 distinguishes whether be the gear at intermittence; Not, execution in step six; Be execution in step seven;
Step 6: microcontroller 2 sends the corresponding action order according to the different gears of combined switch K by the program of establishment in advance, and action command is sent in the motor drive ic 3; Execution in step eight;
Step 7: by the counter in the microcontroller 2 output combined switch K intermittence gear action command, this action command sends in the motor drive ic 3; Execution in step eight;
Step 8: motor drive ic 3 drives the corresponding gear coil of electrical motor for scraping rain M and turns round;
Step 9: microcontroller 2 judges whether the playback signal is low level signal; Not, execution in step ten; Be execution in step 11;
Step 10: the playback signal is a high level signal, then keeps the former gear running of electrical motor for scraping rain M, when the playback signal is jumped to low level down; Execution in step 11;
Step 11: microcontroller 2 order motor drive ics 3 stop the power supply to electrical motor for scraping rain M, and electrical motor for scraping rain M stops on the position of rest of turbine switch 4.
May occur motor inertia when closing electrical motor for scraping rain M and cause electrical motor for scraping rain M to turn over stop position, allow electrical motor for scraping rain M to rotate through a little angle this moment, promptly when the playback signal uprises owing to inertia, refuses fill order.
Microcontroller 2 is just controlled corresponding gear action command by the level of controlling high low speed coil I/O mouth.