Method for driving head light of vehicles

A method for detecting errors in driving device of head light of vehicles utilizes a microprocessor control unit of a main circuit to detect the position of the driving shaft by checking the change of magnetic field or resistance of the driving member and the change of magnetic field or resistance is compared with a pre-set value to decide the position of the driving shaft. The motor is then commanded to drive the driving shaft to the pre-set position. The method detects the position of the head light before the drivers drive the vehicles on the road and if the head light is not in a desired position, the user can adjust the head light position to prevent potential risk on the road.

FIELD OF THE INVENTION

The present invention relates to a method for driving the driving device of head light of vehicles, especially for a method for detecting errors and correcting the positions of the head light to pre-set positions.

BACKGROUND OF THE INVENTION

One of the latest safety devices for vehicles is the Adaptive Front-lighting System (AFS) which allows the head light turns according to needs and the system includes a driving device to turn the head light. A latest driving device known to applicant includes step motor and a sensor connected to the output shaft of the motor, wherein the sensor detects the angle that the output shaft rotates and generates a reference voltage which is compared with a pre-set voltage so as to decide the position of the head light. A control unit is then activate the step motor to rotate the output shaft of the step motor to move the head light to pre-set position. Although errors from the parts or the environment have been considered by the known device, the range of the pre-set voltage does not include method for detecting errors. Therefore, the drivers cannot correct the movement of the head light when errors that are not considered by the device happen. In other words, if the driving device of the head light cannot work functionally and the driving device cannot correct the errors, the drivers take risks to drive.

The present invention intends to provide a method for driving the driving device of the head light and the method provides a detection function to detect errors of the movement of the head light.

SUMMARY OF THE INVENTION

The present invention relates to a method for detecting errors in driving device of head light of vehicles, and the method includes the following steps:

step 1: activating driving device of head light and a main circuit beginning to operate;

step 2: initializing a microprocessor control unit of the main circuit and zeroing the counting condition, the microprocessor control unit detecting parts in the main circuit and making judgement of error;

step 3: judging whether position of driving shaft is detected, if the position of the driving shaft is not detected, a motor being activated to rotate the driving shaft and the counting condition being added by one and stored as record, judging whether the number of the counting condition is over three, if the number of the counting condition is less than three, repeat step 3, if the number is over three, an error judgement is made and the main circuit is stopped;

step 4: the microprocessor control unit obtaining pre-set position and recording the position, the microprocessor control unit obtaining current position of the driving shaft, the pre-set position and the current position being compared, if the result of comparison is different, the motor driving the driving shaft to the pre-set position;

step 5: judging whether the driving shaft is returned to the pre-set position, if the driving shaft is not returned to the pre-set position, the counting condition is added by one and stored as record, judging whether the number of the counting condition is over pre-set times, if the number of the counting condition is less than the pre-set times, repeat steps 3 to 5, if the number is over the pre-set times, an error judgement is made and the main circuit is stopped;

step 6: judging whether the revolution of the motor is in a range of restriction, if the revolution of the motor exceeds the range of restriction, the counting condition is added by one and stored as record, judging whether the number of counting condition is over five, if the number is less than five, repeat steps 2 to 5, if the number is over the pre-set times, an error judgement is made and the main circuit is stopped, and

step 7: when completing steps 1 to 6, a driving module of the driving device is set and the driving device is ready to active, the driving device is ready to accept commands from the microprocessor control unit, the main circuit is stopped.

The primary object of the present invention is to provide a method to detect the current position of the head light and the method is able to judge the status of the head light during driving.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

Referring toFIGS. 1 to 3, the driving device for head light of the present invention comprises a box1, a motor2, a reduction device3, a driving member4, a circuit board5and a driving shaft6. The box1includes a base11and a top board12, wherein the base11has a first hole111through which the output shaft21of the motor2extends and a second hole112through which the driving shaft6extends. The reduction device3, the driving member4and the circuit board5are received between the top board12and the base11.

The output shaft21has a gear22which is engaged with one of the gears of the reduction device3and the motor2is connected to an underside of the base11. Therefore, when the output shaft21rotates, the reduction device3is activated.

The driving member4has a fan-shaped rack41which is engaged with the reduction device3so that the driving member4is driven by the reduction device3when the motor2is activated. A magnet with N pole and S pole is received in one end of the driving member4and faces the circuit board5. The other end of the driving member4is connected with the extension61of the driving shaft6. The circuit board5has a microprocessor control unit (MCU) and a detection circuit composed of a sensor which is located corresponding to the magnet42so that when the driving member4rotates, the sensor51senses the change of magnetic field and generates a reference number which is sent to the MCU.

When in assembling, the extension61of the driving shaft6extends through the second hole112and is connected to the second end of the driving member4. The reduction device3is then installed in the base11and engaged with the gear22on the output shaft21of the motor2and the rack41of the driving member4. The circuit board5is installed to the bas11and the top board12is then mounted to the base11.

The driving shaft6is connected to the head light (not shown) and when the driving member4rotates, the sensor of the detection circuit senses the change of magnetic field due to the movement of the magnet42in the driving member4. The change generates a reference number and sent to the MCU to judge the current position of the driving shaft6. The current position is compared with a pre-set position, if the two positions are different, the motor2drives the reduction device3to rotate the driving shaft6to the pre-set position.

FIG. 4shows another embodiment of the driving device, wherein the driving member7has a fan-shaped rack71which is engaged with the reduction device3. A hole72is defined in an end of the driving member7and faces the circuit board5. The other end of the driving member7is connected to the driving shaft6. The circuit board5has a detection circuit composed of a variable resistance8which is engaged with the hole72of the driving member7.

When the driving member7rotates an angle, the variable resistance changes its resistance value so as to generate a voltage value by which the current position of the driving shaft6is detected. The current position is compared with a pre-set position, if the two positions are different, the motor2drives the reduction device3to rotate the driving shaft6to the pre-set position.

As shown inFIG. 5, which discloses the flow chart of the main circuit of the circuit board5and includes the following steps.

step10shows that after the driving device of head light is activated, the main circuit begins to operate. The step11shows that the microprocessor control unit of the main circuit is initialized and the counting condition is zeroed. The microprocessor control unit also detects parts in the main circuit and making judgement of error.

Step12judges the current position of the driving shaft6, if the current position of the driving shaft6cannot be detected, step18is activated to activate the motor2and the counting condition is added by one and stored as record. In the step18, judging whether the number of the counting condition is over three which is pre-set, if the number of the counting condition is less than three, the step12is repeated, if the number is over three, an error judgement as disclosed in step21is made and process step17to stop the main circuit. If the current position is detected, then the step13is processed.

During the step13, the microprocessor control unit obtains the pre-set position and records the position. The pre-set position and the current position obtained in step12are compared with each other, if the result of comparison is different, the motor2drives the driving shaft6to the pre-set position. If the two positions are the same, then the step14is processed.

Step14is to judge whether the driving shaft6is returned to the pre-set position, if the driving shaft6is not returned to the pre-set position, the counting condition is added by one and stored as record as disclosed in step20. Step18is activated to judge whether the number of the counting condition is over pre-set times which is three, if the number of the counting condition is less than the pre-set times, repeat steps12to14. If the number is over the pre-set times and the driving shaft6is not returned to its pre-set position, an error judgement is made as disclosed in step21and the main circuit is stopped as disclosed in step17. On the contrary, if the driving shaft16is returned to its pre-set position by the judgement in step14, then step15is processed.

Step15is to judge whether the number of the revolution, the operation time or the electric current passing through of the motor is in a range of restriction. If the factor that mentioned above of the motor exceeds the range of restriction, the counting condition is added by one and stored as record as disclosed in step20. The step18judges whether the number of counting condition is over three, if the number is less than three, then repeat steps12to15, if the number is over three, an error judgement is made by step21and the step17cuts off the main circuit. On the contrary, if the step15judges that the number of the counting condition is not exceeded, the process step16.

When processing the step16, the driving module of the driving device is set and the driving device is ready to active. The driving device is ready to accept commands from the microprocessor control unit and the step17cuts off the main circuit.

As shown inFIG. 6, there are three ways to detect the current position of the driving shaft6, the first way is to use the detection circuit composed of the sensor51on the circuit board5as shown inFIG. 2to detect the current position of the driving shaft6.

When processing the step12to obtain the current position of the driving shaft6, the step121is processed in the same to zero the counting condition and the step1211is also processed.

In step1211, the sensor51detects a change of magnetic field of a magnet42in a driving member4so as to obtain a conference number which is sent to the MCU and transferred into a position reference number. After the step1211is completed, the step1212is processed wherein the transferred position reference number is compared with pre-set position reference number to judge if a result of the comparison exceeds a pre-set range of the position reference number. If the result of comparison is within the range of the pre-set position reference number, the current position of the driving shaft6is obtained by the step1213and the step1214eliminates the processes for obtaining the current position and the main circuit process in step13as shown inFIG. 5starts. On the contrary, if the result of comparison is not located within the range of the pre-set position reference number, an error judgement is made by the step1215and the step1214eliminates the processes for obtaining the current position and the main circuit process in step19as shown inFIG. 5starts.

As shown inFIG. 7, the second way for obtaining the current position of the driving shaft6uses a detection circuit composed of a sensor51of the circuit board5as shown inFIG. 2and a quadrature A/B circuit. The quadrature circuit generates a pulse “A” and a pulse “B” with a phase angle difference, if the pulse “A” leads a phase angle 90 degrees from the pulse “B”, the a first pre-set process is processed. If the pulse “B” leads a phase angle 90 degrees from the pulse “A”, a second pre-set process is processed.

When processing the step12to obtain the current position of the driving shaft6, the step122is processed in the same to zero the counting condition and the step1221is also processed.

The step1221judges whether the driving shaft6is returned to its pre-set position which is the original position, if the driving shaft6did not returned to the pre-set position in the record of the MCU, step1223is activated to activate the motor2to drive the driving shaft6back to its original position. This is recorded in the MCU and step1222begins to process. On the contrary, if the driving shaft6has been returned to the original position, then the step1222is processed.

In the step1222, the angular movement of the magnet42results in a change of magnetic field and the change generates a reference number which is sent to the quadrature circuit to generate the pulses “A” and “B” with a phase difference. The signal is sent to the MCU which transfers the signal into position reference number and the position reference number is recorded.

When the step1222is completed, the step1224is activated and the transferred position reference number is compared with pre-set position reference number to judge if a result of the comparison exceeds a pre-set range of the position reference number. The range is composed of different position references numbers collected by the angular movements of the magnet42. Each angular movement generates a change of magnetic field which is transferred to the MCU and transferred to different positioning reference numbers. If the result of comparison is within the range of the pre-set position reference number, the current position of the driving shaft is obtained by the step1226. The step1227eliminates the processes for obtaining the current position and the main circuit process in step13as shown inFIG. 5starts. On the contrary, if the result of comparison is not located within the range of the pre-set position reference number, an error judgement is made by the step1225for the obtaining current position of the driving shaft. The step1227eliminates the processes for obtaining the current position and the main circuit process in step19as shown inFIG. 5starts.

As shown inFIG. 8, the third way to obtain the current position of the driving shaft6uses a detection circuit composed of a variable resistance8on the circuit board5as shown inFIG. 4to detect the current position of the driving shaft6.

When processing the step12to obtain the current position of the driving shaft6, the step123is processed in the same to zero the counting condition and the step1231is also processed.

When processing the step1231, the MCU obtains the reference voltage which comes from the change of the resistance of the variable resistance8when the driving member7rotates.

After the reference voltage is obtained in step1231, step1232is processed and the reference voltage is compared with pre-set voltage to judge if a result of the comparison exceeds a pre-set range of the voltage, if the result of comparison is within the range of the pre-set voltage, the current position of the driving shaft6is obtained, and the step1235eliminates the process for obtaining the current position and the main circuit process as disclosed in step13as shown inFIG. 5begins. If the result of comparison is not located within the range of the pre-set voltage, an error judgement is made for the current position of the driving shaft6by step1234and the step1235eliminates the process for obtaining the current position and the main circuit process as disclosed in step13as shown inFIG. 5begins.

The method for returning the driving shaft6back to its pre-set position in step13as disclosed inFIG. 5is described hereinafter.

As shown inFIG. 9, after the main circuit process obtains the current position of the driving shaft6in step12, the step130is activated to activate the motor2to drive the driving shaft6back to its pre-set position.

Then the step131begins to obtain a pre-set position from the MCU and records the pre-set position, the counting condition is zeroed.

Then the step132records the current position of the driving shaft6and the current position can be obtained by the methods mentioned above.

Then the step133, the current position and the pre-set position are compared, if the two positions are not the same, the motor2is activated one more action or the motor reduces one action. In other words, the motor2rotates an angle clockwise or counter clockwise to drive the driving shaft6.

Then the step134, the MCU records the operation time of the motor2.

Then the step135compares the operation time of the motor2recorded in step134and the pre-set period of time of the operation of the motor2, if the actual operation time is longer than the pre-set period of time of the motor2, the step138judges that the motor2operates too long and the step139stops the operation of the motor2. The main circuit process in step14as shown inFIG. 5starts. On the contrary, if the actual operation time is shorter than the pre-set period of time of the motor2, the step136judges that the driving shaft6is in its pre-set position. If the driving shaft6has not yet arrived its pre-set position, then steps132to136are repeated to drive the motor2. If the driving shaft6has arrived its pre-set position, then step137judges that the action is completed and the step139stops the motor2and the main circuit process in step14as shown inFIG. 5starts.

The present invention provides thee ways to detect the current position of the driving shaft so that the users have different options to detect the driving shaft. After the driving device is activated, the users know that the status of the driving device, if an error is detected, the users can correct it before driving on the roads.