A circuit adapted to toggle a microswitch

By designing a circuit adapted to a toggle switch, and utilizing a detection circuit module and a digital logic control function switching module, the circuit complexity and button interference issues caused by the switching methods of tactile and toggle switches in outdoor lighting equipment were resolved, achieving flexible function selection and a simplified circuit layout.

CN116248102BActive Publication Date: 2026-04-17SHANGHAI SHININGIC ELECTRONICS TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI SHININGIC ELECTRONICS TECH CO LTD
Filing Date
2022-12-29
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In existing outdoor lighting equipment, the switching methods of tactile switches and toggle switches result in complex circuit wiring and are prone to button interference, making it difficult to achieve flexible function selection.

Method used

A circuit adapted to a toggle switch is designed. The switching mode is determined by a detection circuit module, and the switching module is controlled by a comparator and digital logic to achieve automatic switching between toggle and tactile switches, reducing the complexity of the external layout.

Benefits of technology

It simplifies circuit wiring, reduces button interference, and enables flexible control by switching between touch and toggle switch functions through a single pin, meeting different needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116248102B_ABST
    Figure CN116248102B_ABST
Patent Text Reader

Abstract

A circuit adapted to a toggle switch includes a toggle function switching module, a touch function switching module, a detection circuit module, a switch mode receiving terminal (Key), a function selection module, and resistors R1 and R2. One end of resistor R1 is connected to power supply VDD, and the other end is connected to one end of resistor R2, the input terminal of the toggle function switching module, the switch mode receiving terminal (Key), the input terminal of the touch function switching module, and the input terminal of the detection circuit. The other end of resistor R2 is connected to ground (GND). The output terminals of the toggle function switching module, the touch switch switching module, and the detection circuit are connected to the input terminal of the function selection module. The output terminal of the function switching module generates a function switching signal. Therefore, this invention effectively solves the problem of requiring only one pin to switch between touch and toggle switches in applications, and allows for design implementation based on user-defined touch or toggle switch button functions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of lighting circuit technology and relates to a circuit adapted to a toggle switch. Background Technology

[0002] With the rapid development and increasing maturity of integrated circuit technology, outdoor lighting applications, such as those in parks, squares, and outdoor advertising lights, are becoming increasingly widespread. Outdoor lighting can improve traffic conditions, reduce driver fatigue, and contribute to increased road capacity and improved traffic safety.

[0003] Outdoor lighting can improve traffic conditions, reduce driver fatigue, and help improve road capacity and ensure traffic safety. In practical applications, different switches are inevitably used for control.

[0004] Currently, the main types of switches used in everyday household applications are tactile switches and toggle switches. For example, flashlights often use toggle switches, while outdoor Christmas lights and decorative lights are typically controlled using tactile switches. Because the two types of switches use different control methods, chips often use either toggle switch pins or tactile switch pins for control. However, as everyday usage scenarios become more widespread, the ability to freely switch between the two switch methods is becoming increasingly common.

[0005] Those skilled in the art will understand that the industry currently often uses a microcontroller plus peripheral drivers for applications. Furthermore, the free switching between the two switching modes and the corresponding control of various function selections can lead to complex circuit wiring and button interference. Summary of the Invention

[0006] To address the aforementioned technical problems, this invention proposes a circuit adapted to a toggle tactile switch. To achieve the above objectives, the technical solution of this invention is as follows:

[0007] A circuit adapted for a toggle tactile switch, which includes a toggle function switching module, a tactile function switching module, a detection circuit module, a receiving end Key of the switch mode, a function selection module, and resistors R1 and R2; wherein, one end of the resistor R1 is connected to the power supply VDD, and the other end is connected to one end of the resistor R2, the input end of the toggle function switching, the receiving end Key of the switch mode, the input end of the tactile function switching, and the input end of the detection circuit. The other end of the resistor R2 is connected to the ground terminal GND. The output end of the toggle function switching, the output end of the tactile switch switching, and the output end of the detection circuit are connected to the input end of the function selection module. The output end of the function switching is used to generate a function switching signal; after the detection circuit module is powered on and reset, the preset switch mode is the tactile switch mode; when the detection circuit module determines that the low-level signal received by the switch mode receiving end Key exceeds a preset time, the switch mode will be determined as the toggle switch mode, and the detection circuit module controls the toggle function switching module to work and execute the corresponding function of the toggle switch. Otherwise, the detection circuit module controls the tactile switch mode to work and execute the corresponding function of the tactile switch.

[0008] Further, the toggle function switching module includes a comparator A1, a comparator A2, and digital logic; one input end of the comparator A1 is connected to the power supply VDD, and the other input end is connected to the receiving end Key of the switch mode; one input end of the comparator A2 is connected to the ground terminal GND, and the other input end is connected to the receiving end Key of the switch mode; the digital logic receives the outputs of the comparator A1 and the comparator A2, and the digital logic outputs a control signal to control the function selection module to work.

[0009] Further, the digital logic includes three output ends, namely, an output function control signal F1, a function control signal F2, and a function control signal F3;

[0010] When there is no signal input at the switch mode receiving end Key, the terminal voltage of the switch mode receiving end Key is VDD*R2 / (R1+R2). At this time, the terminal voltage of the switch mode receiving end Key is GND<Vkey<VDD. Through the comparator A% and the comparator A2, the output function control signal F1 is output;

[0011] [[ID=,12]]When the switch mode receiving end Key is connected to the power supply VDD, at this time, the terminal voltage of the switch mode receiving end Key is GND<Vkey = VDD. Through the comparator A1 and the comparator A2, the function control signal F2 can be output;

[0012] When the switch-mode receiving terminal Key is connected to the ground terminal GND, at this time, the terminal voltage of the switch-mode receiving terminal Key, GND = Vkey < VDD. Through the comparator A1 and the comparator A2, a function control signal F3 is output.

[0013] Further, the touch function switching module includes a level detection unit, a D flip-flop group, and a touch button function unit;

[0014] When the switch-mode receiving terminal Key is not operated, the voltage of the switch-mode receiving terminal Key pin is VDD*R2 / (R1 + R2). Then, the D flip-flop group is used to detect the time when the switch-mode receiving terminal Key is at a low level. When the low-level time of the button is less than the CLK time, it is determined that the switch-mode receiving terminal Key is still not operated. When the low-level time of the button exceeds CLK, it is determined that the switch-mode receiving terminal Key has been operated, and the touch button function unit enters a preset switch mode.

[0015] Further, the detection circuit module includes a level detection unit, an oscillator OSC, a timer, and a latch;

[0016] When the switch-mode receiving terminal Key is connected to the ground terminal GND, at this time, the oscillator OSC is forced to start working, and the timer starts timing. When the time reaches the set time T, it is determined to enter the toggle switch mode, and the output signal of the latch is selected to be at a low level. Further, the function corresponding to the toggle switch is selected through the function selection module;

[0017] When the time when the switch-mode receiving terminal Key is connected to the ground terminal GND is short, that is, it does not reach the set time T, it enters the touch switch mode, and the output signal of the latch is selected to be at a high level. Further, the function corresponding to the touch switch is selected through the function selection module.

[0018] From the above technical solutions, it can be seen that the design solution in the present invention, compared with the products on the market, not only reduces the application complexity in the peripheral PCB layout, but effectively solves the problem that only one pin is required for switching between the touch and toggle switches in the application, and realizes the corresponding design according to the touch or toggle switch button functions set by individuals. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 The figure shows a schematic diagram of the circuit adapting the toggle touch switch in the embodiment of the present invention

[0020] Figure 2 The figure shows a schematic diagram of the toggle function switching module in the embodiment of the present invention

[0021] Figure 3The diagram shown is a schematic of the touch function switching module in an embodiment of the present invention.

[0022] Figure 4 The diagram shown is a schematic of the detection circuit module in an embodiment of the present invention. Detailed Implementation

[0023] The following is in conjunction with the appendix Figure 1-4 The specific embodiments of the present invention will be further described in detail below.

[0024] Please see Figure 1 , Figure 1 The diagram shown is a schematic of a circuit adapted to a toggle switch in an embodiment of the present invention. Figure 1 As shown, the circuit for adapting to a toggle switch may include a toggle function switching module, a touch function switching module, a detection circuit module, a switch mode receiving terminal Key, a function selection module, and resistors R1 and R2.

[0025] Wherein, one end of resistor R1 is connected to power supply VDD, and the other end is connected to one end of resistor R2, the input terminal of the toggle function switch, the receiving terminal of the switch mode Key, the input terminal of the tactile function switch, and the input terminal of the detection circuit. The other end of resistor R2 is connected to ground GND. The output terminal of the toggle function switch, the output terminal of the tactile switch switch, and the output terminal of the detection circuit are connected to the input terminal of the function selection module. The output terminal of the function switch is used to generate a function switching signal.

[0026] It should be noted that the circuit adapted to the toggle and tactile functions in the embodiments of the present invention can be configured with corresponding toggle and tactile functions according to one's own needs. As technology and human habits change, the switch selection will also change, and designers can adjust the design method accordingly.

[0027] Please see Figure 2 , Figure 2 Figure 2 The diagram shown is a schematic of the toggle function switching module in an embodiment of the present invention. Figure 2 As shown, the toggle function switching module includes comparator A1, comparator A2, and digital logic; one input terminal of comparator A1 is connected to power supply VDD, and the other input terminal is connected to the receiving terminal Key of the switch mode; one input terminal of comparator A2 is connected to ground GND, and the other input terminal is connected to the receiving terminal Key of the switch mode; the digital logic receives the outputs of comparator A1 and comparator A2, and the digital logic outputs control signals to control the operation of the function selection module.

[0028] Among them, when the light intensity increases and the detected solar voltage is high enough, the solar panel charges the battery at this time; when the voltage SOL at the SOL terminal < the voltage BAT at the BAT terminal, it is detected that the solar energy is insufficient at this time, and the BAT terminal is no longer charged; when the voltage SOL at the SOL terminal is greater than the voltage V2, a light control signal is provided, otherwise no light control signal is output.

[0029] In an embodiment of the present invention, the digital logic includes three output terminals, namely, an output function control signal F1, a function control signal F2, and a function control signal F3.

[0030] When there is no signal input at the switch mode receiving end Key, the terminal voltage of the switch mode receiving end Key is VDD*R2 / (R1+R2). At this time, the terminal voltage of the switch mode receiving end Key is GND < Vkey < VDD. Through the comparator A1 and the comparator A2, the output function control signal F1 is output.

[0031] When the switch mode receiving end Key is connected to the power supply VDD, at this time, the terminal voltage of the switch mode receiving end Key is GND < Vkey = VDD. Through the comparator A1 and the comparator A2, the function control signal F2 can be output.

[0032] When the switch mode receiving end Key is connected to the ground terminal GND, at this time, the terminal voltage of the switch mode receiving end Key is GND = Vkey < VDD. Through the comparator A1 and the comparator A2, the function control signal F3 is output.

[0033] The above three function control modes can control and generate corresponding functions according to specific requirements.

[0034] Please refer to Figure 3 , Figure 3 The figure shows a schematic diagram of the touch function switching module in an embodiment of the present invention. As Figure 3 shown, the touch function switching module includes a level detection unit, a D flip-flop group, and a touch button function unit; when the switch mode receiving end Key is not operated, the foot voltage of the switch mode receiving end Key is VDD*R2 / (R1+R2), and then the D flip-flop group is used to detect the time when the switch mode receiving end Key is at a low level; when the low-level time of the button is less than the CLK time, it is determined that the switch mode receiving end Key is still not operating; when the low-level time of the button exceeds CLK, it is determined that the switch mode receiving end Key has been operated, and the touch button function unit enters a preset switch mode.

[0035] Please refer to Figure 4 , Figure 4The diagram shown is a schematic of the drive control circuit module in an embodiment of the present invention. Figure 4 As shown, in an embodiment of the present invention, the detection circuit module includes a level detection unit, an oscillator (OSC), a timer, and a latch.

[0036] When the switch mode receiver Key is connected to ground GND, the oscillator OSC is forced to start working and the timer starts counting. When the time reaches the set time T, it is determined that the switch mode has been entered, and the output signal of the latch is selected to be low level. Then, the function selection module selects the function corresponding to the switch.

[0037] When the switch mode receiver Key is connected to ground GND for a short time, i.e. before the set time T is reached, it enters the tactile switch mode and is selected as high level by the output signal of the latch, and then the function selection module selects the function corresponding to the tactile switch.

[0038] In other words, the detection circuit module is reset upon power-up. The default switch mode is a tactile switch. When the Key is connected to GND for a certain period of time, it will be determined to be a toggle switch. At this time, the chip latches the switch to maintain its corresponding function.

[0039] The above description is merely a preferred embodiment of the present invention. The embodiments are not intended to limit the scope of patent protection of the present invention. Therefore, any equivalent structural changes made based on the description and drawings of the present invention should also be included within the scope of protection of the present invention.

Claims

1. A circuit adapted to a toggle tactile switch, characterized in that, It includes a toggle function switching module, a touch function switching module, a detection circuit module, a receiving end Key in switch mode, a function selection module, and resistors R1 and R2; Among them, one end of the resistor R1 is connected to the power supply VDD, and the other end is connected to one end of the resistor R2, the input end of the toggle function switching, the receiving end Key in switch mode, the input end of the touch function switching, and the input end of the detection circuit. The other end of the resistor R2 is connected to the ground terminal GND. The output ends of the toggle function switching, the output end of the touch switch switching, and the output end of the detection circuit are connected to the input end of the function selection module. The output end of the function switching is used to generate a function switching signal; After the detection circuit module is powered on and reset, the preset switch mode is the touch switch mode; when the detection circuit module determines that the low-level signal received by the switch mode receiving end Key exceeds a preset time, the switch mode will be determined as the toggle switch mode, and the detection circuit module controls the toggle function switching module to work and execute the corresponding function of the toggle switch. Otherwise, the detection circuit module controls the touch switch mode to work and execute the corresponding function of the touch switch; The toggle function switching module includes a comparator A1, a comparator A2, and digital logic; one input end of the comparator A1 is connected to the power supply VDD, and the other input end is connected to the receiving end Key in switch mode; one input end of the comparator A2 is connected to the ground terminal GND, and the other input end is connected to the receiving end Key in switch mode; the digital logic receives the outputs of the comparator A1 and the comparator A2, and the digital logic outputs a control signal to control the function selection module to work; The digital logic includes three output ends, namely, an output function control signal F1, a function control signal F2, and a function control signal F3; When there is no signal input at the switch mode receiving end Key, the terminal voltage of the switch mode receiving end Key is VDD*R2 / (R1+R2). At this time, the terminal voltage of the switch mode receiving end Key is GND<Vkey<VDD. Through the comparator A1 and the comparator A2, the function control signal F1 is output; When the switch mode receiving end Key is connected to the power supply VDD, at this time, the terminal voltage of the switch mode receiving end Key is GND<Vkey = VDD. Through the comparator A1 and the comparator A2, the function control signal F2 can be output; When the switch mode receiving end Key is connected to the ground terminal GND, at this time, the terminal voltage of the switch mode receiving end Key is GND = Vkey<VDD. Through the comparator A1 and the comparator A2, the function control signal F3 is output.

2. The circuit adapted for a toggle switch according to claim 1; characterized in that, The touch function switching module includes a level detection unit, a D flip-flop group, and a touch button function unit; When the switch mode receiver Key is not operated, the voltage of the switch mode receiver Key pin is VDD*R2 / (R1+R2). Then, the D flip-flop group detects the time when the switch mode receiver Key is at a low level. When the low level time of the button is less than the CLK time, it is determined that the switch mode receiver Key is still not operating. When the low level time of the button exceeds the CLK time, it is determined that the switch mode receiver Key has been operated, and the tactile button function unit enters the preset switch mode.

3. The circuit adapted for a toggle switch according to claim 1, characterized in that, The detection circuit module includes a level detection unit, an oscillator (OSC), a timer, and a latch. When the switch mode receiver Key is connected to ground GND, the oscillator OSC is forced to start working and the timer starts counting. When the time reaches the set time T, it is determined that the switch mode is entered, and the output signal of the latch is selected to be low level. Then, the function selection module selects the function corresponding to the switch. When the switch mode receiver Key is connected to ground GND for a short time, i.e. before the set time T is reached, it enters the tactile switch mode and is selected as high level by the output signal of the latch, and then the function selection module selects the function corresponding to the tactile switch.

Citation Information

Patent Citations

  • Switching circuit

    JP1999145805A