Input device having optical axis module and control method thereof
By introducing a control unit into the optical axis module, the duration of the light generation unit is dynamically updated, and the problems of slow detection speed and power consumption of traditional optical axis keyboards are solved, and more efficient optical axis module operation is achieved.
Patent Information
- Application Number
- CN202311514864.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-14
- Publication Date
- 2025-05-16
AI Technical Summary
Traditional optical axis keyboards have slow detection speed and power consumption problems due to their fixed duration.
By introducing a control unit into the optical axis module, the duration of the light generation unit is dynamically updated by using the high and low potential state conversion time of the detection signal to optimize the working time of the optical axis module.
It effectively shortens the start time of the light generation unit, reduces the energy consumption of the input device, and improves the overall detection speed.
Smart Images

Figure CN120017031A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an input device, and more particularly to an input device with an optical axis module and a control method thereof. Background Art
[0002] Optical switch is a micro switch technology born from traditional mechanical keyboards. It uses light-emitting diodes and optical sensing elements to replace the metal domes in the traditional mechanical switch structure, and uses the principle of light sensing to form two states: open circuit and pass circuit, thereby triggering key signals. Optical switch keyboards have the advantages of strong anti-interference ability, stable operation, and long service life.
[0003] Since it takes a while for the optical sensor to receive the light from the LED before the state changes, the traditional optical axis keyboard sets a fixed duration for the LED to ensure that the optical axis keyboard can correctly judge the user's pressing action. This duration is usually much longer than the time required for the optical sensor to actually change its state. Limited by this fixed duration, the traditional optical axis keyboard has the problems of slow detection speed and power consumption. Summary of the invention
[0004] The present invention provides an input device. The input device includes an optical axis module and a control unit. The optical axis module includes a light generating unit and a light receiving unit. The light generating unit is suitable for receiving a start signal and generating light according to the start signal. The light receiving unit is suitable for receiving light to generate a detection signal. The control unit is electrically coupled to the light generating unit and the light receiving unit, and is suitable for generating a start signal and reading the detection signal. The start signal corresponds to a duration. The control unit records a conversion time when the detection signal generates a high-low potential state conversion, and updates the duration according to the conversion time.
[0005] The present case also provides a control method for an input device. The input device has an optical axis module and a control unit, wherein the optical axis module includes a light generating unit and a light receiving unit, wherein the light generating unit is suitable for receiving an on-state signal and generating light according to the on-state signal, and the light receiving unit is suitable for receiving light to generate a detection signal, and the control unit is electrically coupled to the light generating unit and the light receiving unit, and is suitable for generating an on-state signal and reading the detection signal, and storing a duration corresponding to the on-state signal. The control method includes: the control unit generates an on-state signal; the control unit continuously reads the detection signal; the control unit determines whether the detection signal generates a high-low potential state transition within the duration; if the detection signal generates a high-low potential state transition within the duration, the control unit records a transition time when the detection signal generates a high-low potential state transition, and updates the duration according to the transition time; and if the detection signal does not generate a high-low potential state transition within the duration, the control unit maintains the original duration.
[0006] The present case provides another input device. This input device includes multiple optical axis modules, multiple scanning lines, multiple reading lines and a control unit. Multiple optical axis modules constitute an optical axis module array, and each optical axis module includes a light generating unit and a light receiving unit. The light generating unit is suitable for receiving an activation signal and generating light according to the activation signal. The light receiving unit is suitable for receiving light to generate a detection signal. Each scanning line is connected to the light generating unit in the same row of the optical axis module array, and each scanning line has an input end. Each reading line is connected to the light receiving unit in the same column of the optical axis module array, and each reading line has an output end. The control unit is electrically coupled to these input ends and these output ends, and is suitable for generating an activation signal at these input ends and reading the detection signal from these output ends. The activation signal corresponds to a duration. The control unit records a conversion time when the detection signal generates a high-low potential state conversion, and updates the duration according to the conversion time.
[0007] The input device and optical axis control method provided in this case can effectively shorten the startup time of the light generating unit, reduce the energy consumption of the input device, and also help to improve the overall detection speed of the input device. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 is a circuit block diagram of an electronic device with multiple antennas according to an embodiment of the present invention.
[0009] Figure 2 is a flow chart of an embodiment of an antenna configuration method according to the present invention.
[0010] Figure 1 is a schematic diagram of an input device provided according to an embodiment of the present invention;
[0011] Figure 2 show Figure 1 The operation of the input device with a key pressed;
[0012] Figure 3 is corresponding to Figure 2 Signal waveform diagram;
[0013] Figure 4 show Figure 1 The operation of the input device without any key presses;
[0014] Figure 5 is corresponding to Figure 4 Signal waveform diagram;
[0015] Figure 6 is a flow chart of a control method of an input device provided according to an embodiment of the present invention;
[0016] Figure 7 yes Figure 1 An operation flow chart of the control unit; and
[0017] Figure 8 is a schematic diagram of an input device provided according to another embodiment of the present invention. DETAILED DESCRIPTION
[0018] The specific implementation of the present invention will be described in more detail below in conjunction with the schematic diagram. The advantages and features of the present invention will become clearer according to the following description and the scope of the claims. It should be noted that the drawings are all in a very simplified form and are not in exact proportions, and are only used to facilitate and clearly assist in explaining the purpose of the embodiments of the present invention.
[0019] Figure 1 1 is a schematic diagram of an input device provided according to an embodiment of the present invention. The input device 10 may be a keyboard, a mouse, etc.
[0020] As shown in the figure, the input device 10 includes an optical axis module 12 and a control unit 14 .
[0021] The optical axis module 12 includes a light generating unit IR and a light receiving unit PT. The light generating unit IR is adapted to receive a start signal S1 and generate light according to the start signal S1. The light receiving unit PT is adapted to receive light from the light generating unit IR to generate a detection signal S2.
[0022] In one embodiment, the light generating unit IR may be a light emitting diode (diode), and the light receiving unit PT may be a phototransistor (phototransistor). The light generating unit IR and the light receiving unit PT are powered by a power supply voltage VCC of the input device 10. In one embodiment, the optical axis module 12 is designed as a normally open axis, that is, when the key is pressed, the light will be shielded, and if it is not pressed, the light will not be shielded. However, it is not limited to this. In other embodiments, the optical axis module 12 may also be designed as a normally closed axis, that is, when the key is pressed, the light will not be shielded, and if it is pressed, the light will be shielded. In one embodiment, the detection signal S2 may be a potential signal corresponding to the high voltage end of the light receiving unit PT. When the light receiving unit PT is not irradiated by light, the detection signal S2 will be maintained in a high potential state. When the light receiving unit PT is irradiated by light and becomes conductive, the detection signal S2 will be correspondingly converted to a low potential state.
[0023] The control unit 14 is electrically coupled to the light generating unit IR and the light receiving unit PT to generate the start signal S1 and read the detection signal S2. The start signal S1 is set to have a duration T0. The control unit 14 continuously reads the detection signal S2 within the duration T0. The duration T0 can be adjusted or updated by the control unit 14. In one embodiment, the duration T0 is usually more than twice the conversion time required for the light receiving unit PT to actually complete the state conversion, so as to avoid misjudgment.
[0024] In one embodiment, the control unit 14 reads the detection signal S2 once every time interval within the duration T0. In one embodiment, the time interval is 1 us, so as to quickly determine the state transition of the light receiving unit PT. However, the present invention is not limited thereto.
[0025] In one embodiment, the control unit 14 is a microcontroller (MCU), which has a storage unit 142 inside for storing and updating the duration T0. The control unit 14 has a plurality of general purpose input and output terminals (GPIO) P3 and P4 respectively electrically coupled to the light generating unit IR and the light receiving unit PT, for outputting the start signal S1, and reading the detection signal S2 through the signal reading terminal P2. It is worth noting that the data stored in the storage unit 142 will be reset after the input device 10 is powered off, and the preset value will be restored.
[0026] In one embodiment, the universal input / output terminal P4 (suitable for reading the detection signal S2 ) of the control unit 14 is set with an input high potential VIH and an input low potential VIL to determine the high or low potential state of the detection signal S2 .
[0027] The voltage levels of the input high-state potential VIH and the input low-state potential VIL can be set according to the working voltage VDD of the control unit 14. For example, the voltage levels of the input high-state potential VIH and the input low-state potential VIL can be set to 70% and 30% of the working voltage VDD, respectively. If the working voltage VDD of the control unit 14 is 3V, the high-state voltage level VIH can be set to 2.1V, and the low-state voltage level VIL can be set to 0.9V. In this case, if the voltage level of the detection signal S2 exceeds 2.1V, it will be determined as a high-potential state, and if the voltage level of the detection signal S2 is lower than 0.9V, it will be determined as a low-potential state.
[0028] Figure 2 show Figure 1 The input device 10 operates when a key is pressed. Figure 3 is corresponding to Figure 2 Signal waveform diagram.
[0029] like Figure 2 and Figure 3As shown, if the detection signal S2 read by the universal input and output terminal P4 of the control unit 14 does not switch between high and low potential states during the process of the light generating unit IR generating light (that is, within the duration T0 of the start signal S1), for example, the detection signal S2 remains in a high potential state. This means that the key corresponding to the optical axis module 12 is pressed and blocks the light path between the light generating unit IR and the light receiving unit PT. At this time, the control unit 14 will determine that the user has pressed the input action.
[0030] Figure 4 show Figure 1 The input device 10 operates without any key being pressed. Figure 5 is corresponding to Figure 4 Signal waveform diagram.
[0031] like Figure 4 and Figure 5 As shown, if during the process of the light generating unit IR generating light (that is, within the duration T0 of the turn-on signal S1), the detection signal S2 read by the universal input and output terminal P4 of the control unit 14 undergoes a transition between a high potential state and a low potential state, for example, the detection signal S2 transitions from a high potential state to a low potential state, this indicates that the button corresponding to the optical axis module SW is not pressed, and the light generated by the light generating unit IR can be smoothly projected to the light receiving unit PT.
[0032] The control unit 14 records a conversion time T1 when reading the detection signal S2 to switch between high and low potential states. This conversion time T1 can be understood as the reaction time of the light receiving unit PT, that is, the time required for the light receiving unit PT to change state when the light generating unit IR is used as the light source. The conversion time T1 is the time from the start of the light generating unit IR to the reading of the detection signal S2 in the low potential state. The conversion time T1 is usually shorter than the duration T0 originally set by the control unit 14 when it leaves the factory. The control unit 14 uses this conversion time T1 to adjust or update the duration T0 originally recorded in the control unit 14.
[0033] In one embodiment, in order to avoid misjudgment, the control unit 14 adds a buffer time Tb to the detected transition time T1 as an update time T0' to update the original duration T0. The buffer time Tb is usually less than the detected transition time T1. In one embodiment, the length of the buffer time Tb is between 3us and 7us. In one embodiment, the buffer time Tb can be set to 5us.
[0034] In one embodiment, the control unit 14 is provided with a maximum opening time Tmax. When the update time T0' exceeds the maximum opening time Tmax, the control unit 14 sets the duration T0 to the maximum opening time Tmax. In one embodiment, the maximum opening time Tmax may be a factory setting value of the duration T0.
[0035] Through the above-mentioned operation, the control unit 14 can use the actually detected conversion time T1 to update the original duration T0 at the factory (or the duration T0 calculated by the previous operation), which is beneficial to shorten the startup time of the light generating unit IR, reduce the energy consumption of the input device 10, and also help to improve the overall detection speed of the input device 10.
[0036] Figure 6 is a flow chart of a control method of an input device 10 provided according to an embodiment of the present invention. This control method is applicable to Figure 1 The input device 10 is shown. The control method comprises the following steps.
[0037] First, as described in step S620 , the control unit 14 generates an on signal S1 . The on signal S1 is used to activate the light generating unit IR, and the on signal S1 corresponds to a duration T0 , which is recorded in the control unit 14 .
[0038] Then, as described in step S640, the control unit 14 continuously reads the detection signal S2. Specifically, the control unit 14 continuously reads the detection signal S2 from the light receiving unit PT during the duration T0 of the start signal S1, that is, during the period when the light generating unit IR generates light.
[0039] Next, as described in the determination step S650, it is determined whether the detection signal S2 generates a high-low potential state transition within the duration T0. Specifically, the original state of the light receiving unit PT without light is an open circuit state, and the detection signal S2 will be in a high potential state. After the light receiving unit PT receives light, it will be converted to a pass state, and the detection signal S2 will be converted to a low potential state. In this case, step S650 can be understood as determining whether the detection signal S2 in the low potential state is detected within the duration T0.
[0040] Then, as described in step S660, if the detection signal S2 generates a high-low potential state transition within the duration T0, the control unit 14 records a transition time T1 when the detection signal generates a high-low potential state transition, and updates the duration T0 according to the transition time T1. Specifically, the control unit 14 can add a buffer time Tb to the transition time T1 as an update time T0' to update the original duration T0.
[0041] As described in step S670, if the detection signal S2 does not generate a high-low potential state transition within the duration T0, the control unit 14 maintains the original duration T0. This situation usually occurs when the user presses a button.
[0042] Figure 7 yes Figure 1 Operation flow chart of the control unit 14.
[0043] First, as described in step S720, a start signal S1 is generated to activate the light generating unit IR.
[0044] Then, as described in step S730 , the detection signal S2 is read.
[0045] Next, as described in the determination step S740, it is determined whether the detection signal S2 is in a low potential state. When the light receiving unit PT is not illuminated, the detection signal S2 will remain in a high potential state, and after being illuminated, the detection signal S2 will be converted to a low potential state.
[0046] If the detection signal S2 is low, the process proceeds to step S750 to record a transition time T1 and update the duration T0 according to the transition time T1. Then, as described in step S770, the light generating unit IR is turned off to end the operation and wait for the next generation of the start signal S1.
[0047] If the detection signal S2 is not in a low state, for example, in a high state or between a high state and a low state, the process proceeds to step S760 to determine whether a timeout has occurred. In one embodiment, this step is to determine whether the time from the start of the light generating unit IR in step S720 to the determination step S740 plus a buffer time Tb exceeds the maximum opening time Tmax.
[0048] If the time has not expired, the process returns to step S730 to repeatedly read the detection signal S2 for determination. The control unit 14 reads the detection signal S2 once every time interval. In one embodiment, the time interval is 1 us.
[0049] If the timeout occurs, the process proceeds to step S770 to turn off the light generating unit IR, and the current operation process ends. It is worth noting that when the timeout occurs in step S760, the control unit 14 does not change the duration T0 originally set for the light generating unit IR, but directly proceeds to step S770 to turn off the light generating unit IR.
[0050] Figure 8 FIG. 8 is a schematic diagram of an input device 80 provided according to another embodiment of the present invention. The input device 80 may be a keyboard.
[0051] As shown in the figure, the input device 80 includes a plurality of optical axis modules SW11 , SW12 , SW21 , SW22 , a plurality of scanning lines SL1 , SL2 , a plurality of reading lines RL1 , RL2 and a control unit 84 .
[0052] The plurality of optical axis modules SW11, SW12, SW21, SW22 form an optical axis module array 82. The optical axis module array 82 can be divided into a plurality of columns and a plurality of rows (two rows x two columns are shown as an example). For a standard keyboard, the optical axis module array 82 can be divided into 8 columns x 13 rows.
[0053] Each optical axis module SW11, SW12, SW21, SW22 includes a light generating unit IR and a light receiving unit PT. The optical axis modules SW11, SW12, SW21, SW22 of this embodiment are similar to Figure 1 The optical axis module 12 is not described in detail here.
[0054] Each scanning line SL1, SL2 is connected to the light generating unit IR of the optical axis modules SW11, SW12, SW21, SW22 in the same row of the optical axis module array 82, and each scanning line SL1, SL2 has an input terminal IN1, IN2. The contact points R00 and R01 in the figure indicate that the corresponding circuits are connected to each other.
[0055] Each of the readout lines RL1 and RL2 is connected to the light receiving units PT of the optical axis modules SW11 , SW12 , SW21 , and SW22 in the same column of the optical axis module array 82 , and each of the readout lines RL1 and RL2 has an output terminal OUT1 and OUT2 , respectively.
[0056] The control unit 84 is electrically coupled to the input terminals IN1, IN2 and the output terminals OUT1, OUT2. The control unit 84 sequentially outputs start signals S11, S12 to the input terminals IN1, IN2 to activate the light generating units IR of the corresponding rows of optical axis modules SW11, SW12, SW21, SW22. The control unit 84 also has a storage unit 842 for storing the durations T01, T02 corresponding to the start signals S11, S12, respectively.
[0057] The control unit 84 reads the detection signals S11, S12 of the optical axis modules SW11, SW12 corresponding to the input terminal IN1 through these output terminals OUT1, OUT2 within the duration T01 of the turn-on signal S11 to detect whether a key is pressed; then, the control unit 84 reads the detection signals S11, S12 of the optical axis modules SW21, SW22 corresponding to the input terminal IN2 through these output terminals OUT1, OUT2 within the duration T02 of the turn-on signal S12 to detect whether a key is pressed, and so on.
[0058] In one embodiment, the control unit 84 reads the detection signals S11 and S12 of the optical axis modules SW11 , SW12 , SW21 and SW22 corresponding to the input terminals IN1 and IN2 through the output terminals OUT1 and OUT2 at intervals within the durations T01 and T02 .
[0059] The start signal S11, S12 can be understood as a scanning signal. That is, the optical axis module array 82 activates its light generating unit IR in a row unit to scan (read the detection signal S11, S12 to determine whether a key is pressed). After the optical axis modules SW11, SW12 of the previous row complete scanning, it is the turn of the optical axis modules SW21, SW22 of the next row to scan.
[0060] Take the optical axis modules SW11 and SW12 of one row for example. If any detection signal S11 and S12 read by the control unit 84 does not switch between high and low potential states during the duration T01, for example, it remains at a high potential state, the control unit 84 will determine that the key corresponding to the detection signal S11 and S12 is pressed. If the detection signals S11 and S12 read by the control unit 84 from the output terminals OUT1 and OUT2 switch between high and low potential states during the duration T01, this means that the keys corresponding to all the optical axis modules SW11 and SW12 of this row are not pressed.
[0061] When the control unit 84 detects that the detection signals S11 and S12 at the output terminals OUT1 and OUT2 are converted from a high potential state to a low potential state, a conversion time T11 is recorded, and the conversion time T11 is used to update the originally set duration T01. In other words, the control unit 84 uses the optical axis modules SW11 and SW12 in this row that complete the state conversion the latest as a judgment reference to set the conversion time T11 to ensure that the updated duration T01 can meet the needs of all optical axis modules SW11 and SW12. In one embodiment, the control unit 84 adds a buffer time Tb to the detected conversion time T11 to update the original duration T01.
[0062] Similarly, for the other rows of optical axis modules SW21 and SW22 of the optical axis module array 82 , the corresponding switching time T12 can also be calculated to update the corresponding duration T02 .
[0063] The input device and optical axis control method provided in this case can effectively shorten the startup time of the light generating unit, reduce the energy consumption of the input device, and also help to improve the overall detection speed of the input device.
[0064] Although the present invention has been disclosed as above by way of embodiments, it is not intended to limit the present invention. Any person skilled in the art may make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be determined by the definition of the claims.
Claims
1. An input device, characterized in that: Include: Optical axis module, including: a light generating unit adapted to receive a start signal and generate light according to the start signal; and A light receiving unit, adapted to receive the light to generate a detection signal; as well as The control unit is electrically coupled to the light generating unit and the light receiving unit, and is suitable for generating the start-up signal and reading the detection signal. The start-up signal corresponds to the duration. The control unit records the conversion time when the detection signal generates a high-low potential state conversion, and updates the duration according to the conversion time.
2. The input device according to claim 1, characterized in that The above-mentioned input device is a keyboard.
3. The input device according to claim 1, wherein: The above-mentioned control unit is a microcontroller.
4. The input device according to claim 1, wherein: The control unit uses the conversion time plus the buffer time as the update time to replace the duration time.
5. The input device according to claim 4, characterized in that The control unit is set with a maximum opening time, and when the update time exceeds the maximum opening time, the control unit replaces the duration with the maximum opening time.
6. The input device according to claim 4, characterized in that The above buffer time is between 3us and 7us.
7. The input device according to claim 1, wherein: The control unit records the conversion time when the detection signal is converted from a high potential state to a low potential state.
8. The input device according to claim 1, wherein: The light generating unit is a light emitting diode, and the light receiving unit is a phototransistor.
9. A control method for an input device, the input device having an optical axis module and a control unit, the optical axis module comprising a light generating unit and a light receiving unit, characterized in that: The light generating unit is adapted to receive a start signal and generate light according to the start signal. The light receiving unit is adapted to receive the light to generate a detection signal. The control unit is electrically coupled to the light generating unit and the light receiving unit, adapted to generate the start signal and read the detection signal, and stores a duration corresponding to the start signal. The control method comprises: The control unit generates the start signal; The control unit continuously reads the detection signal; The control unit determines whether the detection signal generates a high-low potential state transition within the duration; If the detection signal generates a high-low potential state transition within the duration, the control unit records the transition time when the detection signal generates a high-low potential state transition, and updates the duration according to the transition time; as well as If the detection signal does not generate a high or low potential state transition within the duration, the control unit maintains the original duration.
10. An input device, characterized in that: Include: A plurality of optical axis modules constitute an optical axis module array, each of which comprises: a light generating unit adapted to receive a start signal and generate light according to the start signal; and A light receiving unit, adapted to receive the light to generate a detection signal; as well as A plurality of scanning lines, each of which is connected to the light generating units in the same row of the optical axis module array, and each of which has an input end; a plurality of readout lines, each of which is connected to the light receiving units in the same column of the optical axis module array, and each of which has an output end; and The control unit is electrically coupled to the above-mentioned input terminals and the above-mentioned output terminals, and is suitable for generating the above-mentioned start-up signal at the above-mentioned input terminals and reading the above-mentioned detection signal from the above-mentioned output terminals. The above-mentioned start-up signal corresponds to the duration. The above-mentioned control unit records the conversion time when the above-mentioned detection signal generates a high-low potential state conversion, and updates the above-mentioned duration according to the above-mentioned conversion time.