Patent Document

RELATED APPLICATIONS 
       [0001]    This application claims priority to Taiwan Application Serial Number 96140132, filed Oct. 25, 2007, which is herein incorporated by reference. 
       FIELD OF THE INVENTION 
       [0002]    The present invention relates to a sensor, and in particular, to an optical sensor and operating method thereof. 
       BACKGROUND OF THE INVENTION 
       [0003]    An optical mouse is an advanced computer pointing device that uses a light-emitting diode (LED), an optical sensor, and digital signal processing (DSP) in place of the traditional mouse ball and electromechanical transducer. The optical mouse detects movements by sensing changes in reflected light, rather than by interpreting the motion of a rolling sphere. 
         [0004]    The optical mouse takes microscopic snapshots of the working surface at a rate of more than 1,000 images per second. Digital signal processing detects changes between one frame and the next and translates these changes into movement on the two axes using an optical flow estimation algorithm. 
         [0005]    However, some surfaces do not allow the sensor and DSP to function properly because the intensity of the reflected light is too low and cannot be detected. In this case, the frame rate of the optical sensor is adjusted to increase the exposure time to compensate for the low intensity reflected light. However, such compensating methods reduce the optical mouse efficiency. 
         [0006]    Therefore, what is needed is a system and method to compensate the low intensity reflected light while meeting the optical mouse efficiency. 
       SUMMARY OF THE INVENTION 
       [0007]    The main purpose of the present invention is to provide an optical sensor and operation method thereof. According to an embodiment, the optical mouse efficiency that can vary the lightness of the light source based on the reflected surface to improve the reflected light. 
         [0008]    In accordance with the foregoing purpose, the present invention discloses an optical sensor. The optical sensor comprises a sensor, an image capture device, a controller and a light source. The sensor senses the reflected light. The image capture device is coupled to the sensor. The image capture device reads the reflected light and calculates the average light intensity of the reflected light. The controller is coupled to the image capture device and outputs a control signal based on the average light intensity. The driver coupled to the controller outputs a drive current based on the control signal received from the controller. The light source coupled to the driver receives the drive current to generate a light. 
         [0009]    In accordance with another embodiment, the present invention discloses a method to adjust the light source in real time based on sensed light intensity. The light source can generate a first light signal. A surface reflects the first light signal thereby generating a second light signal. The method comprises the following steps. First, the second light signal is sensed in a predetermined time period. Next, the second light signal is read to calculate an average light intensity of the second light signal. Then, the average light intensity is compared with a predetermined value. Finally, the second light signal is adjusted to the third light signal when the average light intensity is different from the predetermined value. 
         [0010]    Accordingly, it is not necessary to adjust the frame rate of the optical sensor to compensate the small reflected light. Therefore, the optical mouse efficiency does not be affected. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0011]    The foregoing aspects and many of the attendant advantages of this invention will become more readily appreciated as the same becomes better understood by reference to the following detailed description, when taken in conjunction with the accompanying drawings, wherein: 
           [0012]      FIG. 1  illustrates a schematic diagram of an optical sensor that can adjust the light source intensity based on the surface condition. 
           [0013]      FIG. 2  illustrates a flow chart for adjusting the light source intensity based on the surface condition. 
           [0014]      FIG. 3  illustrates a flow chart for adjusting drive current of the light source based on the surface condition. 
           [0015]      FIG. 4  illustrates an acceptable range of reflected light intensity under a predetermined exposure time. 
       
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
       [0016]      FIG. 1  illustrates a schematic diagram of an optical sensor that can adjust the light source intensity based on the surface condition according to an embodiment of the present invention. The optical sensor  100  comprises a light source  1001 , a light source driver  1002 , a light intensity controller  1003 , an image capture device  1004  and a sensor  1005 . In an embodiment, laser diodes or light emitting diodes can serve as the light source  1001 . 
         [0017]    In an embodiment, the optical sensor is disposed in an optical mouse. 
         [0018]    The light source  1001  generates a light signal  103  when the optical mouse moves on the board  102 . The light signal  103  illuminates the board  102  to enable the detection of any movement of the mouse. The board  102  reflects the light signal  103 . After the sensor  1005  detects the reflected light signal  104 , the reflected light signal  104  moves from the sensor  1005  to the image capture device  1004 . The image capture device  1004  can analyze the reflected light signal  104  to decide if the light intensity from the light source  1001  has reached the predetermined value and transfers the decision to the light intensity controller  1003 . Then, the light intensity controller  1003  can control the light source driver  1002  to modify the drive current sent to the light source  1001  based on the decision. 
         [0019]    In other words, the light intensity of the light source  1001  is adjustable based on the board  102  condition. For example, if the board  102  has a dark surface so that the reflected light signal  104  is weak, the image capture device  1004  can determine the intensity of the reflected light signal  104  does not reach a predetermined value and transfer the determined result to the light intensity controller  1003 . Then, the light intensity controller  1003  can instruct the light source driver  1002  to raise the drive current sent to the light source  1001  to increase the light signal  103 . Therefore, the intensity of the reflected light signal  104  is also increased. In other words, the low reflecting light rate of the dark surface is compensated by increasing the light intensity of the light signal  103 . According to the present invention, it is not necessary for the optical sensor  100  to change its frame rate to get the same exposure time. Therefore, the performance of the optical sensor  100  is kept. 
         [0020]    On the other hand, if the board  102  has a smooth surface so that the reflected light signal  104  is too strong, the image capture device  1004  can decide the intensity of the reflected light signal  104  is over a predetermined value and transfers the decided result to the light intensity controller  1003 . Then, the light intensity controller  1003  can instruct the light source driver  1002  to reduce the drive current sent to the light source  1001  to weaken the light signal  103 . Reducing the drive current weakens the intensity of the reflected light signal  104  and reduces the power consumption of the light source  1001 . In this embodiment, the light source driver  1002  changes the drive current sent to the light source  1001 . However, in other embodiments, the light source driver  1002  modifies the drive current sent to the light source  1001 . 
         [0021]      FIG. 2  illustrates a flow chart for adjusting the light source intensity based on the surface condition. Please refer to  FIG. 1  and  FIG. 2 . In step  201 , the image capture device  1004  analyzes the reflected light signal  104  from the sensor  1005  to determine the value of the light intensity of the reflected light signal  104 . Next, in step  202 , the value of the light intensity of the reflected light signal  104  is compared with a predetermined light intensity standard to decide whether or not the value reaches the standard. When the light intensity reaches the standard, step  203  is performed. In step  203 , the sensor  1005  uses standard exposure time to sense the value of the light intensity. When the light intensity does not reach the standard, step  204  is performed. In step  204 , the light intensity controller  1003  instructs the light source driver  1002  to adjust the drive current sent to the light source  1001 . Then, a secure step  205  ensures the adjusted drive current is in an acceptable drive current range of the light source  1001 . If the adjusted drive current located in the acceptable drive current range, the adjusted drive current will be sent to the light source  1001  to adjust the output light signal  103  and the step  201  is performed again. On the other hand, if the adjusted drive current is over the acceptable drive current range, the adjusted drive current is not sent to the light source  1001  and the step  206  is performed. In step  206 , the frame rate of the sensor  1005  is adjusted to raise or reduce the exposure time. 
         [0022]    On the other hand, a reflected light signal range that permits varying the light source is set to prevent the light source  1001  being adjusted too often as shown in the  FIG. 4 . That is that the drive current is adjusted only when the reflected light signal  104  is over the set reflected light signal range. 
         [0023]    According to the  FIG. 4 , the exposure time is T. The reflected light signal range that the light source  1001  illuminates the same intensity light signal  103  is located between V H  and V L . The maximum value and the minimum value of the reflected light signal are V max  and V min  respectively. In other words, when the change of the reflected light signal is located in the range of between V H  and V L , the light source driver  1002  does not adjust the drive current of the light source  1001 . When the reflected light signal is higher than V H , the light source driver  1002  reduces the drive current to reduce the reflected light signal  104  of the light source  1001  to V H . When the reflected light signal is lower than V L , the light source driver  1002  increases the drive current to increase the reflected light signal  104  of the light source  1001  to V L . 
         [0024]      FIG. 3  illustrates a flow chart for adjusting drive current of the light source based on the surface conditions and the reflected light signal range. In step  301 , the intensity of the reflected light signal  104  is detected by the sensor  1005 . In step  302 , the intensity of the reflected light signal is compared with the V H  to determine whether or not the light signal intensity is larger than V H . When the intensity of the reflected light signal  104  is less than V H , the step  303  is performed. In step  303 , the intensity of the reflected light signal  104  is compared with the V L  to determine whether or not the light signal intensity is less than V L . When the intensity of the reflected light signal  104  is larger than V L  and less than V H , the intensity of the reflected light signal  104  is located in the range. Therefore, the drive current for the light source  1001  remains the same. When the intensity of the reflected light signal  104  is higher than V H , the step  304  is performed. In step  304 , the value of the drive current is compared with the V min  to determine whether or not the current value is equal to the V min . When the current value is not equal to the V min , the step  306  is performed to reduce the drive current to reduce the reflected light signal  104  to V H . On the other hand, when the current value is less or equal to the V min , the reflected light signal  104  can not be further reduced by reducing the drive current. Therefore, the step  301  is performed again. 
         [0025]    When the intensity of the reflected light signal  104  is lower than V L , the step  305  is performed. In step  305 , the value of the drive current is compared with the V max  to determine whether or not the current value is equal to the V max . When the current value is not equal to the V max , the step  307  is performed to increase the drive current to increase the reflected light signal  104  to V L . On the other hand, when the current value is over or equal to the V max , the reflected light signal  104  can not be further increased by increasing the drive current. Therefore, the step  301  is performed again. 
         [0026]    It is noticed that the intensity of the reflected light signal  104  is always changed to V H  or V L  in the above embodiment. However, in other embodiments, the intensity of the reflected light signal  104  can be changed to the location between V H  and V L . 
         [0027]    While the preferred embodiment of the invention has been illustrated and described, it will be appreciated that various changes can be made therein without departing from the spirit and scope of the invention.

Technology Category: 3