Circuit device
The circuit device addresses the challenge of determining mechanical switch selection by using a branch circuit with resistive elements and an analog switch to measure voltage or current, ensuring accurate and efficient operation with minimal port usage.
Patent Information
- Application Number
- JP2024020559
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-02-14
- Publication Date
- 2025-08-26
AI Technical Summary
Mechanical switches lack signal lines for control, making it difficult to determine which circuit or throw is selected, and occupying multiple general-purpose input/output ports of a microcontroller, leading to operational errors and inefficiency.
A circuit device with a mechanical switch connected to a branch circuit with resistive elements of varying resistance values, a common resistive element, and an analog switch, allowing the microcontroller to determine the selected circuit by measuring voltage or current values at a single general-purpose input/output port.
Accurately determines the 'on'/ 'off' state of a mechanical switch and the selected circuit without occupying multiple input/output ports, reducing operational errors and enabling the switch to be used for other purposes.
Smart Images

Figure 2025124475000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a circuit device, and more particularly to a circuit device that can accurately and easily select "on" / "off" of a mechanical switch or determine the selected state of a circuit. [Background technology]
[0002] Generally, mechanical switches for selectively connecting multiple circuits or throws do not have signal lines for control like analog switches, making it difficult to determine which circuit or throw the mechanical switch is selecting.
[0003] When the circuits or throws of a mechanical switch are connected to circuits that perform different operations and each operation needs to be displayed on a display, it is necessary to notify the microcontroller that outputs the display data which circuit or throw has been selected. For this reason, in the past, users manually operated an input device to input information into the general-purpose input / output port of the microcontroller to determine which circuit was selected so that it corresponded to the circuit selected by the mechanical switch. This had the problem of the possibility of operational errors and of occupying many of the general-purpose input / output ports of the microcontroller.
[0004] Therefore, a circuit is known that inputs the output of a voltage divider circuit that combines a resistive element and a mechanical switch into an AD converter, making it possible to determine which circuit is selected or which switch is "on."
[0005] For example, Patent Document 1 listed below discloses a circuit that includes a resistive voltage divider circuit that divides a power supply voltage and applies the divided voltage to an A / D port of a microcontroller, and a key switch for changing the voltage division ratio of the resistive voltage divider circuit, and that identifies which key switch has been selected. [Prior art documents] [Patent documents]
[0006] [Patent Document 1] Japanese Patent Application Laid-Open No. 2000-155752 Summary of the Invention [Problem to be solved by the invention]
[0007] However, in the invention described in Patent Document 1, the branch circuit in which the key switch is installed is used only for the purpose of determining the "on" / "off" state of the key switch and is not used for any other purpose.
[0008] In consideration of the above circumstances, the present invention aims to provide a circuit device that can accurately and easily determine the "on" / "off" state of a mechanical switch or which circuit the switch is selecting, while limiting the number of occupied general-purpose input / output ports of a microcontroller, and that allows the mechanical switch to be used for other purposes as well. [Means for solving the problem]
[0009] In order to solve the above problem, the circuit device of the present invention comprises a mechanical switch connected to a constant voltage source and branching into multiple paths, one of which can be selectively closed by a user, a branch circuit including resistive elements of different resistance values connected in series with the mechanical switch in each of the multiple paths, and a common resistive element connected in series between the branch circuit and ground and an analog switch whose opening and closing is controlled by a microcontroller, and the voltage value of a node between the branch circuit and the common resistive element or a node between the branch circuit and the analog switch, or the value of a current flowing through the branch circuit is input to a general-purpose input / output port of the microcontroller. [Brief explanation of the drawings]
[0010] [Figure 1] 1 is a schematic diagram showing the configuration of a circuit device according to a first embodiment. [Figure 2]FIG. 10 is a schematic diagram showing the configuration of a circuit device according to a second embodiment. [Figure 3] FIG. 11 is a schematic diagram showing the configuration of a circuit device of a comparative example related to the third embodiment. [Figure 4] FIG. 10 is a schematic diagram showing the configuration of a circuit device according to a third embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0011] Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[0012] [Embodiment 1] First, a circuit device 100 according to a first embodiment will be described with reference to Fig. 1. The circuit device 100 includes a branch circuit 110 connected to a constant voltage source 105, and a common resistor element 115 and an analog switch 120 connected in series between the branch circuit 110 and ground.
[0013] The branch circuit 110 branches from a node connected to the constant voltage source 105 into multiple paths 125, namely, a first path 125A, a second path 125B, and a third path 125C, and includes a mechanical switch 130 that allows a user to selectively close one of the multiple paths 125. Each of the multiple paths 125 is provided with a resistance element 135 having a different resistance value that is connected in series with the mechanical switch 130. The resistance element 135 functions as a voltage-dividing resistance element in combination with the common resistance element 115. That is, the first path 125A is provided with a first voltage-dividing resistance element 135A, the second path 125B is provided with a second voltage-dividing resistance element 135B, and the third path 125C is provided with a third voltage-dividing resistance element 135C.
[0014] In the first embodiment, the mechanical switch 130 is a single-pole, multi-throw mechanical switch having a single pole on the node side between the branch circuit 110 and the analog switch 120 and multiple circuits on the first voltage divider resistor element 135A-third voltage divider resistor element 135C side. Specifically, the mechanical switch 130 is a single-pole, triple-throw mechanical switch. However, the number of throws of the mechanical switch 130, i.e., the number of circuits, depends on the number of branches of the branch circuit 110 and is not limited to the number of circuits in the first embodiment. Note that the mechanical switch 130 may also be a single-pole, single-throw mechanical switch provided in each of the multiple paths 125. In that case, the first voltage divider resistor element 135A and a single-pole, single-throw mechanical switch are provided in series in the first path 125A. Similarly, the second path 125B is provided with a second voltage dividing resistor element 135B and a single-pole single-throw switch, and the third path 125C is provided with a third voltage dividing resistor element 135C and a single-pole single-throw switch.
[0015] The node between the branch circuit 110 and the analog switch 120 is an output node 140, which is connected to a general-purpose input / output port 150 of the microcontroller 145. As a result, the potential (voltage) of the output node 140 is input to the general-purpose input / output port 150 of the microcontroller 145. Note that the analog switch 120 and the common resistor element 115 may be interchanged so that the analog switch 120 is placed on the ground side and the common resistor element 115 is placed on the branch circuit 110 side.
[0016] The analog switch 120 is controlled to be open or closed by the microcontroller 145. That is, the analog switch 120 is in a closed state when determining which circuit the mechanical switch 130 is selecting, and is in an open state when an input signal from an external circuit (described later) is input to a general-purpose input / output port 150 of the microcontroller 145.
[0017] In each of the multiple paths 125 of the branch circuit 110, a node between each of the resistance elements 135 and the mechanical switch 130 is defined as an input node 155 from an external circuit. That is, the first input node 155A is connected to a first external circuit, the second input node 155B is connected to a second external circuit, and the third input node 155C is connected to a third external circuit. For example, as shown in FIG. 1 , the external circuits are various sensors, and a first sensor 160A is connected to the first input node 155A, a second sensor 160B is connected to the second input node 155B, and a third sensor 160C is connected to the third input node 155C.
[0018] As shown in FIG. 1, a display device such as a display 165 is connected to the microcontroller 145, and the results of the determination made by the microcontroller 145, the sensor measurement results, and the like are displayed.
[0019] The operation of the circuit device 100 configured as described above will be described. First, the analog switch 120 is closed in response to an instruction from the microcontroller 145. Next, the user operates the mechanical switch 130 to select one of the first path 125A to the third path 125C of the branch circuit 110. The potential of the output node 140 is determined by the voltage division ratio between the resistor element 135 and the common resistor element 115, which are provided in the path selected by the mechanical switch 130.
[0020] That is, when the mechanical switch 130 selects the first path 125A, a potential obtained by dividing the voltage of the constant voltage source 105 by the first voltage dividing resistor 135A and the common resistor 115 is input to the general-purpose input / output port 150 of the microcontroller 145. When the mechanical switch 130 selects the second path 125B, a potential obtained by dividing the voltage of the constant voltage source 105 by the second voltage dividing resistor 135B and the common resistor 115 is input to the general-purpose input / output port 150 of the microcontroller 145. Similarly, when the mechanical switch 130 selects the third path 125C, a potential obtained by dividing the voltage of the constant voltage source 105 by the third voltage dividing resistor 135C and the common resistor 115 is input to the general-purpose input / output port 150 of the microcontroller 145.
[0021] The microcontroller 145 converts the potential input to the general-purpose input / output port 150 into a digital value using, for example, an AD converter, and compares the digital value with a preset expected value to determine which path the mechanical switch 130 is selecting. The determination result is displayed on a display device such as a display 165 connected to the microcontroller 145.
[0022] Next, the microcontroller 145 opens the analog switch 120. Then, the output of the external circuit input to the input node 155 of the path 125 selected by the mechanical switch 130 is input to the microcontroller 145 via the output node 140 and the general-purpose input / output port 150.
[0023] 1, when the mechanical switch 130 selects the first path 125A, the output signal of the first sensor 160A is input to the general-purpose input / output port 150 of the microcontroller 145. When the mechanical switch 130 selects the second path 125B, the output signal of the second sensor 160B is input to the general-purpose input / output port 150 of the microcontroller 145. When the mechanical switch 130 selects the third path 125C, the output signal of the third sensor 160C is input to the general-purpose input / output port 150 of the microcontroller 145.
[0024] According to the circuit device 100 configured as described above, it is possible to determine which circuit is selected by the mechanical switch 130 by occupying only one general-purpose input / output port 150 of the microcontroller 145. This eliminates the need for the user to manually operate an input device such as a touch panel provided on the display 165 or the like in order to have the microcontroller 145 identify which circuit is selected by the mechanical switch 130, and eliminates the risk of operational errors. Furthermore, in addition to being able to detect which circuit is selected by the mechanical switch 130, it is also possible to share the single general-purpose input / output port 150 as an input port for an output signal from an external sensor.
[0025] In the first embodiment, the path selected by the mechanical switch 130 is determined by measuring the potential input to the general-purpose input / output port 150 of the microcontroller 145 using an AD converter. However, instead of the AD converter, a comparator may be used to compare the potential input to the general-purpose input / output port 150 with several predetermined thresholds, thereby determining the path selected by the mechanical switch 130.
[0026] [Embodiment 2] A circuit device 200 according to a second embodiment will be described with reference to FIG. 2 . The circuit device 200 includes a branch circuit 210 connected to a constant voltage source 205. The branch circuit 210 functions as a current measurement circuit that receives the magnitude of the current flowing through the branch circuit 210 as an input value from a general-purpose input / output port 260 of a microcontroller 255. That is, the branch circuit 210 is part of the current measurement circuit that measures the magnitude of the current flowing through the branch circuit 210. The circuit device 200 further includes a common resistor element 215 and a measurement analog switch 220 connected in series between the branch circuit 210 and ground. An output node 230 is connected to an external circuit via an output analog switch 225 between the branch circuit 210 and the measurement analog switch 220. The external circuit is, for example, an external load circuit that uses the constant-voltage power supplied from the constant-voltage source 205.
[0027] The constant voltage source 205 supplies a constant voltage to the circuit, and various regulator circuits such as a linear regulator and a switching regulator can be used.
[0028] The branch circuit 210 branches from a node connected to the constant voltage source 205 via a mechanical switch 235 into multiple paths 240, namely, a first path 240A, a second path 240B, and a third path 240C. The mechanical switch 235 allows a user to selectively close one of the multiple paths 240. Each of the multiple paths 240 of the branch circuit 210 is provided with a resistor element 245 having a different resistance value connected in series with the mechanical switch 235. The resistor element 245 functions as a shunt resistor, as will be described later. That is, a first shunt resistor element 245A is provided in the first path 240A, a second shunt resistor element 245B is provided in the second path 240B, and a third shunt resistor element 245C is provided in the third path 240C.
[0029] In the second embodiment, the mechanical switch 235 is a single-pole, multi-throw mechanical switch in which the node on the constant voltage source 205 side is single-pole and the first shunt resistance element 245A-third shunt resistance element 245C side are multiple circuits. Note that the mechanical switch 235 may be a single-pole, single-throw mechanical switch provided on each of the multiple paths 240.
[0030] A current sensor 250 is connected in parallel to the branch circuit 210 between a node on the constant voltage source 205 side and a node on the measurement analog switch 220 side of the branch circuit 210. The current sensor 250 detects the magnitude of the current flowing through the branch circuit 210 and inputs it as an analog signal to a general-purpose input / output port 260 of the microcontroller 255.
[0031] The opening and closing of the measurement analog switch 220 and the output analog switch 225 is controlled by the microcontroller 255. Specifically, when identifying which circuit is selected by the mechanical switch 235, the measurement analog switch 220 is in a closed state and the output analog switch 225 is in an open state. On the other hand, when supplying power from the constant voltage source 205 to an external load circuit while measuring the current flowing through the circuit, the measurement analog switch 220 is in an open state and the output analog switch 225 is in a closed state.
[0032] As shown in FIG. 2, a display device such as a display 265 is connected to the microcontroller 255, and the results of determination by the microcontroller 255, the results of measurement by the current sensor 250, and the like are displayed.
[0033] The operation of the circuit device 200 configured as described above will now be described. First, the measurement analog switch 220 is closed and the output analog switch 225 is opened in response to an instruction from the microcontroller 255. Next, the user operates the mechanical switch 235 to select one of the first path 240A to the third path 240C of the branch circuit 210. The signal output from the current sensor 250 to the general-purpose input / output port 260 of the microcontroller 255 has a potential whose magnitude corresponds to the value of the current when the power of the voltage supplied by the constant voltage source 205 flows through the resistor element 245 and the common resistor element 215.
[0034] That is, when the mechanical switch 235 selects the first path 240A, a signal having a potential corresponding to the value of a current flowing through the first shunt resistor 245A and the common resistor 215 is input to the general-purpose input / output port 260 of the microcontroller 255. When the mechanical switch 235 selects the second path 240B, a signal having a potential corresponding to the value of a current flowing through the second shunt resistor 245B and the common resistor 215 is input to the general-purpose input / output port 260 of the microcontroller 255. When the mechanical switch 235 selects the third path 240C, a signal having a potential corresponding to the value of a current flowing through the third shunt resistor 245C and the common resistor 215 is input to the general-purpose input / output port 260 of the microcontroller 255. The microcontroller 255 converts the potential input to the general-purpose input / output port 260 into a digital value using an AD converter and compares it with a predetermined expected value to determine which path the mechanical switch 235 is selecting. The result of the determination, that is, which path the mechanical switch 235 has selected, is displayed on a display device such as a display 265 connected to the microcontroller 255 .
[0035] Next, the microcontroller 255 opens the measurement analog switch 220 and closes the output analog switch 225. This causes constant-voltage power from the constant-voltage source 205 to be supplied to the output node 230 via the output analog switch 225 and one of the paths 240 selected by the mechanical switch 235. Power is consumed by the external load circuit connected to the output node 230, causing a current to flow through the branch circuit 210. The current flowing through the branch circuit 210 is measured by the current sensor 250. That is, a signal having a potential corresponding to the value of the current flowing through the shunt resistors 245A-245C provided in one of the first path 240A-third path 240C selected by the mechanical switch 235 and the external load circuit is input to the general-purpose input / output port 260.
[0036] The microcontroller 255 converts an input signal input to the general-purpose input / output port 260 into a digital value using an AD converter, and displays the corresponding value as a current value on a display device such as a display 265 connected to the microcontroller 255.
[0037] According to the circuit device 200 configured as described above, it is possible to determine which circuit is selected by the mechanical switch 235 by occupying only one general-purpose input / output port 260 of the microcontroller 255. This eliminates the need for the user to manually operate an input device such as a touch panel provided on a display or the like to make the microcontroller 255 identify which circuit is selected by the mechanical switch 235, and also eliminates the possibility of operational errors.
[0038] The above circuit device 200 can be applied to a circuit in which a mechanical switch 235 is used to select a resistor element 245 according to the magnitude of the current flowing through the external load circuit when measuring the current flowing through the external load circuit connected to the output node 230. That is, the above circuit device 200 can be applied to a system in which the measurement range of an ammeter is switched.
[0039] In the second embodiment, the path selected by the mechanical switch 235 is determined by measuring the potential (i.e., the potential corresponding to the current value) input to the general-purpose input / output port 260 of the microcontroller 255 using an AD converter. However, instead of the AD converter, a comparator may be used to compare the potential input to the general-purpose input / output port 260 with several predetermined threshold values, thereby determining the path selected by the mechanical switch 235.
[0040] In the second embodiment, the branch circuit 210 has the mechanical switch 235 disposed on the constant voltage source 205 side, and the resistive element 245 disposed on the measurement analog switch 220 and output analog switch 225 side. However, the present disclosure is not limited to the above example. The branch circuit 210 may have a configuration in which the resistive element 245 is disposed on the constant voltage source 205 side, and the mechanical switch 235 is disposed on the measurement analog switch 220 and output analog switch 225 side.
[0041] [Comparative Example] Before describing the third embodiment, a circuit device 300 as a comparative example related to the third embodiment will be described with reference to FIG. 3. The circuit device 300 is a circuit device for a keyboard, also known as a key matrix, and includes a microcontroller 305, mechanical switches SW00-SW33, and diodes D00-D33 arranged at the intersections of grid-like wiring. (Note that in the following description, the mechanical switches SW00-SW33 will be simply referred to as switches SW00-SW33.)
[0042] Four horizontal wirings row0-row3 are connected as lines dedicated to digital input to general-purpose input / output ports 310A-310D of microcontroller 305. Four vertical wirings col0-col3 are connected as lines dedicated to digital output to general-purpose input / output ports 310E-310H. At the intersections of each of the horizontal wirings row0-row3 and each of the vertical wirings col0-col3, switches SW00-SW33 and diodes D00-D33 are arranged in series to connect each of the horizontal wirings row0-row3 and each of the vertical wirings col0-col3.
[0043] The switches SW00-SW33 are connected to the vertical wiring lines col0-col3, and the diodes D00-D33 are connected to the horizontal wiring lines row0-row3. The diodes D00-D33 are connected so that the switches SW00-SW33 side is the anode and the horizontal wiring lines row0-row3 side is the cathode.
[0044] In the above circuit, the microcontroller 305 periodically outputs "H" level trigger signals to the vertical wiring lines col0-col3 in order from the general-purpose input / output ports 310E-310H.
[0045] That is, only the general-purpose input / output port 310E outputs a signal at the "H" level, and the other three general-purpose input / output ports 310F-310H output signals at the "L" level. Then, by reading the input values of the general-purpose input / output ports 310A-310D at this time, the "on" / "off" states of the switches SW00, SW10, SW20, and SW30 connected to the vertical wiring col0 can be determined.
[0046] Next, only the general-purpose input / output port 310F outputs a signal at "H" level, and the other three general-purpose input / output ports 310E, 310G, and 310H output signals at "L" level. Then, by reading the input values of the general-purpose input / output ports 310A-310D at this time, the "on" / "off" states of the switches SW01, SW11, SW21, and SW31 connected to the vertical wiring col1 are determined.
[0047] The same is true for the general-purpose input / output ports 310G and 310H, and the input values of the general-purpose input / output ports 310A-310D are read when an "H" level signal is output for each of them. This allows the "on" / "off" states of the remaining switches SW02, SW12, SW22, SW32, SW03, SW13, SW23, and SW33 to be determined.
[0048] In the above-described circuit device 300, to determine the "on" / "off" states of the 16 switches SW00-SW33, eight general-purpose input / output ports 310 of the microcontroller 305 are occupied. In contrast, in the third embodiment described below, it is possible to reduce the number of occupied general-purpose input / output ports 310.
[0049] [Embodiment 3] A circuit device 400 of embodiment 3 will be described with reference to Fig. 4. The circuit device 400 includes a constant voltage source 405, a microcontroller 410, switches SW00-SW33, a first common resistor element 415, a second common resistor element 420, and voltage-dividing resistor elements R00-R33.
[0050] The circuit device 400 is a circuit device for a keyboard having a key matrix configuration, and is configured such that switches SW00-SW33 and voltage dividing resistors R00-R33 are connected to the intersections of grid-like wiring.
[0051] That is, four horizontal wirings row0-row3 are connected to general-purpose input / output ports 425A-425D of the microcontroller 410 as lines dedicated to analog input. Four vertical wirings col0-col3 branch off from a constant voltage source 405 via a first common resistor element 415. Switches SW00-SW33 and voltage-dividing resistor elements R00-R33 are connected in series to each intersection of the horizontal wirings row0-row3 and the vertical wirings col0-col3 to connect them to each other. A second common resistor element 420 is connected between each of the horizontal wirings row0-row3 and ground.
[0052] That is, when viewed from the perspective of the switches SWx0-SWx3 connected to any one horizontal wiring rowx, the configuration is as follows (x is any integer between 0 and 3): The switches SWx0-SWx3 are connected to a constant voltage source 405 via a first common resistor element 415 and branch into multiple paths, which are vertical wirings col0-col3, at least one of which can be selectively closed by the user. In each of these multiple paths, voltage-dividing resistor elements Rx0-Rx3, each with a different resistance value, are connected in series with the switches SWx0-SWx3. Furthermore, a second common resistor element 420 is connected in series between this branch circuit and ground, and the potential of a node between the branch circuit and the second common resistor element 420 is input to general-purpose input / output ports 425A-425D of the microcontroller 410.
[0053] The circuit device 400 has a configuration in which a plurality of branch circuits connected to one horizontal wiring rowx are connected in parallel, except for the first common resistor element 415.
[0054] Here, the resistance values of the voltage-dividing resistor elements Rxy connected to the same horizontal wiring rowx among the multiple horizontal wirings row0-row3 are selected to be different from each other (y is any integer between 0 and 3). More preferably, the resistance value of the voltage-dividing resistor elements Rxy connected to the same horizontal wiring rowx is selected to be a value that does not result in the same value even when the resistance values of any multiple resistor elements are summed up.
[0055] For example, the resistance value of the voltage-dividing resistor R00 connected at the intersection of horizontal wiring row0 and vertical wiring col0 is 50 kΩ. The resistance value of the voltage-dividing resistor R01 connected at the intersection of horizontal wiring row0 and vertical wiring col1 is 200 kΩ. The resistance value of the voltage-dividing resistor R02 connected at the intersection of horizontal wiring row0 and vertical wiring col2 is 500 kΩ. The resistance value of the voltage-dividing resistor R03 connected at the intersection of horizontal wiring row0 and vertical wiring col3 is 1 MΩ. The sum of the resistance values of any number of arbitrarily selected resistors from these four resistors will not be the same.
[0056] In the circuit device 400 configured as described above, power of a preset voltage value is supplied from the constant voltage source 405. The potential input to the general-purpose input / output port 425A of the microcontroller 410 is measured by an AD converter (not shown) of the microcontroller 410. Resistor elements R00-R03 with different resistance values are connected to the switches SW00-SW03 connected to the horizontal wiring row 0 that is connected to the general-purpose input / output port 425A. Therefore, a potential divided according to the resistor elements R00-R03 connected to the switch that is in the "ON" state is input to the general-purpose input / output port 425A, making it possible to determine which of the switches SW00-SW03 is "ON."
[0057] Furthermore, even if two or more of the switches SW00-SW03 are simultaneously in the "on" state, the potential determined by the voltage division ratio of the resistive elements connected to those switches is input to the general-purpose input / output port 425A, making it possible to determine which switch is "on."
[0058] Similarly, by measuring the potential input to the general-purpose input / output port 425B of the microcontroller 410 using an AD converter, it is possible to determine which of the switches SW10-SW13 connected to the horizontal wiring row1 are "on."
[0059] Similarly, by measuring the potential input to the general-purpose input / output ports 425C and 425D using an AD converter, the "on" / "off" state of the switches SW20-SW23 and SW30-SW33 connected to the horizontal wiring rows 2 and 3 can be determined.
[0060] According to the circuit device 400 configured as described above, in order to determine the "on" / "off" states of the 16 switches SW00-SW33, it is only necessary to occupy four general-purpose input / output ports 425A-425D of the microcontroller 410. Furthermore, even if multiple switches are in the "on" state at the same time, it is possible to accurately determine which switch is "on."
[0061] In the third embodiment, the "on" / "off" state of the switches SW00-SW33 is determined by using an AD converter to measure the potential input to the general-purpose input / output port 425 of the microcontroller 410. However, instead of the AD converter, a comparator may be used to compare the potential input to the general-purpose input / output port 425 with several predetermined thresholds to determine the "on" / "off" state of the switches SW00-SW33. [Explanation of symbols]
[0062] 100 circuit equipment 105 Constant voltage source 110 Branch Circuit 115 Common Resistance Element 120 Analog Switch 125 Multiple Routes 125A Route 1 125B Route 2 125C Route 3 130 Mechanical Switch 135 Resistor element 135A 1st voltage dividing resistor element 135B Second voltage dividing resistor element 135C 3rd voltage dividing resistor element 140 output nodes 145 microcontrollers 150 general-purpose input / output ports 155 input nodes 155A First Input Node 155B Second Input Node 155C Third Input Node 160A First Sensor 160B Second Sensor 160C 3rd sensor 165 displays 200 circuit equipment 205 Constant voltage source 210 Branch Circuit 215 Common Resistance Element 220 Analog switch for measurement 225 Output Analog Switch 230 Output Nodes 235 Mechanical Switch 240 Multiple Routes 240A Route 1 240B Route 2 240C Route 3 245 Resistive element 245A First shunt resistor element 245B Second shunt resistor element 245C 3rd shunt resistor element 250 Current Sensor 255 microcontroller 260 general-purpose input / output ports 300 circuit equipment 305 Microcontroller 310, 310A-310G General-purpose input / output ports 400 circuit equipment 405 Constant voltage source 410 Microcontroller 415 First common resistor element 420 Second common resistor element 425, 425A-425C General-purpose input / output ports D00-D33 Diodes R00-R33 Voltage dividing resistor element SW00-SW33 Mechanical Switches col0-col3 vertical wiring row0-row3 horizontal wiring
Claims
1. a branch circuit including a mechanical switch connected to a constant voltage source and branching into a plurality of paths, one of which is selectively closed by a user, and resistance elements having different resistance values connected in series with the mechanical switch in each of the plurality of paths; a common resistor element connected in series between the branch circuit and ground, and an analog switch controlled by a microcontroller to be opened and closed; A circuit device that inputs the voltage value of a node between the branch circuit and the common resistor element, or the voltage value of a node between the branch circuit and the analog switch, or the current value flowing through the branch circuit, to a general-purpose input / output port of the microcontroller.
2. 2. The circuit device according to claim 1, wherein the resistance element connected in series with the mechanical switch in each of the plurality of paths is a voltage dividing resistance element, and a node between the voltage dividing resistance element and the mechanical switch serves as an input node of an external circuit.
3. 3. The circuit device according to claim 2, wherein the mechanical switch is a single-pole, multi-throw mechanical switch having a single pole at a node between the branch circuit and the common resistor element and a multi-circuit at the resistor element side.
4. The circuit device according to claim 2 , wherein a single-pole, single-throw mechanical switch is provided in each of the plurality of paths.
5. the branch circuit is part of a current measurement circuit that receives a value representing the magnitude of a current flowing through the branch circuit as an input to a general-purpose input / output port of the microcontroller; the branch circuit includes shunt resistor elements having different resistance values connected in series with the mechanical switch, and a current sensor connected in parallel with the branch circuit; 2. The circuit device according to claim 1, wherein an output node to an external circuit is provided between the branch circuit, the common resistor element, and the analog switch via an output analog switch whose opening and closing is controlled by the microcontroller.
6. 6. The circuit device according to claim 5, wherein the mechanical switch is a single-pole, multi-throw mechanical switch in which the constant voltage source side is a single pole and the resistance element side is a multi-circuit, or in which a node between the branch circuit and the common resistance element is a single pole and the resistance element side is a multi-circuit.
7. The circuit device according to claim 5 , wherein a single-pole, single-throw mechanical switch is provided in each of the plurality of paths.
8. a branch circuit including a mechanical switch connected to a constant voltage source and branching into a plurality of paths, at least one of which is selectively closed by a user, and resistance elements having different resistance values connected in series with the mechanical switch in each of the plurality of paths; a common resistor element connected in series between the branch circuit and ground, A circuit device for a keyboard that inputs the potential of a node between the branch circuit and the common resistor element to a general-purpose input / output port of a microcontroller.
9. 9. The circuit device according to claim 8, wherein the resistance value of each of the resistance elements of the plurality of paths is selected so that the sum of the resistance values of a plurality of arbitrarily selected resistance elements does not become the same value.
10. 10. A circuit device for a keyboard, comprising a plurality of circuit devices according to claim 8 or 9 connected in parallel, and wherein the voltage values of the nodes between the branch circuits and the common resistor elements of each circuit device are input to the general-purpose input / output ports of a microcontroller.
Citation Information
Patent Citations
Wait mode reset circuit
JP2000155752A