Dial switch identification circuit and electronic equipment

By designing a dial switch identification circuit, connecting two dial switches to the same resistor voltage divider circuit, and detecting voltage through the main control unit, the problem of dial switch identification method occupying multi-signal channel resources in the prior art is solved, and efficient dial switch identification and signal channel savings are achieved.

CN222928381UActive Publication Date: 2025-05-30SHENZHEN YINGFEIYUAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202421788332.6
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2025-05-30
Estimated Expiration
2034-07-25

AI Technical Summary

Technical Problem

The existing dial switch identification method occupies a lot of signal receiving channel resources and cannot effectively identify the access status of multiple dial switches.

Method used

A dial switch identification circuit is designed. By connecting the first dial switch and the second dial switch to the same resistor voltage divider circuit, and connecting a resistor in series, the main control unit is connected to the common connection ends of the two dial switches and the resistor voltage divider circuit, so that when controlling different dial switches to be turned on or off, the voltage in the different resistor access circuit is detected to realize the access status identification of the dial switch.

Benefits of technology

It realizes the detection of the access status of two dial switches through one signal transmission channel, saves signal transmission channel resources, and improves the accuracy of identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN222928381U_ABST
    Figure CN222928381U_ABST
Patent Text Reader

Abstract

The utility model provides a dial switch identification circuit and an electronic device, the dial switch identification circuit comprises at least one resistor voltage division circuit, at least one resistor unit and a main control unit, and the resistor unit comprises a first resistor and a second resistor. According to the utility model, the first dial switch and the second dial switch are connected to the same resistance voltage division circuit, the first dial switch and the second dial switch are respectively connected in series with a resistor, and then the main control unit is connected to a common connection end of the two dial switches and the resistance voltage division circuit. Therefore, when different dial switches are controlled to be switched on or switched off, different resistors are connected into a circuit, the main control unit can detect different voltages at the moment, the access state recognition of the dial switches is achieved, meanwhile, the main control unit can detect the access condition of the two dial switches only through one signal transmission channel, and the switching efficiency of the two dial switches is improved. Channel multiplexing is realized, and signal transmission channel resources are effectively saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to the technical field of circuits, in particular to a DIP switch recognition circuit and an electronic device. Background Art

[0002] A DIP switch is a switch element commonly used in electronic devices and can be used for digital setting or function selection. Currently, the recognition of DIP switches is basically based on the recognition of digital signals. Each switch corresponds to a signal path, and sufficient channels need to be reserved at the signal receiving end to recognize 0 and 1 signals, which occupies a lot of signal receiving channel resources. Therefore, it is necessary to design a recognition circuit that saves more signal receiving channel resources. Summary of the Utility Model

[0003] The utility model provides a DIP switch recognition circuit and an electronic device, aiming to solve the problem that the DIP switch recognition method in related technologies occupies more signal receiving channel resources.

[0004] To solve the above technical problems, in the first aspect of the utility model, a DIP switch recognition circuit is provided, including: at least one resistor voltage division circuit, at least one resistor unit and a main control unit. The resistor unit includes a first resistor and a second resistor. The resistor voltage division circuits correspond to the resistor units one by one. The first resistor is used to be electrically connected to an external first DIP switch, and the second resistor is used to be electrically connected to an external second DIP switch. The first series branch of the first resistor and the first DIP switch is electrically connected to a power supply, and the second series branch of the second resistor and the second DIP switch is grounded. The resistor voltage division circuit and the main control unit are respectively used to be electrically connected to the first series branch and the second series branch.

[0005] Further, one end of the first resistor is used to be electrically connected to one end of the first DIP switch, the other end of the first resistor is electrically connected to the power supply, one end of the second resistor is used to be electrically connected to one end of the second DIP switch, the other end of the second resistor is grounded, and the other ends of the first DIP switch and the second DIP switch are respectively electrically connected to the resistor voltage division circuit and the main control unit.

[0006] Further, one end of the first resistor is used to be electrically connected to one end of the first DIP switch, the other end of the first DIP switch is electrically connected to the power supply, one end of the second resistor is used to be electrically connected to one end of the second DIP switch, the other end of the second DIP switch is grounded, and the other ends of the first resistor and the second resistor are respectively electrically connected to the resistor voltage division circuit and the main control unit.

[0007] Further, the resistive voltage division circuit includes a third resistor and a fourth resistor. One end of the third resistor is electrically connected to the power supply, the other end of the third resistor is respectively electrically connected to the first series branch and the second series branch, one end of the fourth resistor is respectively electrically connected to the first series branch and the second series branch, and the other end of the fourth resistor is grounded.

[0008] Further, the resistance values of the first resistor, the second resistor, the third resistor, and the fourth resistor are different from each other.

[0009] The second aspect of the present invention provides an electronic device, including the DIP switch identification circuit as described in the first aspect of the present invention.

[0010] As can be seen from the above description, in the present invention, the first DIP switch and the second DIP switch are connected to the same resistive voltage division circuit. A resistor is respectively connected in series with the first DIP switch and the second DIP switch, and then the main control unit is connected to the common connection end of the two DIP switches and the resistive voltage division circuit. Thus, when controlling different DIP switches to be turned on or off, different resistors are connected into the circuit. At this time, the main control unit can detect different voltages, thereby realizing the identification of the access state of the DIP switch. At the same time, the main control unit only needs to use one signal transmission channel to detect the access conditions of the two DIP switches, realizing the multiplexing of the channel and effectively saving the signal transmission channel resources. Description of the Drawings

[0011] Figure 1 is a circuit schematic diagram of a DIP switch identification circuit in the related art;

[0012] Figure 2 is a structural schematic diagram of a DIP switch identification circuit according to an embodiment of the present invention;

[0013] Figure 3 is a circuit schematic diagram of the first DIP switch identification circuit according to an embodiment of the present invention;

[0014] Figure 4 is a circuit schematic diagram of the second DIP switch identification circuit according to an embodiment of the present invention;

[0015] Figure 5 is a circuit schematic diagram of the third DIP switch identification circuit according to an embodiment of the present invention. Detailed Embodiments

[0016] In order to make the objectives, technical solutions and advantages of the present utility model clearer and more understandable, the present utility model will be further described in detail below in conjunction with the accompanying drawings and embodiments, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions throughout. It should be understood that the specific embodiments described herein are only used to explain the present utility model and are not used to limit the present utility model. In addition, the technical features involved in the various embodiments of the present utility model described below can be combined with each other as long as they do not conflict with each other.

[0017] In the related art, for the identification circuit of the DIP switch, the identification method of one-to-one correspondence between the signal receiving channel and the DIP switch is often adopted. In this method, when there are multiple DIP switches in the device, multiple signal receiving channels need to be occupied, which occupies a lot of channel resources; for the method of using a single signal receiving channel to identify the DIP switch, for example Figure 1 As shown, this switch identification circuit is used to identify the on and off states of 4 DIP switches. After 4 resistors with the same resistance value are connected in series, DIP switches K1, K2, K3, and K4 are respectively connected at the connection node positions. When a single switch is turned on in sequence, the detection unit, such as the ADC (analog-to-digital converter) of a single-chip microcomputer, will detect 3.7V, 3.33V, 2.5V, and 0V in sequence. When no switch is turned on, the ADC of the single-chip microcomputer detects 5V. Thus, the access state of the DIP switch can be identified. Although this solution only needs to use one signal receiving channel, when the DIP switch K4 is closed, regardless of whether the other DIP switches are closed or not, the value detected by the ADC of the single-chip microcomputer is 0V. Therefore, this solution cannot simultaneously identify the access states of multiple switches and is only applicable to the scenario where a single DIP switch is turned on. Therefore, due to the problems that the DIP switch identification method in the related art occupies more signal receiving channel resources or cannot achieve the decoupling of the detection of each switch, for this reason, the embodiments of the present utility model provide a DIP switch identification circuit.

[0018] As Figure 2The following is a schematic structural diagram of a DIP switch recognition circuit provided by an embodiment of the present invention. The DIP switch recognition circuit includes: at least one resistor voltage division circuit 100, at least one resistor unit 200, and a main control unit 300. The resistor unit 200 includes a first resistor 210 and a second resistor 220. The resistor voltage division circuits 100 and the resistor units 200 are in one-to-one correspondence. The first resistor 210 is used for electrically connecting to an external first DIP switch 410, and the second resistor 220 is used for electrically connecting to an external second DIP switch 420. The first series branch 510 of the first resistor 210 and the first DIP switch 410 is electrically connected to the power supply, and the second series branch 520 of the second resistor 220 and the second DIP switch 420 is grounded. The resistor voltage division circuit 100 and the main control unit 300 are each used for electrically connecting to the first series branch 510 and the second series branch 520. Among them, the main control unit 300 is a micro control unit 300, and the analog-to-digital conversion terminals of the micro control unit 300 are respectively used for electrically connecting to the first series branch 510 and the second series branch 520.

[0019] Specifically, in this embodiment, the DIP switch recognition circuit can be used to recognize the connection status of multiple groups of DIP switches. Taking the recognition of a group of DIP switches as an example, a group of DIP switches in this embodiment includes two DIP switches. A group of DIP switches corresponds to one resistor voltage division circuit 100. Each DIP switch in a group of DIP switches is connected in series with a resistor. Thus, when any DIP switch or all DIP switches in a group of DIP switches are turned on or off, detection can be achieved through one signal transmission channel of the main control unit 300, realizing channel multiplexing. Compared with the detection method of DIP switches using one-to-one corresponding signal transmission channels, this embodiment can effectively save signal transmission channel resources. At the same time, by using a group of shared resistor voltage division circuits 100 and separate series resistors, when any DIP switch is turned on or off, or when two DIP switches are turned on or off simultaneously, the voltage division resistance value will be changed to distinguish the connection status of different DIP switches. The main control unit 300 in this embodiment can optionally adopt a micro control unit 300, and the analog-to-digital conversion terminal ADC of the micro control unit 300 is used to detect the voltage division at the connection end to recognize the access status of the DIP switch.

[0020] As Figure 3 shown is the circuit schematic diagram of the first DIP switch recognition circuit provided by this embodiment. Please refer to Figure 3 , one end of the first resistor R1 (i.e., 210) is used for electrically connecting to one end of the first DIP switch 1 (i.e., 410), the other end of the first resistor R1 is electrically connected to the power supply, one end of the second resistor R2 (i.e., 220) is used for electrically connecting to one end of the second DIP switch 2 (i.e., 420), the other end of the second resistor R2 is grounded, and the other ends of the first DIP switch 1 and the second DIP switch 2 are respectively electrically connected to the resistor voltage division circuit 100 and the main control unit 300.

[0021] Specifically, in this embodiment, the first resistor in the resistor unit may be connected to the power supply first and then to the first DIP switch, and the second resistor in the resistor unit may be connected to the second DIP switch first and then grounded. In addition, this embodiment provides an application scenario of a DIP switch recognition circuit including three DIP switch groups. For example Figure 3 As shown, each DIP switch group includes two DIP switches. One group of DIP switches corresponds to a resistor voltage division circuit and a resistor unit. Among them, one end of the first resistor R1 of the first resistor unit is electrically connected to the power supply, and the other end of the first resistor R1 of the first resistor unit is used to be electrically connected to one end of the first DIP switch 1 of the external first DIP switch group. One end of the second resistor R2 of the first resistor unit is grounded, and the other end of the second resistor R2 of the first resistor unit is used to be electrically connected to one end of the second DIP switch 2 of the first DIP switch group. The first resistor voltage division unit is respectively used to be electrically connected to the other ends of the first DIP switch 1 and the second DIP switch 2 of the first DIP switch group; One end of the first resistor R1 of the second resistor unit is electrically connected to the power supply, and the other end of the first resistor R1 of the second resistor unit is used to be electrically connected to one end of the first DIP switch 1 of the external second DIP switch group. One end of the second resistor R2 of the second resistor unit is grounded, and the other end of the second resistor R2 of the second resistor unit is used to be electrically connected to one end of the second DIP switch 2 of the second DIP switch group. The second resistor voltage division unit is respectively used to be electrically connected to the other ends of the first DIP switch 1 and the second DIP switch 2 of the second DIP switch group; One end of the first resistor R1 of the third resistor unit is electrically connected to the power supply, and the other end of the first resistor R1 of the third resistor unit is used to be electrically connected to one end of the first DIP switch 1 of the external third DIP switch group. One end of the second resistor R2 of the third resistor unit is grounded, and the other end of the second resistor R2 of the third resistor unit is used to be electrically connected to one end of the second DIP switch 2 of the third DIP switch group. The third resistor voltage division unit is respectively used to be electrically connected to the other ends of the first DIP switch 1 and the second DIP switch 2 of the third DIP switch group.

[0022] As Figure 4 Shown is the circuit schematic diagram of the second DIP switch recognition circuit provided by this embodiment. Please refer to Figure 4 , one end of the first resistor R1 is used to be electrically connected to one end of the first DIP switch 1, the other end of the first DIP switch 1 is electrically connected to the power supply, one end of the second resistor R2 is used to be electrically connected to one end of the second DIP switch 2, the other end of the second DIP switch 2 is grounded, and the other ends of the first resistor R1 and the second resistor R2 are respectively electrically connected to the resistor voltage division circuit 100 and the main control unit 300.

[0023] Furthermore, please refer to Figure 3 and Figure 4, the resistor voltage division circuit 100 includes a third resistor R3 and a fourth resistor R4. One end of the third resistor R3 is electrically connected to the power supply, and the other end of the third resistor R3 is electrically connected to the first series branch 510 and the second series branch 520 respectively. One end of the fourth resistor R4 is electrically connected to the first series branch 510 and the second series branch 520 respectively, and the other end of the fourth resistor R4 is grounded. Among them, the resistance values of the first resistor R1, the second resistor R2, the third resistor R3, and the fourth resistor R4 are different from each other.

[0024] Specifically, in this embodiment, the positions of each DIP switch and its corresponding series resistor can be interchanged. For example Figure 4 as shown, in the series branch of the resistor and the DIP switch, the first DIP switch is connected to the power supply, and the second DIP switch is grounded. No matter how the positions of the DIP switch and the series resistor are, as long as the DIP switch is turned on or off, the resistor voltage division will be changed, so that the voltage division detected by the microcontroller unit 300 at the port will be different, thereby realizing the identification of the DIP switch. To Figure 3 or Figure 4Taking the first set of DIP switches as an example, where the resistance values of the first resistor R1, the second resistor R2, the third resistor R3, and the fourth resistor R4 are 1K, 2K, 100K, and 50K respectively. When both DIP switches 1 and 2 are off, the ADC of the microcontroller unit 300 detects that the voltage at the _DP1 terminal is the voltage division of the third resistor R3 and the fourth resistor R4, which is 1.1V. When both DIP switches 1 and 2 are on, the ADC of the microcontroller unit 300 detects that the voltage at the _DP1 terminal is the voltage division of the first parallel resistor (the parallel resistor of the first resistor R1 and the third resistor R3) and the second parallel resistor (the parallel resistor of the second resistor R2 and the fourth resistor R4), which is 2.2V. When DIP switch 1 is on and DIP switch 2 is off, the ADC of the microcontroller unit 300 detects that the voltage at the _DP1 terminal is the voltage division of the first parallel resistor and the fourth resistor R4, which is 3.24V. When DIP switch 1 is off and DIP switch 2 is on, the ADC of the microcontroller unit 300 detects that the voltage at the _DP1 terminal is the voltage division of the third resistor R3 and the second parallel resistor, which is 0.06V. Thus, the access states of two DIP switches can be detected through one ADC channel. At the same time, by reasonably setting the resistance values of each resistor, the voltage intervals corresponding to the four access situations can be made larger. For example, in this embodiment, the resistance values of 1K, 2K, 100K, and 50K are used, so that the intervals of the detection voltages corresponding to various access situations are greater than 1V, and the distinguishability of various access situations is higher, which can effectively improve the accuracy of identification. The detection principles of the other two sets of DIP switches in this embodiment are similar to those of the first set of DIP switches and will not be elaborated here. Therefore, in this embodiment, by combining the simple resistor voltage division circuit 100 for DIP switch identification, two switches can share one channel. Compared with the method of using one-to-one channel corresponding detection, this embodiment can save half of the channel occupancy, save more channel resources for the system to provide more support for other functional circuits, and at the same time, the detection voltage interval can be greater than 1V, which can maximize the division of the power supply such as 3.3V, is beneficial to the identification of the microcontroller unit 300, and improves the anti-interference performance of the circuit.

[0025] As Figure 5 shown is the circuit schematic diagram of the third DIP switch identification circuit provided by this embodiment. Please refer to Figure 5 , the DIP switch identification circuit further includes a filter capacitor 600. One end of the filter capacitor 600 is electrically connected to the analog-to-digital conversion terminal of the microcontroller unit 300, and the other end of the filter capacitor 600 is grounded.

[0026] Specifically, in this embodiment, in order to reduce the error caused by the trigger jitter of the DIP switch, a filter capacitor 600 can be added at the detection end. This filter capacitor 600 can also avoid the impact on the circuit caused by the instantaneous current generated when the DIP switch is turned on or off, and can filter and protect the circuit.

[0027] The DIP switch identification circuit provided by the embodiment of the present utility model connects the first DIP switch and the second DIP switch to the same resistor voltage division circuit. A resistor is respectively connected in series with the first DIP switch and the second DIP switch, and then the main control unit is connected to the common connection end of the two DIP switches and the resistor voltage division circuit. Thus, when different DIP switches are controlled to be turned on or off, different resistors are connected into the circuit. At this time, the main control unit can detect different voltages, thereby realizing the identification of the access state of the DIP switches. At the same time, the main control unit only needs to adopt one signal transmission channel to detect the access conditions of the two DIP switches, realizing the multiplexing of channels and effectively saving signal transmission channel resources.

[0028] The embodiment of the present utility model also provides an electronic device, and the electronic device includes the above-mentioned DIP switch identification circuit. Among them, the electronic device can be devices such as a digital TV box, a wireless router, an air conditioner control board, etc.

[0029] It should be noted that the various embodiments in the content of the present utility model are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other.

[0030] It should also be noted that in the content of the present utility model, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.

[0031] The above description of the disclosed embodiments enables those skilled in the art to implement or use the content of the present utility model. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined in the content of the present utility model can be implemented in other embodiments without departing from the spirit or scope of the content of the present utility model. Therefore, the content of the present utility model will not be limited to these embodiments shown in the content of the present utility model, but will conform to the widest scope consistent with the principles and novel features disclosed in the content of the present utility model.

Claims

1. A dip switch identification circuit, characterized in that: include: At least one resistor voltage divider circuit, at least one resistor unit and a main control unit, the resistor unit includes a first resistor and a second resistor, the resistor voltage divider circuit corresponds to the resistor unit one by one, the first resistor is used to be electrically connected to an external first dip switch, the second resistor is used to be electrically connected to an external second dip switch, the first resistor and a first series branch of the first dip switch are electrically connected to a power supply, the second resistor and a second series branch of the second dip switch are grounded, and the resistor voltage divider circuit and the main control unit are respectively used to be electrically connected to the first series branch and the second series branch.

2. The DIP switch identification circuit according to claim 1, characterized in that: One end of the first resistor is used to be electrically connected to one end of the first dip switch, the other end of the first resistor is electrically connected to a power supply, one end of the second resistor is used to be electrically connected to one end of the second dip switch, the other end of the second resistor is grounded, and the other ends of the first dip switch and the second dip switch are electrically connected to the resistor voltage divider circuit and the main control unit, respectively.

3. The DIP switch identification circuit according to claim 1, characterized in that: One end of the first resistor is used to be electrically connected to one end of the first dip switch, and the other end of the first dip switch is electrically connected to a power supply. One end of the second resistor is used to be electrically connected to one end of the second dip switch, and the other end of the second dip switch is grounded. The other ends of the first resistor and the second resistor are electrically connected to the resistor voltage divider circuit and the main control unit, respectively.

4. The DIP switch identification circuit according to claim 2 or 3, characterized in that: The resistor voltage divider circuit includes a third resistor and a fourth resistor, one end of the third resistor is electrically connected to the power supply, the other end of the third resistor is electrically connected to the first series branch and the second series branch respectively, one end of the fourth resistor is electrically connected to the first series branch and the second series branch respectively, and the other end of the fourth resistor is grounded.

5. The DIP switch identification circuit according to claim 4, characterized in that: The resistance values ​​of the first resistor, the second resistor, the third resistor and the fourth resistor are different.

6. The DIP switch identification circuit according to claim 1, characterized in that: It includes a first resistor voltage divider circuit, a second resistor voltage divider circuit, a third resistor voltage divider circuit, a first resistor unit, a second resistor unit and a third resistor unit; One end of the first resistor of the first resistor unit is electrically connected to a power supply, and the other end of the first resistor of the first resistor unit is used to be electrically connected to one end of a first dip switch of an external first dip switch group; one end of the second resistor of the first resistor unit is grounded, and the other end of the second resistor of the first resistor unit is used to be electrically connected to one end of a second dip switch of the first dip switch group; the first resistor voltage divider unit is used to be electrically connected to the other ends of the first dip switch and the second dip switch of the first dip switch group respectively; One end of the first resistor of the second resistor unit is electrically connected to the power supply, the other end of the first resistor of the second resistor unit is used to be electrically connected to one end of the first dip switch of the external second dip switch group, one end of the second resistor of the second resistor unit is grounded, the other end of the second resistor of the second resistor unit is used to be electrically connected to one end of the second dip switch of the second dip switch group, and the second resistor voltage divider unit is used to be electrically connected to the other ends of the first dip switch and the second dip switch of the second dip switch group respectively; One end of the first resistor of the third resistor unit is electrically connected to a power supply, the other end of the first resistor of the third resistor unit is used to be electrically connected to one end of a first dip switch of an external third dip switch group, one end of the second resistor of the third resistor unit is grounded, the other end of the second resistor of the third resistor unit is used to be electrically connected to one end of a second dip switch of the third dip switch group, and the third resistor voltage divider unit is used to be electrically connected to the other ends of the first dip switch and the second dip switch of the third dip switch group, respectively.

7. The DIP switch identification circuit according to claim 1, characterized in that: The main control unit is a micro control unit.

8. The DIP switch identification circuit according to claim 7, characterized in that: The analog-to-digital conversion terminal of the micro control unit is used to be electrically connected to the first series branch and the second series branch respectively.

9. The DIP switch identification circuit according to claim 7, characterized in that: It also includes a filter capacitor, one end of which is electrically connected to the analog-to-digital conversion end of the micro control unit, and the other end of which is grounded.

10. An electronic device, characterized in that: It comprises the DIP switch identification circuit as claimed in any one of claims 1 to 9.