Variable resistance circuit, chip and program-controlled resistance device

Through the variable resistance circuit integrating analog switch modules and resistor string modules, the limitations of traditional equipment in terms of performance, life and accuracy are solved, high-precision, low-power resistance control is achieved, and the switching quantity is output, which is suitable for a variety of test and control scenarios.

CN222887744UActive Publication Date: 2025-05-20GEEHY SEMICON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202421648024.3
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2025-05-20
Estimated Expiration
2034-07-11

AI Technical Summary

Technical Problem

Traditional mechanical relays and digital potentiometers have limitations in performance, life and accuracy, and are costly, making it difficult to meet the needs of a variety of test and control scenarios.

Method used

By integrating the analog switch module and the resistor string module, the analog switch module is used to adjust the output resistance value of the resistor string module, achieving high-precision, low-power variable resistance control and output switching quantity.

Benefits of technology

It improves the performance and application range of variable resistance circuits, solves the problems of short life and low accuracy of traditional equipment, and is suitable for a variety of test and control scenarios, while reducing cost and volume.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN222887744U_ABST
    Figure CN222887744U_ABST
Patent Text Reader

Abstract

The utility model discloses a variable resistor circuit, a chip and a program control resistor device, comprising an analog switch module comprising a plurality of analog switches, each analog switch being used for connecting a resistor string module; the analog switch module further comprises a first analog switch and a second analog switch, the first analog switch is connected with the resistor string module in series, and the second analog switch is connected with the resistor string module in parallel; the analog switch module is used for adjusting the output resistance value of the resistor string module through the state of the analog switch. The utility model further provides a chip which comprises the variable resistance circuit. The switching value can be output, the performance of the variable resistance circuit is improved, the application range of the variable resistance circuit is widened, and high-precision, low-power-consumption, small-size and high-response-speed variable resistance control is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to the technical field of analog integrated circuit design, and particularly relates to a variable resistance circuit, a chip and a programmable resistance device. Background Art

[0002] In electronic circuit testing and simulation, variable resistors are usually required to replace actual sensors or simulate the change of resistance values. However, common variable resistors have many limitations, such as relays and mechanical potentiometers, which have certain limitations in terms of performance, lifespan and accuracy. Although digital potentiometers solve some problems of mechanical wear, their working voltage range is limited, and their accuracy and resistance value range are also restricted, and the price is relatively high. Summary of the Utility Model

[0003] Embodiments of the utility model provide a variable resistance circuit, a chip and a programmable resistance device, which can output digital signals while improving the performance and application range of the variable resistance circuit, and realize variable resistance control with high precision, low power consumption, small size and fast response speed.

[0004] In a first aspect, the present application provides a variable resistance circuit, comprising:

[0005] An analog switch module, including a plurality of analog switches, each of the analog switches being used to connect to a resistor string module;

[0006] The analog switch module further includes a first analog switch and a second analog switch. The first analog switch is connected in series with the resistor string module, and the second analog switch is connected in parallel with the resistor string module; the analog switch module is used to adjust the output resistance value of the resistor string module through the states of the analog switches.

[0007] In some embodiments, the resistor string module includes a plurality of serially connected resistor elements, and each of the resistor elements is connected in parallel with one of the analog switches.

[0008] In some embodiments, each of the analog switches includes a signal input terminal, a drain and a source. The signal input terminal is used to receive a control signal, and the drain and the source of the analog switch are connected in parallel with the resistor element.

[0009] In some embodiments, the analog switch includes a pair of complementary first field effect transistors and second field effect transistors. The drains of the first field effect transistor and the second field effect transistor are connected to form the drain of the analog switch, the sources of the first field effect transistor and the second field effect transistor are connected to form the source of the analog switch, and the collectors of the first field effect transistor and the second field effect transistor are respectively connected to the output terminal of the signal input terminal, and the conduction / cutoff of the first field effect transistor and the second field effect transistor is controlled according to the control signal received by the signal input terminal.

[0010] In a second aspect, the present application further provides a chip, including a variable resistance circuit as described above.

[0011] In some embodiments, it further includes an interface module, which is connected to the analog switch module; and is used to control the state of the analog switch to change the output resistance value of the resistor string module.

[0012] In some embodiments, the interface module includes a digital interface, and a buffer is arranged in the digital interface, and the signal input end of each analog switch is connected to the buffer.

[0013] In some embodiments, the interface module further includes a logic control unit, a register or a counter; the input end of the logic control unit is connected to the digital interface, the output end of the logic control unit is connected to the input end of the register or the counter, and the output end of the register or the counter is connected to the analog switch module.

[0014] In some embodiments, the resistor string module is external to the chip, and the resistor string module is connected to the analog switch module of the chip.

[0015] In a third aspect, the present application further provides a programmable resistance device, including any one of the above-mentioned chips.

[0016] The present application provides a variable resistance circuit, a chip, and a programmable resistance device. By setting the analog switch module, while achieving high-precision and low-power consumption resistance adjustment, the switch quantity of the analog switch module can be output, greatly improving the performance and application range of the variable resistance circuit, solving the problems of short lifespan and low precision of traditional mechanical relays and digital potentiometers, and being applicable to various test and control scenarios; in addition, this integrated circuit is small in volume and low in cost, and is easy to be integrated into various electronic devices, significantly improving the test reliability and application flexibility of the circuit and the chip. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 Schematic circuit diagram of a relay as an electronic switch in the prior art;

[0018] Figure 2 Module schematic diagram of a variable resistance circuit provided by the present utility model;

[0019] Figure 3 Structural schematic diagram of another variable resistance circuit provided by the present utility model;

[0020] Figure 4 Applied to by the present utility model Figure 3 Schematic diagram of the analog switch structure of the variable resistance circuit shown;

[0021] Figure 5 Another analog switch structure diagram of the variable resistance circuit provided by the present utility model Figure 3 is shown in

[0022] Figure 6 Another structural schematic diagram of the variable resistance circuit provided by the present utility model;

[0023] Figure 7 A structural schematic diagram of a chip provided by the present utility model;

[0024] Figure 8 Another structural schematic diagram of a chip provided by the present utility model;

[0025] Figure 9 A structural schematic diagram of a programmable resistance device provided by the present utility model;

[0026] Figure 10 Another structural schematic diagram of a chip provided by the present utility model. Specific embodiments

[0027] The present utility model will be further described in detail below with reference to the accompanying drawings.

[0028] It should be clear that the described embodiments are only part of the embodiments of the present utility model, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present utility model without creative efforts belong to the scope protected by the embodiments of the present utility model.

[0029] The terms used in the embodiments of the present utility model are only for the purpose of describing specific embodiments, and are not intended to limit the embodiments of the present utility model. The singular forms "a", "the" and "said" used in the embodiments of the present utility model and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise.

[0030] In the related art, it is usually necessary to use variable resistors to replace actual sensors or simulate the change of resistance values. Common variable resistors have many limitations, such as relays and mechanical potentiometers, and these devices have certain limitations in terms of performance, lifespan and accuracy.

[0031] For example, a programmable adjustable resistor based on a relay, such as Figure 1As shown in the figure, a relay is used as an electronic switch. The level output by the I / O pin of the single-chip microcomputer is amplified in power by a triode and then drives the relay. Based on the above principle, the function of a programmable adjustable resistor can be realized. With the help of the single-chip microcomputer, functions such as upper computer communication can be realized, and an automated test system can be built. The on-resistance of the relay is extremely small, it has high voltage resistance, no polarity, and good electrical isolation performance. However, both the relay and the mechanical potentiometer rely on mechanical movement to change the resistance value, resulting in wear problems, short lifespan, and poor reliability. Mechanical wear will also affect the stability and accuracy of the resistance value. Similarly, due to the presence of mechanical components in the relay, it is difficult to make the device very small in size, resulting in a relatively large overall device volume and restricting its application scenarios.

[0032] To solve the problems of mechanical wear or the volume of mechanical devices in relays and mechanical potentiometers, digital potentiometers exist on the market. The programmable resistor can be adjusted through the digital interface of the digital potentiometer. Although the digital potentiometer solves some problems of mechanical wear, its working voltage range is limited, and its accuracy and resistance value range are also restricted, and the price is relatively high.

[0033] In addition, in related technologies, there is also a function of simulating a resistor through the constant resistance mode of an electronic load. However, an electronic load is generally used for power measurement and has functions such as a constant current mode. While having redundant functions, it has a large volume, a relatively high price, relatively few channels, and few applicable scenarios.

[0034] Furthermore, there is also a solution of controlling a motor to rotate a potentiometer, but it has high requirements for the accuracy of the motor, and there are prone to offset errors during the rotation of the motor, resulting in inaccurate adjustable resistors.

[0035] Embodiment 1

[0036] In view of the above deficiencies, this embodiment proposes a variable resistor circuit. By integrating an analog switch module and a resistor string module, the output resistance value of the resistor string module is adjusted through the analog switch module, realizing variable resistor control with high precision, low power consumption, small size, and fast response speed. At the same time, a switching quantity is output, improving the reliability and lifespan of the variable resistor circuit, and it is also applicable to a variety of electronic test and analog application scenarios.

[0037] Specifically, as Figure 2 shown, the variable resistor circuit includes an analog switch module 21. The analog switch module includes several analog switches; each of the analog switches is used to connect to a resistor string module 23. The analog switch module also includes a first analog switch and a second analog switch. The first analog switch is connected in series with the resistor string module, and the second analog switch is connected in parallel with the resistor string module; the analog switch module is used to adjust the output resistance value of the resistor string module through the states of the analog switches. The resistor string module 23 includes several resistive elements connected in series, and each of the resistive elements is connected in parallel with one of the analog switches.

[0038] The analog switch module is provided with a number of analog switches, namely Figure 3 S0, S1…Sn in Figure 3 . The analog switches can be connected or not connected to each other. The resistor string module includes a number of serially connected resistor elements, and each resistor element is connected in parallel with one of the analog switches. Connect a number of resistor elements, namely Figure 3 R0, R1, …, Rn in Figure 3 in series, and connect an analog switch in parallel at both ends of each resistor element. The first end of resistor element R0 is connected to resistor element R1, and the first end of resistor element Rn is connected to resistor element Rn-1. And the second ends of resistor element R0 and resistor element Rn are led out as the output end of the variable resistance circuit, and an external circuit is connected through this output end. Take this variable resistance circuit as a variable resistor, and adjust the output resistance value of the variable resistance circuit by adjusting the working state of the analog switches in the analog switch module.

[0039] When all the analog switches are off, the resistance value presented at the output end of this variable resistance circuit is the sum of all the resistors; when a certain analog switch is on, the corresponding resistor element is short-circuited, and the resistance of this resistor element connected to the external circuit is zero; when all the analog switches are on, all the resistor elements are short-circuited, and the resistance connected to the external circuit is zero.

[0040] The control of the analog switch can be based on the binary coding principle. For a given binary length, each resistor element is assigned a binary bit, and the resistance value is set to the weight corresponding to this binary bit. 0 and 1 of this bit respectively correspond to the on and off of the analog switch. The host computer or other control devices give an arbitrary binary number of this binary bit length. After the interface module receives this binary number, it outputs a signal to control the analog switch module. The analog switch module adjusts the on / off of the corresponding analog switch according to this signal, so as to determine the number of resistor elements connected in the resistor string module and the output resistance value, and provide the corresponding resistance value to the external circuit.

[0041] The binary coding principle of the resistor string module and the resistance value is as follows:

[0042] When Si = 0, the analog switch is on; when Si = 1, the analog switch is off, i = {1, 2, 3, …, n}, then the output resistance value Rout at this time is:

[0043] Rout = S0*R0 + S1*R1 + S2*R2 + □ + Sn*Rn.

[0044] In order to reduce the required number of resistor elements and analog switches, the selection of the resistance value is encoded according to binary multiples, that is, Ri = R0*2^i, i = {1, 2, 3, …, n};

[0045] The expression of the output resistance value Rout can be rewritten as:

[0046] Rout=S0*R0*2^0+S1*R0*2^1+S2*R0*2^2+□Sn*R0*2^n

[0047] =R0*(S0*2^0+S1*2^1+S2*2^2+□Sn*2^n)

[0048] =R0*A

[0049] Where A=S0*2^0+□+Sn*2^n is the formula for converting binary numbers to decimal numbers, that is, Sn…S2 S1 is a binary number.

[0050] The output resistance Rout expression is Rout=R0*A, which means that the resistance of Rout is R0 multiplied by a multiple A, and the value of A is represented by the binary number Sn…S2 S1. According to the binary correlation theory, an n-bit binary number represents 2^n values, so each resistor element in the resistor string module is encoded as a binary multiple. When there are n resistor elements and analog switches, 2^n output resistance values ​​can be output, with a resolution of R0.

[0051] For example, if n=8, R0=1Ω, the output resistance Rout can be one of 512 resistance values ​​between 0 and 511Ω, with a resolution of 1Ω; if n=10, Rout can be one of the resistance values ​​between 0 and R0*1023=1023Ω, with a resolution of 1Ω.

[0052] If Figure 4 is a schematic diagram of the analog switch structure provided in this embodiment. Each analog switch includes a signal input terminal, a drain, and a source. The signal input terminal is Figure 4 The Vn terminal is used to receive the control signal, the drain of the analog switch, that is, Figure 4 The D pole in and the source pole, that is, Figure 4 The S pole in the circuit is connected in parallel with the resistor element. The control signal is generally a level signal output by the host computer or microcontroller, and the opening / closing of the analog switch is determined according to the high and low levels of the level signal.

[0053] If Figure 4 As shown, the analog switch includes a pair of complementary first field effect tubes and second field effect tubes, the drains of the first field effect tube and the second field effect tube are connected to form the drain of the analog switch, the source of the first field effect tube and the second field effect tube are connected to form the source of the analog switch, the collectors of the first field effect tube and the second field effect tube are respectively connected to the output end of the signal input end, and the conduction / cutoff of the first field effect tube and the second field effect tube are controlled according to the control signal received by the signal input end.

[0054] ​The first field-effect transistor and the second field-effect transistor respectively use complementary N-MOSFET and P-MOSFET, that is, a CMOS structure, thereby achieving low power consumption of the analog switch. When the analog switch is in a static state, almost no current flows and the power consumption is low. Only when the state of the analog switch changes, there will be an instantaneous current flow, thus reducing the power consumption of this integrated circuit. In this structure, this analog switch has a high input impedance, does not require current to maintain the state of the switch, has low requirements for the input control signal, can quickly respond under different voltage conditions, is suitable for high-speed signal processing applications, and also avoids the problem that the conduction voltage value Vgs of traditional switches using MOSFET or triode as electronic switches needs to be greater than a certain value, resulting in a limited working range. At the same time, since the CMOS structure can work in a relatively wide voltage range, this analog switch is applicable to various power supply voltage conditions. The P-MOSFET is applicable to the high-voltage side, and the N-MOSFET is applicable to the low-voltage side. The complementary structure can cover a wider working voltage, and the output terminals can also be used reciprocally.

[0055] Exemplarily, when the control signal Vn is at a high level: the N-MOSFET is turned on, the P-MOSFET is turned off, and the analog switch is turned on; when the control signal Vn is at a low level: the P-MOSFET is turned on, the N-MOSFET is turned off, and the analog switch is turned off.

[0056] In this way, the analog switch can efficiently control the transmission of signals, and has the advantages of low power consumption, high speed and high reliability. At the same time, this analog switch is a semiconductor device, there is no mechanical loss, and the volume of the analog switch module is relatively small. Due to the limitation of device level, the working voltage of the current analog switch is relatively low. However, compared with relays and electronic loads, the on-resistance is relatively large, and it can be applied to scenarios with lower requirements for on-resistance. Using an analog switch in the circuit has the advantages of low cost, long life and high reliability.

[0057] Exemplarily, during the test of an air conditioner, the temperature change is simulated by a variable resistor to test the performance of the air conditioner. In the related art, the main control board of the outdoor unit of the air conditioner is provided with more than 3 thermistors. When testing the indoor unit and outdoor unit of a central air conditioner and other situations where multiple main control boards need to be tested simultaneously, at least ten adjustable resistors are required. In the air conditioner test, the working range of the thermistor is from -20°C to 100°C, and the internal resistance value is relatively large in this range, such as from 100Ω to 100kΩ. At this internal resistance, the on-resistance of the analog switch can be ignored. Simulating the temperature change through this variable resistor circuit has the advantages of low cost, small volume and programmable control.

[0058] Within the working conditions of this analog switch, its characteristics are very close to those of an ideal switch, and it can accurately transmit analog signals. For easy representation and viewing, the analog switch adopts Figure 5The schematic diagram shown, with the two signal terminals VDD and GND omitted in the figure.

[0059] The above circuit outputs different output resistance values to an external circuit through a virtual switch module and a resistor string module. However, there are certain limitations when the above circuit simulates an open circuit or a short circuit. The maximum output resistance is the total resistance value after all resistor elements are connected in series, and it is impossible to simulate an open circuit. When all analog switches are turned on, the output resistance of the resistor elements is 0 to simulate a short circuit. However, due to the internal resistance existing in the analog switch, the resistance value in the simulated short-circuit state is a small non-zero value and cannot be ignored.

[0060] As Figure 6 shown, the analog switch module further includes a first analog switch Ss, and the first analog switch Ss is connected in series with the resistor string module to add the function of simulating an open circuit. When the first analog switch Ss is closed, the function of the present circuit remains unchanged, and the output resistance value of the resistor string module is changed by controlling other analog switches. When it is necessary to simulate an open circuit, the first analog switch Ss is turned off, and the output resistance value of the resistor string module is infinite.

[0061] Furthermore, a second analog switch Sp is also provided in the analog switch module, and the second analog switch Sp is connected in parallel with the resistor string module to add the function of simulating a short circuit. When it is necessary to simulate a short circuit, the second analog switch Sp is closed, and the output resistance value of the resistor string module is 0, and only the internal resistance of the second analog switch Sp exists, so as to reduce the interference of the internal resistance of the analog switch to the circuit during the simulation of a short circuit.

[0062] In one implementation, the variable resistance circuit can separately set the first analog switch Ss or the second analog switch Sp to respectively implement the functions of simulating an open circuit or a short circuit. In another implementation, the present variable resistance circuit can simultaneously set the first analog switch Ss and the second analog switch Sp to add the functions of simulating an open circuit and a short circuit. Specifically, the first analog switch Ss is closed and the second analog switch Sp is turned off to simulate an open circuit state; the second analog switch Sp is closed to simulate a short circuit state.

[0063] Through the setting of the first analog switch and the second analog switch, the present circuit has the function of outputting a switch quantity. A switch quantity refers to a quantity that a system, device, or circuit can exhibit two states during the working process, usually the two states of "on" and "off", generally corresponding to the high level (1) and low level (0) of a digital signal respectively. The present circuit has the ability to switch between the two states of "on" and "off". In the present application, by controlling the states of the first analog switch Ss and the second analog switch Sp, the output of the switch quantity is realized. The control signal controls the opening and closing of the first analog switch Ss and the second analog switch Sp to form a simulated open circuit or a simulated short circuit, corresponding to the "off" or "on" state of the switch quantity respectively.

[0064] In this embodiment, by setting the first analog switch Ss and the second analog switch Sp, multiple output resistance values and digital signals of the resistor string module can be output, and the open-circuit state and short-circuit state can also be simulated, improving the reliability and flexibility of the system, and enabling it to be used in a variety of application scenarios, such as sensor testing and fault simulation.

[0065] Exemplarily, in the testing of switch-type sensors, such as pressure switches, water level switches, etc., their operating states will change under specific conditions. For example, when the air pressure exceeds the threshold, the pressure switch opens or closes; when the water level reaches the threshold height, the water level switch opens or closes. In the above tests, the circuit provided by this embodiment can be used to control the first analog switch Ss and / or the second analog switch Sp according to the digital signal to output corresponding actions to simulate the actions of the switch-type sensor.

[0066] For example, disconnecting the first analog switch Ss and the second analog switch Sp simulates that the switch-type sensor is in the off state; closing the second analog switch Sp simulates that the switch sensor is in the on state. By controlling the states of the first analog switch Ss and the second analog switch Sp, it can be tested whether the main control unit can correctly identify the state change of the switch-type sensor.

[0067] Exemplarily, a thermistor outputs a resistance value under normal operating conditions, but in the event of a fault, the thermistor may exhibit an open circuit or a short circuit. Therefore, the fault simulation of the thermistor can be carried out through this embodiment. During the test, the fault state of the thermistor is simulated by the output of the digital signal, so as to test whether the main control unit can correctly identify and handle the fault.

[0068] For example, when the thermistor is not inserted or the cable in the circuit is disconnected, the circuit exhibits an open circuit. Disconnecting the first analog switch Ss simulates the open-circuit fault to test whether the main control unit can identify the open-circuit state; when the cable in the circuit is pressed against a certain metal, the circuit exhibits a short circuit. Closing the second analog switch Sp simulates the short-circuit fault to test whether the main control board can identify the short-circuit state.

[0069] Embodiment 2

[0070] Based on the same inventive concept, the present application also provides a chip, including the variable resistance circuit as described in Embodiment 1. Integrating discrete devices into a single chip greatly reduces the wires and solder joints on the PCB, thereby reducing the resistance in series in the circuit and the solder joints, improving reliability and reducing the possibility of welding problems. At the same time, due to the reduction in the use of packaging and other materials, the application cost is reduced.

[0071] Such as Figure 7As shown in the figure, the analog switch module of the variable resistor circuit is integrated into the chip. The number of analog switches inside a single chip can be any number, such as 4, 8, 10, 16, etc., which is not limited here. For ease of viewing, in Figure 7 the first virtual switch Ss and the second virtual switch Sp of the first embodiment are not shown. The first virtual switch Ss and / or the second virtual switch Sp can be set in the chip according to actual needs, which is not limited here.

[0072] In one implementation, the resistor string module can be integrated into the chip together with the analog switch module without additional setting for easy and quick use. However, the resistance value of the fixed resistor element required by this setting method limits the application range of the chip. In another implementation, the resistor string module is connected to the chip in an external manner. By using an external resistor string module, the user can flexibly replace the resistor element according to actual needs, adjust the resolution and the accuracy of the resistor element, so that the chip has a more flexible application range. Moreover, the external resistor string can adjust the corresponding control process of the resistor element and the analog switch module according to actual conditions. For example, the control signal of the analog switch does not follow binary coding to meet special usage requirements.

[0073] This chip is also provided with an interface module, and the interface module is connected to the analog switch module; the signal input end of the analog switch module is connected to the output end of the interface module, and the level signal output from the output end of the interface module controls the state of the analog switch to change the output resistance value of the resistor string module. A buffer is set in the interface module, and the signal input end of each analog switch is connected to the buffer. As a digital interface between digital signals and analog signals in the interface module.

[0074] In one implementation, as Figure 8 shown in the figure, the digital interface further includes a bus interface or a logic control unit, a counter / register. The input end of the logic control unit is connected to the digital interface, the output end of the logic control unit is connected to the input end of the register or counter, and the output end of the register or counter is connected to the analog switch module.

[0075] Through the above settings, the MCU only needs very few IOs to control the resistance value, occupying fewer IO resources than discrete devices. The bus interface is an interface that allows multiple devices to exchange data on the same communication line, including buses such as I2C (Inter-Integrated Circuit), SPI (Serial Peripheral Interface), CAN (Controller Area Network), etc., which is convenient for the MCU to control.

[0076] The register interface is an interface that realizes device configuration and data transmission by controlling registers. It can be quickly accessed by the main control unit or other controllers and is used to configure device parameters or store temporary data. The counter interface is an interface used to count pulses or events and can record the number of occurrences of specific events. In this embodiment, the analog switch can be controlled through a bus interface or an interface with a counter / register. Exemplarily, when connecting the analog switch using the register interface, the main control unit sets the value of the register through the digital interface, and the Bn to B0 bits of the register control the opening / closing of the corresponding analog switch.

[0077] Furthermore, the main control unit can set the corresponding logic of the logic control unit through the digital interface, adjust the corresponding value in the register, thereby adjusting the output resistance value of the resistor string element, and thus adding functions such as setting the change rate of the resistance and the resistance ramp.

[0078] Embodiment Three

[0079] As Figure 9 shown, based on the chip provided in this embodiment, the present application also provides a programmable resistance device. For the convenience of describing the principle, Figure 9 the analog switch module and the resistor string module used therein are only 4-bit, and the first analog switch Ss and the second analog parallel switch Sp are not drawn. In actual applications, it should be 8-bit or more and include the first analog switch Ss and the second analog parallel switch Sp. Figure 9 The programmable resistance device described therein is a PCB, and the core is a variable resistance circuit composed of the chip and the resistor string module provided in this embodiment. On this basis, an MCU and a 485 communication circuit are added. After the MCU receives the instructions from the PC host computer through the 485 bus, it communicates with the analog switch chip through I2C, and outputs different output resistance values according to the instructions of the host computer, so as to test the device under test. Figure 9 The device under test described therein is an application system, and the device under test can be adjusted according to the actual situation.

[0080] The following further explains and illustrates by taking the device under test as the air conditioner main control board. As Figure 9 shown, the device under test herein takes the air conditioner main control board as an example.

[0081] In actual applications, the working principle of the resistive sensor is to convert physical quantities into resistance values, thereby realizing the conversion from the measured quantity to the electrical quantity. Common resistive sensors include strain gauges, thermistors, photoresistors, etc. In addition, some sensors only output switch quantities, such as reed switches and various protection switches.

[0082] In an air conditioning system, there are a large number of pressure sensors, temperature sensors, and digital input sensors. Just for a single outdoor unit main control board, there are at least three thermistors for ambient temperature, exhaust temperature, and condenser temperature. In addition, there are also digital input sensors such as pressure protection switches and water level switches. In a central air conditioning system, multiple indoor units and outdoor units usually work together, and the number of sensors doubles compared to a single main control board. During the development of air conditioners, in order to verify the control logic, variable resistors are often used to replace thermistors to simulate the working conditions of the system at different temperatures for each part, and ordinary switches are used to replace protection switches to verify whether the protection function can be triggered.

[0083] Figure 9 The device under test is a temperature sensing circuit, that is, a voltage divider composed of a thermistor and R2. During the test, the thermistor is removed and replaced with a programmable resistance device containing this chip. The PC host computer sends different instructions to the programmable resistance device. After receiving the instructions, the MCU outputs corresponding control signals through the interface module, changes the state of the analog switch according to the control signals, so that the output resistance value of the programmable resistance device changes according to the instructions, showing different temperature values collected by the device under test.

[0084] Moreover, the programmable resistance device can also output digital input signals of open circuit and short circuit to simulate the situation of thermistor failure. The working principle of this process is the same as that of Embodiment 1 and will not be elaborated here.

[0085] Since the virtual switch uses semiconductor devices and has a small volume, multiple resistance output circuits composed of this chip and the resistor string module can be set in a single programmable resistance device to achieve multi-channel resistance output and make full use of the MCU resources.

[0086] Moreover, multiple programmable resistance devices can be connected to the 485 bus, and the PC host computer controls multiple programmable resistance devices at the same time to expand the resistance output, thereby improving the test efficiency and realizing automated testing.

[0087] It should be noted that the programmable resistance device is electrically isolated from the PC host computer through the optocoupler isolation module, but the programmable resistance device and the device under test share the same ground to ensure the consistency and accuracy of the electrical signals, so as to ensure the normal operation of the test process and the reliability of the test results, and meet the working conditions of the analog switch.

[0088] As Figure 10 shown, the programmable resistance device can also be applied to an amplifier circuit with a programmable amplification factor. In an amplifier circuit, generally, different resistance values are used to adjust the amplification factor, realize the program control of the resistance value, and then the amplification factor can be controlled by the program.

[0089] Taking Figure 10Taking the circuit shown as an example, it includes a dual-power operational amplifier amplification circuit. A variable resistance circuit composed of a chip and a resistor string module is used to replace the feedback resistor Rf to adjust the amplification factor. As Figure 10 shown, where the resistance element R0 is 1 kΩ, the resistance element R1 is 2 kΩ, the resistance element R2 is 4 kΩ, and the resistance element R3 is 8 kΩ. Therefore, the variable resistance circuit can output a total of 15 resistance values between 0 kΩ and 15 kΩ, thereby adjusting the amplification factor to 1 to 15 times, a total of 15 gears, to meet the usage requirements of the amplification circuit.

[0090] The temperature sensing circuit in the device under test is a voltage divider composed of a thermistor and R2. Now, the thermistor is removed and replaced with a programmable resistance device. The host computer sends different instructions to the programmable resistance device, and the resistance value output by the programmable resistance device changes according to the instructions, which is reflected as different temperature values collected in the device under test.

[0091] Furthermore, the resistance value range can be extended by cascading multiple chips; or the voltage division ratio can be adjusted by using a programmable variable resistor, and the operational amplifier is configured as a voltage follower, realizing the combination of a resistor voltage divider and a voltage follower, so as to provide other application scenarios such as adjustable voltage reference.

[0092] This application provides a variable resistance circuit, a chip, and a programmable resistance device. By setting the analog switch module, high-precision and low-power resistance adjustment can be achieved while digital signals can be output, solving the problems of short lifespan and low precision of traditional mechanical relays and digital potentiometers, and being applicable to various test and control scenarios; in addition, this integrated circuit is small in size, low in cost, and easy to integrate into various electronic devices, significantly improving the test reliability and application flexibility of the circuit and the chip.

[0093] The above are only some embodiments of the present invention. For those of ordinary skill in the art, without departing from the inventive concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention.

Claims

1. A variable resistor circuit, characterized in that: include: An analog switch module, comprising a plurality of analog switches, each of which is used to connect to a resistor string module; The analog switch module also includes a first analog switch and a second analog switch, the first analog switch is connected in series with the resistor string module, and the second analog switch is connected in parallel with the resistor string module; the analog switch module is used to adjust the output resistance of the resistor string module according to the state of the analog switch.

2. The circuit according to claim 1, characterized in that The resistor string module includes a plurality of resistor elements connected in series, and each of the resistor elements is connected in parallel with an analog switch.

3. The circuit according to claim 2, characterized in that Each of the analog switches comprises a signal input terminal, a drain, and a source. The signal input terminal is used to receive a control signal. The drain and source of the analog switch are connected in parallel with the resistor element.

4. The circuit according to claim 3, characterized in that The analog switch includes a pair of complementary first field effect transistors and second field effect transistors. The drains of the first field effect transistor and the second field effect transistor are connected to form the drain of the analog switch. The source of the first field effect transistor and the second field effect transistor are connected to form the source of the analog switch. The collectors of the first field effect transistor and the second field effect transistor are respectively connected to the output end of the signal input end. The conduction / cutoff of the first field effect transistor and the second field effect transistor are controlled according to the control signal received by the signal input end.

5. A chip, characterized in that: It comprises a variable resistance circuit as claimed in any one of claims 1 to 4.

6. The chip according to claim 5, characterized in that: It also includes an interface module, which is connected to the analog switch module; the interface module is used to control the state of the analog switch to change the output resistance of the resistor string module.

7. The chip according to claim 6, characterized in that: The interface module comprises a digital interface, a buffer is arranged in the digital interface, and the signal input end of each analog switch is connected to the buffer.

8. The chip according to claim 7, characterized in that: The interface module also includes a logic control unit, a register or a counter; the input end of the logic control unit is connected to the digital interface, the output end of the logic control unit is connected to the input end of the register or the counter, and the output end of the register or the counter is connected to the analog switch module.

9. The chip according to claim 5, characterized in that: The chip has an external resistor string module, and the resistor string module is connected to the analog switch module of the chip.

10. A programmable resistor device, characterized in that: Comprising a chip as described in any one of claims 5-9.