Multi-threshold bidirectional switched capacitor voltage comparator and its detection method
By using a multi-threshold bidirectional switched-capacitor voltage comparator, multi-threshold and bidirectional detection can be achieved using a single switched-capacitor comparison unit. This solves the problems of redundant hardware resources and high complexity of peripheral control in existing technologies, and realizes efficient and low-power multi-threshold detection.
Patent Information
- Application Number
- CN202611417298.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-11
- Publication Date
- 2026-11-10
AI Technical Summary
Existing voltage comparators suffer from problems such as redundant hardware resources, large chip area, high power consumption, and increased complexity of peripheral control when multiple thresholds and bidirectional detection are required. In particular, errors affect the detection accuracy in differential signal detection.
A multi-threshold bidirectional switched-capacitor voltage comparator is adopted. Through a switched-capacitor comparison unit, a multi-threshold reference selection and input direction switching unit are used to realize multiple detection thresholds and bidirectional detection. Time division multiplexing and internal timing control signals are used for automatic switching, reducing the number of comparators and reducing power consumption.
It achieves high efficiency, low power consumption, and low complexity for multi-threshold and bidirectional detection, reducing chip area and peripheral control complexity, and improving detection accuracy and system integration.
Smart Images

Figure CN123074458A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of integrated circuit technology, specifically to a switched capacitor voltage comparator and its detection method. Background Technology
[0002] With the development of integrated circuit technology, voltage detection circuits are widely used in various on-chip detection, status monitoring, and control circuits. In some applications, the signal to be detected does not only need to be compared with a single fixed reference voltage, but also needs to be compared with multiple different reference thresholds to determine whether the signal exceeds different detection thresholds, or to further determine the voltage range of the signal. Therefore, detection circuits typically need to have multi-threshold detection capabilities.
[0003] In existing multi-threshold detection schemes, one approach is to set up separate comparators for different detection thresholds. Multiple comparators are used in parallel to compare the signal to be detected with different reference voltages and output the corresponding comparison results. This method can obtain detection results for multiple thresholds simultaneously. However, as the number of detection thresholds increases, a corresponding number of comparators, along with their corresponding bias, timing, and output circuits, are required. This not only increases the circuit size but also leads to increased chip area and power consumption, hindering the miniaturization and high integration design of the detection circuit. The redundant configuration of comparator resources is particularly noticeable when multiple detection thresholds need to be set.
[0004] Another approach is to use a single comparator to compare the voltages sequentially with different reference voltages, thereby reducing the number of comparators through time-division multiplexing. However, this method typically requires external control logic to control the input of different reference voltages according to a predetermined detection sequence and to coordinate the sampling, comparison, and result storage processes of the comparators. As the number of detection thresholds increases or the detection mode changes, the complexity of the external control logic also increases. Furthermore, a corresponding control interface needs to be set up between the comparator and the external control circuit, further increasing the system design complexity.
[0005] Furthermore, in some differential signal detection scenarios, the differential input signals to be detected may need to be detected in two opposite directions. For example, for differential input signals VIP and VIN, VIP-VIN needs to be detected in one detection direction, while VIN-VIP needs to be detected in the other. Existing solutions typically require additional input polarity switching circuits and corresponding external control signals, or separate detection paths for different detection directions, thereby further increasing hardware resources and control complexity.
[0006] For comparators employing switched-capacitor structures, they typically sample the input and reference signals using differential capacitors. During the comparison phase, charge redistribution converts the difference between the input and reference signals into a voltage change at the comparison node, which is then amplified and latched to output the comparison result. This type of comparison method can achieve low-power comparison using charge domain processing mechanisms and is suitable for differential signal detection. However, when multiple detection thresholds and different detection directions need to be implemented simultaneously in the same detection circuit, configuring corresponding comparison paths separately still results in issues such as hardware resource duplication, large chip area, and high power consumption. Furthermore, using external timing control to switch thresholds and directions increases the complexity of external control.
[0007] Furthermore, during differential comparison, factors such as the comparator's own input offset, charge injection, and switching parasitic parameters may introduce fixed deviations into the detection results. For detection methods using only a single detection direction, these errors may continuously act on the same detection direction, thus affecting the detection accuracy of small differential signals. In existing technologies, additional offset calibration or error compensation circuits are typically required to reduce the impact of these factors on the detection results, which further increases circuit complexity and hardware overhead.
[0008] Therefore, a new voltage comparator and detection scheme are urgently needed. Summary of the Invention
[0009] To address the above problems, this application provides a multi-threshold bidirectional switched-capacitor voltage comparator, comprising: a switched-capacitor comparison unit, used to perform charge domain comparison based on the input charge corresponding to the differential input signal to be detected and the reference charge corresponding to the reference voltage, and output the comparison result; a multi-threshold reference selection unit, connected to the switched-capacitor comparison unit, used to switch between multiple reference voltages and load the reference charge corresponding to different reference voltages onto the switched-capacitor comparison unit; an input direction switching unit, connected between an external differential input terminal and the switched-capacitor comparison unit, used to switch the connection polarity of the differential input signal to be detected, so that the switched-capacitor comparison unit performs comparison based on a first-direction differential input signal and a second-direction differential input signal respectively; and a timing control module, used to generate timing signals to control the operation of the switched-capacitor comparison unit, the multi-threshold reference selection unit, and the input direction switching unit; wherein, the switched-capacitor voltage comparator performs time-division multiplexing selection of multiple reference voltages through the multi-threshold reference selection unit and switches the connection polarity of the differential input signal to be detected through the input direction switching unit, so that one switched-capacitor comparison unit can realize multiple detection thresholds and detection in two detection directions.
[0010] This application achieves multiple detection thresholds and bidirectional detection by using a switched capacitor comparator unit in conjunction with multiple threshold reference multiplexing and input direction switching, thereby reducing the number of comparators and lowering chip area and power consumption.
[0011] Optionally, the switched capacitor comparison unit includes: a first differential capacitor pair, a second differential capacitor pair, a preamplifier, and a latch amplifier; wherein, the first differential capacitor pair is used to acquire the input charge corresponding to the differential input signal to be detected; the second differential capacitor pair is used to acquire the reference charge corresponding to the reference voltage; the first differential capacitor pair and the second differential capacitor pair are connected to the input terminal of the preamplifier; during the comparison stage, the input charge and the reference charge are redistributed to form a comparison voltage at the input terminal of the preamplifier; the preamplifier is used to initially amplify the comparison voltage; the latch amplifier is used to amplify and latch the initially amplified comparison voltage and output the comparison result.
[0012] This application improves comparison accuracy and reduces the comparator's static power consumption by comparing the input charge with the reference charge in the charge domain. Furthermore, the sampling and charge redistribution mechanism helps improve comparison stability.
[0013] Optionally, the first differential capacitor pair includes a first sampling capacitor and a second sampling capacitor; the first sampling capacitor and the second sampling capacitor are respectively connected to the two input terminals of the differential input signal to be detected, and are used to sample the differential input signal; the second differential capacitor pair includes a first reference capacitor and a second reference capacitor, the first reference capacitor and the second reference capacitor are respectively connected to the reference voltage input terminal, and are used to sample the reference voltage.
[0014] This application achieves fully differential sampling through a first differential capacitor pair and a second differential capacitor pair, thereby improving the ability to resist common-mode interference and the comparison stability.
[0015] Optionally, the multi-threshold reference selection unit includes: multiple reference voltage input terminals Vrefp1, Vrefp2, ..., Vrefpk; and multiple reference selection switches respectively connected between the multiple reference voltage input terminals and the second differential capacitor pair; under the control of the threshold selection control signal, the multiple reference selection switches selectively turn on the reference selection switch corresponding to the target reference voltage input terminal, so that the reference charge corresponding to the target reference voltage is loaded onto the second differential capacitor pair.
[0016] This application achieves time-division detection of multiple detection thresholds by multiple reference voltages reusing the same comparison unit, thereby improving the hardware reuse rate.
[0017] Optionally, the multi-threshold reference selection unit further includes a base reference voltage terminal Vrefn; the plurality of reference voltage input terminals respectively form differential reference voltages with the base reference voltage terminal Vrefn: Vrefp1-Vrefn; Vrefp2-Vrefn; ...; Vrefpk-Vrefn; to form a plurality of detection thresholds.
[0018] This application uses differential reference voltages to form multiple detection thresholds, thereby improving the consistency of the reference voltage and the detection accuracy.
[0019] Optionally, the input direction switching unit includes multiple input switching switches; the multiple input switching switches are connected between the external differential input terminal and the first differential capacitor pair; by controlling the conduction state of the multiple input switching switches, the connection relationship between the differential input signal to be detected and the first differential capacitor pair is changed; wherein, in the first connection state, the multiple input switching switches connect the positive terminal input voltage VIP and the negative terminal input voltage VIN of the differential input signal to be detected to the first differential capacitor pair according to the first polarity, so as to form an effective differential voltage to be measured in the first direction, Vdiff, satisfying: Vdiff = VIP - VIN; In the second connection state, the plurality of input switching switches interchange the connection positions of the positive terminal input voltage VIP and the negative terminal input voltage VIN with the first differential capacitor pair to form an effective differential voltage under test Vdiff in the second direction opposite to the first direction, satisfying: Vdiff = VIN - VIP; Wherein, VIP is the positive terminal input voltage of the differential input signal to be detected, VIN is the negative terminal input voltage of the differential input signal to be detected, and Vdiff is the effective differential voltage to be measured applied to the first differential capacitor pair after being switched by the input direction switching unit.
[0020] This application enables both forward and reverse detection directions by switching the input connection relationship, thereby increasing the detection range and providing a basis for error cancellation.
[0021] Optionally, the input direction switching unit switches the input polarity according to the internally generated direction control signal; the direction control signal includes a first direction control signal POL1 and a second direction control signal POL2; when POL1 is valid, the input direction switching unit establishes a first input connection relationship; when POL2 is valid, the input direction switching unit establishes a second input connection relationship.
[0022] This application automatically switches the input direction using an internal direction control signal, eliminating the need for an external direction control interface and improving system integration.
[0023] Optionally, the direction control signal is generated by the direction control logic based on the sampling clock signal and the comparison clock signal generated by the timing control module; the direction control logic includes at least one of the following: a frequency divider circuit, a counter, a state machine, a flip-flop, a latch, or a combinational logic circuit.
[0024] This application uses configurable digital logic to generate direction control signals, improving the flexibility and compatibility of the direction control circuit.
[0025] Optionally, the timing control module includes: a clock division unit; a non-overlapping clock generation unit; and a latch control clock generation unit; wherein the clock division unit is used to generate an internal working clock based on an external input clock signal; the non-overlapping clock generation unit is used to generate a first phase clock signal ck1 and a second phase clock signal ck2; and the latch control clock generation unit is used to generate a latch control signal CKSA based on the second phase clock signal ck2.
[0026] This application generates sampling, comparison, and latching timing based on a single clock, ensuring that each functional module works collaboratively according to the predetermined timing, thereby improving detection reliability.
[0027] Optionally, the first phase clock signal ck1 is used to control the switched capacitor comparator to perform input signal sampling and reference voltage sampling; the second phase clock signal ck2 is used to control the switched capacitor comparator to perform charge redistribution and comparison; and the latch control signal CKSA is used to control the latch amplifier to latch the comparison result.
[0028] The sampling, comparison, and latching processes in this application are controlled in stages to reduce timing conflicts and improve comparison accuracy.
[0029] Optionally, it also includes a threshold scanning control module; the threshold scanning control module is used to generate multiple threshold selection signals in sequence according to the detection time sequence: sel1, sel2, ..., selk; wherein, within the same detection period, only one threshold selection signal is valid.
[0030] This application automatically selects multiple detection thresholds in sequence to achieve automatic scanning for multi-threshold detection.
[0031] Optionally, the threshold scanning control module includes: a state machine; a counter; and gating signal generation logic; wherein: the state machine is used to control the state transitions between different detection stages; the counter is used to determine the current detection threshold number; and the gating signal generation logic is used to generate a corresponding threshold selection signal based on the current state and the threshold number.
[0032] This application generates a threshold selection signal using a state machine and a counter, thereby improving the stability and scalability of the threshold scanning process.
[0033] Optionally, the threshold scanning control module performs a logical combination of the threshold selection signal and the clock signal generated by the timing control module to generate: ck11~ck1k; and: ck21~ck2k; wherein ck11~ck1k is used to control the sampling process corresponding to different detection thresholds; and ck21~ck2k is used to control the comparison process corresponding to different detection thresholds.
[0034] This application generates detection control signals corresponding to each threshold by combining the threshold selection signal with the clock signal, ensuring that the detection processes of different thresholds do not interfere with each other.
[0035] Optionally, the threshold scanning control module selects multiple reference thresholds according to: sequential scanning mode, cyclic scanning mode, priority scanning mode, or custom scanning mode.
[0036] This application supports multiple threshold scanning strategies, improving the flexibility of detection methods and adapting to different application needs.
[0037] Optionally, it also includes a configuration control module; the configuration control module includes: a configuration register; a threshold enable register; and a scan mode register; wherein, the configuration register is used to set the number of detection thresholds to be enabled, the threshold scan order, and the detection cycle; the threshold enable register is used to mask reference thresholds that do not need to participate in the detection; and the scan mode register is used to configure the threshold scan mode.
[0038] This application supports the configurability of the number of detection thresholds, scanning methods, and detection cycles, thereby improving the versatility and adaptability of the detection circuit.
[0039] Optionally, it also includes a detection result latching module; the detection result latching module is connected to the output of the latch amplifier and is used to store the comparison results corresponding to different detection cycles.
[0040] This application can save the comparison results corresponding to each detection threshold, providing a data basis for subsequent interval judgment.
[0041] Optionally, the detection result latching module includes multiple result latching units; Each of the aforementioned result latching units corresponds to a detection threshold, which is used to store the comparison result output by the latch amplifier in the detection period corresponding to the detection threshold; The multiple result latching units output detection results OC1, OC2, ..., OCk corresponding to each detection threshold, where OC1, OC2, ..., OCk correspond to the comparison results of the first detection threshold, the second detection threshold, ..., the kth detection threshold, respectively.
[0042] This application outputs multiple detection results corresponding to different thresholds or detection directions, which facilitates the unified management and reading of multi-threshold detection results.
[0043] To achieve the aforementioned objectives, this application provides a detection method based on the multi-threshold bidirectional switched-capacitor voltage comparator described above, comprising: Select the target reference voltage from multiple reference voltages according to the detection requirements; During the sampling phase corresponding to the first phase clock signal ck1, the differential input signal to be detected is sampled through the first differential capacitor, and the reference charge corresponding to the target reference voltage is sampled through the second differential capacitor. During the comparison phase corresponding to the second phase clock signal ck2, a comparison voltage is formed by redistributing the input charge and the reference charge, and the comparison result corresponding to the detection threshold is output. During the sampling phase and the comparison phase, the corresponding input connection state is established by controlling the input direction switching unit to form the differential input to be detected in the corresponding detection direction; Select different reference voltages in sequence and repeat the above sampling, comparison and input connection status control steps; Obtain detection results corresponding to multiple detection thresholds and multiple detection directions.
[0044] This application improves detection efficiency by switching reference thresholds and input directions to complete the detection of multiple thresholds and multiple directions.
[0045] Optionally, the detection method further includes determining the voltage range of the differential input signal to be detected based on multiple comparison results corresponding to different detection thresholds and different detection directions.
[0046] This application determines the range of the signal to be detected based on multiple comparison results, thereby achieving range-based detection of the input voltage and improving detection resolution.
[0047] In summary, this application achieves fully automatic bidirectional multi-threshold interval scanning detection without external intervention by integrating a threshold scanning control module and direction control logic within a single switched-capacitor comparator unit and co-driving it with a non-overlapping clock. Compared to existing technologies, this application eliminates the reliance on frequent control commands and multi-pin control interfaces from external main controllers (MCU / DSP), significantly reducing the complexity of the system control interface, greatly reducing the number of chip pins and the chip area occupied by the control logic, while improving the overall response speed and anti-interference capability of multi-interval level detection. Attached Figure Description
[0048] Figure 1A schematic diagram of the structure of a multi-threshold bidirectional switched-capacitor voltage comparator provided for an embodiment of this application; Figure 2 A partial structural schematic diagram of a multi-threshold bidirectional switched-capacitor voltage comparator provided for embodiments of this application; Figure 3 A partial structural schematic diagram of the input direction switching unit in a multi-threshold bidirectional switched capacitor voltage comparator provided for embodiments of this application; Figure 4 A schematic diagram of the threshold scanning control module in a multi-threshold bidirectional switched capacitor voltage comparator provided for embodiments of this application; Figure 5 A timing logic diagram of the clock signal and input direction signal in a multi-threshold bidirectional switched capacitor voltage comparator provided for embodiments of this application; Figure 6 A timing logic diagram of the threshold selection signal and clock signal in a multi-threshold bidirectional switched capacitor voltage comparator provided for embodiments of this application; Figure 7 This is a schematic diagram illustrating the logical combination of the threshold selection signal and the clock signal generated by the timing control module in an embodiment of this application. Figure 8 This is a schematic diagram of the working process of the multi-threshold bidirectional switched capacitor voltage comparator provided in the embodiment of this application in the cyclic working mode; Figure 9 This is a schematic diagram of the operation of the multi-threshold bidirectional switched capacitor voltage comparator provided in the embodiments of this application during the 20 mV positive direction detection and sampling stage; Figure 10 This is a schematic diagram of the operation of the multi-threshold bidirectional switched capacitor voltage comparator provided in the embodiments of this application during the 20 mV positive direction detection and comparison stage. Figure 11 This is a schematic diagram of the operation of the multi-threshold bidirectional switched capacitor voltage comparator provided in the embodiments of this application during the 40 mV reverse detection sampling stage; Figure 12 This is a schematic diagram of the operation of the multi-threshold bidirectional switched capacitor voltage comparator provided in the embodiment of this application during the 40 mV reverse detection and comparison stage. Figure 13 This is a schematic diagram of the operation of the multi-threshold bidirectional switched capacitor voltage comparator provided in the embodiments of this application during the 60 mV positive direction detection and sampling stage; Figure 14 This is a schematic diagram of the operation of the multi-threshold bidirectional switched capacitor voltage comparator provided in the embodiments of this application during the 60 mV positive direction detection and comparison stage. Figure 15This is a schematic diagram of the operation of the multi-threshold bidirectional switched capacitor voltage comparator provided in the embodiments of this application during the 100 mV reverse detection sampling stage; Figure 16 This is a schematic diagram of the operation of the multi-threshold bidirectional switched capacitor voltage comparator provided in the embodiments of this application during the 100 mV reverse detection and comparison stage. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0050] like Figure 1 and Figure 2 As shown, this embodiment provides a detection circuit based on a switched capacitor comparator, including: a switched capacitor comparison unit 100, which compares the input charge corresponding to the differential input signal to be detected with the reference charge corresponding to the reference voltage in the charge domain and outputs the comparison result. Specifically, the switched capacitor comparison unit 100 includes: a first differential capacitor pair; a second differential capacitor pair; a preamplifier AMP1; and a latch amplifier AMP2.
[0051] The multi-threshold reference selection unit 200 is connected to the switched capacitor comparison unit 100 and is used to switch between multiple reference voltages and load the reference charge corresponding to different reference voltages into the switched capacitor comparison unit 100. The input direction switching unit 300 is connected between the external differential input terminal and the switched capacitor comparison unit 100. It is used to switch the connection polarity of the differential input signal to be detected, so that the switched capacitor comparison unit 100 performs comparison based on the first direction differential input signal and the second direction differential input signal respectively. The timing control module 400 is used to generate timing signals to control the operation of the switched capacitor comparison unit 100, the multi-threshold reference selection unit 200, and the input direction switching unit 300. The switched capacitor voltage comparator uses a multi-threshold reference selection unit 200 to perform time-division multiplexing selection of multiple reference voltages and an input direction switching unit 300 to switch the connection polarity of the differential input signal to be detected, so that a single switched capacitor comparator unit 100 can realize multiple detection thresholds and detection in two detection directions.
[0052] It should be noted that the expression "comparing the input charge corresponding to the differential input signal to be detected and the reference charge corresponding to the reference voltage in this embodiment" is intended to define the comparison dimension of the signal from a physical perspective, so as not to be narrowly understood as limited to the direct physical comparison of specific voltage signals.
[0053] Specifically, within the physical framework of the charge domain, the input signal or reference voltage can be converted into the corresponding charge quantity through various electrical performance conversion methods (i.e., satisfying the relational expression). or "Charge domain comparison" refers to the process of controlling the charges on the first and second differential capacitor pairs in a timely manner (e.g., through zeroing, sampling, charge transfer, or charge sharing stages) to algebraically superimpose or differentially reduce the input charge and reference charge at a specific node (such as the input node of preamplifier AMP1). This converts the remaining amount or polarity of the charge into a voltage change, which is then finally locked by latch amplifier AMP2.
[0054] Those skilled in the art should understand that this charge-domain-based comparison mechanism not only encompasses the traditional switched-capacitor architecture that directly samples the input voltage / reference voltage onto the capacitor array for voltage difference comparison, but also includes the following non-limiting equivalent variations: Current-charge integration conversion scheme: Integrate the input differential current or reference current over a specific time period to convert it into the corresponding input charge and reference charge, and then perform intra-domain comparison. Charge pump or parasitic charge sharing scheme: using nonlinear switching networks, charge pumps, or inherent parasitic capacitance in the circuit to distribute, transfer, and compare residual charges; Multi-voltage / capacitor ladder combination scheme: By changing the combination of the dynamic capacitance (C) and voltage (V) of the capacitor array, multiple threshold comparisons of total charge are achieved under the principle of charge conservation.
[0055] The physical essence of using "charge domain comparison" is that, regardless of whether the specific circuit topology relies on voltage variation to trigger charge transfer or on current accumulation to achieve charge domain balance, as long as its core comparison logic is based on the charge balance state induced by the differential input terminal and the reference terminal to determine the comparison result, it falls within the protection scope of this application.
[0056] This implementation utilizes internal logic to automatically generate direction switching signals and multi-threshold control signals, eliminating the need for complex external control timing sequences. After configuring the detection parameters, only a working clock input is required for the internal timing logic to automatically complete threshold selection, input direction switching, and comparison detection, reducing external control complexity and improving system integration. Furthermore, since control and detection can be independently completed using a single switched-capacitor comparator unit, it can still operate stably even in the event of external logic circuit failure, thereby improving system stability. Through scalable clock division and encoding logic, this implementation can also support multiple detection thresholds in both forward and reverse directions via time-division multiplexing, exhibiting excellent scalability.
[0057] Continue to refer to Figure 2 The switched capacitor comparison unit 100 includes: a first differential capacitor pair, a second differential capacitor pair, a preamplifier AMP1, and a latch amplifier AMP2; wherein, the first differential capacitor pair is used to acquire the input charge corresponding to the differential input signal to be detected; the second differential reference pair is used to acquire the reference charge corresponding to the reference voltage; the first differential capacitor pair and the second differential capacitor pair are connected to the input terminal of the preamplifier AMP1; during the comparison stage, the input charge and the reference charge are redistributed to form a comparison voltage at the input terminal of the preamplifier AMP1; the latch amplifier AMP2 is used to amplify and latch the comparison voltage and output the comparison result.
[0058] During the sampling phase: the first differential capacitor pair acquires the input voltage charge; the second differential capacitor pair acquires the reference voltage charge.
[0059] During the comparison phase: Through charge redistribution, the difference between the input voltage and the reference voltage is converted into a voltage signal at the input of the preamplifier AMP1.
[0060] The preamplifier AMP1 amplifies the differential voltage initially.
[0061] The latch amplifier AMP2 is connected to the output of AMP1 and is controlled by the latch control signal CKSA. It performs positive feedback latching on the amplified differential signal and outputs the comparison result COMP.
[0062] The first differential capacitor pair includes a first sampling capacitor C1 and a second sampling capacitor C2; The first sampling capacitor C1 and the second sampling capacitor C2 are respectively connected to the two input terminals of the differential input signal to be detected, and are used to sample the differential input signal; The second differential capacitor pair includes a first reference capacitor C3 and a second reference capacitor C4; they are respectively connected to the reference voltage input terminal and used to sample the reference voltage.
[0063] The multi-threshold reference selection unit 200 includes: Multiple reference voltage input terminals Vrefp1, Vrefp2, ..., Vrefpk; and These correspond to multiple reference selection switches connected between multiple reference voltage input terminals and the second differential capacitor pair, respectively. Multiple reference selection switches are selected to be turned on according to the threshold selection control signal, so that the reference charge corresponding to different reference voltages is loaded onto the second differential capacitor pair.
[0064] Optionally, the multi-threshold reference selection unit 200 also includes a base reference voltage terminal Vrefn; Multiple reference voltage input terminals form differential reference voltages with the base reference voltage terminal Vrefn: Vrefp1-Vrefn; Vrefp2-Vrefn; ...; Vrefpk-Vrefn; to form multiple detection thresholds.
[0065] Optionally, the input direction switching unit 300 includes a plurality of input switching switches; the plurality of input switching switches are connected between the external differential input terminal and the first differential capacitor pair; by controlling the conduction state of the plurality of input switching switches, the connection relationship between the differential input signal to be detected and the first differential capacitor pair is changed; In the first connection state: Vdiff = VIP - VIN; in the second connection state: Vdiff = VIN - VIP.
[0066] To enable those skilled in the art to more clearly understand the specific implementation mechanism of input polarity switching and threshold detection in this application, the above signal and voltage parameters are defined and explained in detail as follows: It refers to the positive terminal input voltage (or positive polarity input signal) of the differential input signal to be detected. Refers to the negative terminal input voltage (or negative polarity input signal) of the differential input signal to be detected; by and Together they form the differential input signal to be detected.
[0067] Defined as the effective differential voltage to be measured that is actually applied to the input terminal of the first differential capacitor pair (i.e., the first sampling capacitor C1 and the second sampling capacitor C2) after being selected and switched by the input direction switching unit 300.
[0068] Optionally, such as Figure 2 As shown, the input direction switching unit 300 switches the input polarity according to the direction control signal generated internally; the direction control signal includes a first direction control signal POL1 and a second direction control signal POL2; when POL1 is valid, the input direction switching unit 300 establishes a first input connection relationship; when POL2 is valid, the input direction switching unit 300 establishes a second input connection relationship.
[0069] Specifically, when the input direction control unit 300 outputs a valid first direction control signal POL1, the input switching unit establishes a first input connection relationship, such that: ,
[0070] This provides a first-direction detection differential voltage to the switched capacitor comparator unit 100.
[0071] When the direction control unit outputs the second direction control signal POL2, which is valid, the input switching unit establishes a second input connection relationship, making... 。
[0072] This provides a second-direction detection differential voltage, opposite to the first direction, to the switched capacitor comparator unit 100.
[0073] In the above manner, the input direction switching unit 300 can control the switched capacitor comparison unit 100 to work alternately in the first detection direction and the second detection direction, so that the input misalignment, charge injection error and fixed deviation caused by switch parasitic parameters cancel each other out in different detection directions.
[0074] The input direction switching unit 300 has internal direction control logic. The input terminal of the direction control logic is connected to the first phase clock signal ck1 and the second phase clock signal ck2 generated inside the switched capacitor comparator to generate periodically alternating POL1 and POL2.
[0075] Optionally, the direction control signal is generated by the direction control logic based on the sampling clock signal and the comparison clock signal generated by the timing control module 400; the direction control logic includes at least one of the following: frequency divider circuit, counter, state machine, flip-flop, latch, or combinational logic circuit.
[0076] Specifically, the direction control signal is generated as follows: Figure 3 As shown, it mainly includes: an inverter, a first D flip-flop (located in...). Figure 3 (above middle), the second D trigger (located in) Figure 3 (Lower middle), First AND gate (output is) ) and the second AND gate (output is POL1).
[0077] The specific connection relationships between the various components are as follows: Connections between the input terminals and the clock terminals of the inverter and flip-flops: First clock input terminal The inverter's output is connected to the clock input of the first D flip-flop. () is connected to provide the first inverted clock signal to the first D flip-flop.
[0078] Second clock input terminal Directly connected to the clock input of the second D flip-flop ( ( ) is connected to provide a second clock signal to the second D flip-flop.
[0079] Internal feedback and output connection of the first D flip-flop: The inverting output of the first D flip-flop ( ) and its own signal input terminal ( They are connected together to form a frequency divider structure.
[0080] The non-inverting output of the first D flip-flop ( It is connected to the first input terminal of the first AND gate.
[0081] The inverting output of the first D flip-flop ( ) is connected to the first input terminal of the second AND gate.
[0082] Internal feedback and output connection of the second D flip-flop: The inverting output of the second D flip-flop ( ) and its own signal input terminal ( Connecting them together also forms a frequency divider structure.
[0083] The non-inverting output of the second D flip-flop ( It is connected to the second input terminal of the first AND gate.
[0084] The inverting output of the second D flip-flop ( ) is connected to the second input terminal of the second AND gate.
[0085] Logical output of the output terminal: The output of the first AND gate serves as the first control output, outputting the first polarity / control signal. If and only if the non-inverting output of the first D flip-flop ( ) and the non-inverting output of the second D flip-flop ( When both are high, the first control output terminal Output high level.
[0086] The output of the second AND gate serves as the second control output, outputting a second polarity / control signal. If and only if the inverting output of the first D flip-flop ( ) and the inverting output of the second D flip-flop ( When both are high (i.e., when the non-inverting outputs of both are low), the second control output... Output high level.
[0087] Optionally, such as Figure 4As shown, the timing control module 400 includes: a clock divider unit 410; a non-overlapping clock generation unit 420; and a latch control clock generation unit 430; wherein, the clock divider unit 410 is used to generate an internal working clock based on an external input clock signal; the non-overlapping clock generation unit 420 is used to generate a first phase clock signal ck1 and a second phase clock signal ck2; and the latch control clock generation unit 430 is used to generate a latch control signal CKSA based on the second phase clock signal ck2.
[0088] The clock divider unit 410 is connected to an external input clock signal CLK and is used to divide the external input clock signal CLK to generate an internal working clock signal.
[0089] In one specific embodiment, the clock divider unit 410 can be implemented using a flip-flop divider circuit, such as a two-divider circuit composed of D flip-flops, by dividing the clock by the inverting output terminal of the D flip-flop. Connecting to input D causes the D flip-flop to flip its state on each valid clock edge, thus obtaining the internal clock signal with a reduced frequency.
[0090] The input terminal of the non-overlapping clock generation unit 420 is connected to the output terminal of the clock frequency divider unit 410, and is used to generate a first phase clock signal ck1 and a second phase clock signal ck2 that do not overlap with each other based on the internal working clock signal.
[0091] In one specific embodiment, the non-overlapping clock generation unit 420 includes a logic delay circuit and a logic combination circuit, which generate clock signals by delaying, inverting, and performing a logical AND operation on the input clock signal, respectively: as well as , where: when: When the control switch capacitor comparator unit enters the sampling phase. At this time, the control switch capacitor comparator enters the comparison phase.
[0092] By setting a non-overlapping time, ck2 remains invalid during the valid period of ck1, and ck1 remains invalid during the valid period of ck2, thereby avoiding charge errors caused by the simultaneous conduction of the sampling switch and the comparison switch.
[0093] The input terminal of the latch control clock generation unit 430 is connected to the second phase clock signal ck2, and is used to generate the latch control clock CKSA according to the comparison stage timing.
[0094] In one specific embodiment, the latch control clock generation unit 430 includes an edge detection circuit, a delay circuit, and a pulse shaping circuit. When a valid edge of the second phase clock signal ck2 is detected, the latch control clock generation unit 430 outputs a pulse signal CKSA after a preset delay time. The latch control clock CKSA is connected to the latch control terminal of the latch amplifier AMP2, used to control the latch amplifier AMP2 to enter a positive feedback latch state. Therefore, within one comparison cycle, the clock generation module 400 sequentially generates: (1) First phase clock signal ck1: Control input signal and reference voltage sampling; (2) Second phase clock signal ck2: Control the release of sampling charge and the redistribution of comparison charge so that the preamplifier AMP1 outputs a comparison voltage; (3) Latch control clock CKSA: The trigger latch amplifier AMP2 amplifies and latches the comparison result using positive feedback.
[0095] Through the clock generation module 400 described above, this embodiment automatically generates the sampling clock, comparison clock, and latching clock required by the switched capacitor comparator using internal timing circuitry, without the need for external multi-channel control signals, thereby improving the integration and operational reliability of the comparator module.
[0096] Optionally, the first phase clock signal ck1 is used to control the switched capacitor comparator 100 to perform input signal sampling and reference voltage sampling; the second phase clock signal ck2 is used to control the switched capacitor comparator to perform charge redistribution and comparison; and the latch control signal CKSA is used to control the latch amplifier to latch the comparison result.
[0097] The direction control logic is generated based on a preset direction switching cycle: First state:
[0098] Second state:
[0099] The two states alternate.
[0100] In the first state, the input direction switching unit 300 outputs the first direction detection differential voltage; In the second state, the input direction switching unit 300 outputs a reverse detection differential voltage.
[0101] Direction control logic can be implemented using frequency dividers, counters, flip-flops, latches, finite state machines, or other digital logic circuits.
[0102] The input direction switching unit 300 uses the existing timing signals ck1 and ck2 inside the switched capacitor comparator to generate the direction control signal, without the need to set up an external direction control terminal.
[0103] Specifically, the timing relationship between each timing signal and the first direction control signal POL1 and the second direction control signal POL2 is as follows: Figure 5 As shown, the two-phase non-overlapping clocks (ck1 and ck2) are complementary and their high-level frequencies do not overlap. The high-level interval of ck1 is used to control the switched-capacitor comparator unit to perform the sampling and reset phase (i.e., charge sampling of the differential signal and the reference voltage), while the high-level interval of ck2 is used to control the comparator unit to perform the comparison charge transfer phase.
[0104] Regenerative comparator trigger signal (ckSA): ckSA is a narrow pulse trigger clock. Its high-level active pulse is strictly located within the comparison stage when ck2 is high, and maintains a set safe setup time with the falling edge of ck2. It is used to latch and trigger the subsequent regenerative comparator (SA) to generate a defined logic level output after the charge transfer is stable.
[0105] Divide-2 alternating logic: POL1 and POL2 are a pair of polarity selection signals with opposite phases. For example... Figure 5 As shown, the level switching of POL1 (or POL2) is driven by the edge trigger of ck1 (or ck2), and the duration of its high / low level is twice the period of the ck1 signal (i.e., the clock signal is divided by two).
[0106] Alternating detection directions (forward / reverse): The first polarity detection cycle (e.g., when POL1 is high and POL2 is low): the input cross switch matrix conducts the positive signal channel under the control of POL1, so that the switched capacitor comparison unit completes the positive threshold comparison of the signal to be detected within the current ck1 / ck2 cycle.
[0107] Second polarity detection cycle (e.g., during the period when POL1 is low and POL2 is high): In the subsequent ck1 / ck2 cycle, POL1 switches to low and POL2 switches to high, the input polarity of the cross switch matrix flips the input signal, and controls the same switched capacitor comparison unit to automatically switch to the reverse threshold comparison.
[0108] Optionally, it also includes a threshold scanning control module; the threshold scanning control module is used to generate multiple threshold selection signals in sequence according to the detection timing: sel1, sel2, ..., selk; wherein, only one threshold selection signal is valid within the same detection cycle.
[0109] Optionally, the threshold scanning control module includes: a state machine; a counter; and strobe signal generation logic; wherein: the state machine is used to control the state transitions between different detection stages; the counter is used to determine the current detection threshold number; and the strobe signal generation logic is used to generate a corresponding threshold selection signal based on the current state and the threshold number.
[0110] Optionally, the threshold scan control module performs a logical combination of the threshold selection signal and the clock signal generated by the timing control module to generate: ck11~ck1k; and: ck21~ck2k; Among them, ck11~ck1k are used to control the sampling process corresponding to different detection thresholds; ck21~ck2k are used to control the comparison process corresponding to different detection thresholds.
[0111] Furthermore, in this embodiment, the high and low level changes of the signals ck1, ck2, ck11~ck1k, and ck21~ck2k control the corresponding reference selection switch to open or close. In the accompanying drawings of this embodiment, the position corresponding to each signal is the reference selection switch it controls. This embodiment does not limit the specific implementation method of the reference selection switch.
[0112] Optionally, the threshold scanning control module can select multiple reference thresholds according to: sequential scanning mode, cyclic scanning mode, priority scanning mode, or custom scanning mode.
[0113] The state machine controls the working state of the current detection stage according to the detection process, such as controlling the state transitions between the detection start state, threshold selection state, sampling state, comparison state, and detection completion state; the counter counts the current number of detections or the current threshold number according to the detection cycle to determine the target threshold that needs to be detected; the strobe signal generation logic generates the corresponding threshold selection signal based on the state machine output state and the counter output value.
[0114] The threshold scan control module outputs multiple threshold selection signals, including: sel1, sel2,..., selk.
[0115] Where k represents the number of detection thresholds.
[0116] The threshold selection signals sel1 to selk are a set of digital control signals with mutually exclusive validity characteristics. That is, within the same detection cycle, only one threshold selection signal is in an active state, while the others are in an inactive state. Their timing relationship with ck1 is as follows: Figure 6 As shown.
[0117] The implementation of the sel1, sel2, ..., selk signals can be achieved by... This implementation method generates a series of D flip-flops (where ceil represents rounding up) and a series of logic gates or other logic circuits, which is not limited in this embodiment.
[0118] For example, when the first detection cycle is executed, the threshold scan control module outputs a valid sel1 signal, and selects the first detection threshold Vrefp1 for comparison through sel1; when the second detection cycle is executed, the threshold scan control module outputs a valid sel2 signal, and selects the second detection threshold Vrefp2 for comparison through sel2; and so on, sel1 to selk are output sequentially in different detection cycles, thereby realizing the automatic scanning of multiple detection thresholds.
[0119] like Figure 7 As shown, the generation process of signals ck11~ck1k and ck21~ck2k can be generated by AND gate logic with sel1, sel2, ..., selk and ck1 and ck2 respectively.
[0120] Furthermore, the threshold scanning control module can also generate the threshold selection signal according to a preset scanning strategy.
[0121] Scanning strategies include, but are not limited to: A sequential scanning method that detects data according to threshold numbers; A cyclic scanning method that performs detection repeatedly between multiple thresholds; Priority scanning method that selects the target threshold for detection based on preset priority; And a custom scanning method that determines the detection order based on configuration parameters.
[0122] In this way, the threshold scanning control module can automatically select and switch multiple detection thresholds without the need for external control signals to switch detection thresholds one by one, thereby improving the automation level of the detection process.
[0123] Furthermore, in order to achieve sampling control and comparison control corresponding to different detection thresholds, the threshold scanning control module is also used to logically combine the generated threshold selection signal with the clock signal to generate detection control signals corresponding to different thresholds.
[0124] Specifically, the threshold scanning control module receives the first phase clock signal ck1 and the second phase clock signal ck2 output by the clock generation module 400, and performs logical operations based on the currently valid threshold selection signal.
[0125] Optionally, it also includes a configuration control module; the configuration control module includes: a configuration register; a threshold enable register; and a scan mode register; wherein, the configuration register is used to set the number of detection thresholds to be enabled, the threshold scan order, and the detection cycle; the threshold enable register is used to mask reference thresholds that do not need to participate in the detection; and the scan mode register is used to configure the threshold scan mode.
[0126] For example, when the detection circuit contains k detection thresholds, the actual number of thresholds n involved in the detection can be set through the configuration register, where n≤k, so that the detection circuit only performs scanning detection on a portion of the thresholds.
[0127] The threshold enable register is used to control whether each detection threshold participates in the detection.
[0128] For example: When the enable bit corresponding to a certain threshold is set to the valid state, the threshold scanning control module generates the corresponding sel signal, enabling the threshold to participate in the detection; When the enable bit corresponding to a certain threshold is set to an invalid state, the threshold scan control module skips the threshold and does not generate the corresponding selection signal.
[0129] By using the above methods, thresholds that do not need to be detected can be masked according to actual detection needs, thereby improving detection efficiency.
[0130] The scan mode register is used to configure the scan mode of the threshold scan control module.
[0131] Scanning modes include: Sequential scan mode; Cyclic scan mode; Priority scan mode; And custom scanning modes.
[0132] in: In sequential scan mode, the threshold scan control module generates sel1 to selk sequentially according to the threshold number from low to high or from high to low; In cyclic scan mode, such as Figure 8 As shown, the threshold scan control module repeatedly performs multiple threshold scans according to a set cycle; In priority scanning mode, the threshold scanning control module selects the threshold to be detected first according to the preset threshold priority; In custom scan mode, the threshold scan control module performs detection based on the scan sequence stored in the configuration register.
[0133] For example, when sel1 is valid: Generated through logical AND operation: ck11 = sel1 × ck1; ck21 = sel1 × ck2.
[0134] When sel2 is valid: produce: ck12 = sel2 × ck1; ck22 = sel2 × ck2.
[0135] And so on, resulting in: ck11~ck1k; ck21~ck2k.
[0136] in: ck11~ck1k serve as sampling control signals for the corresponding detection thresholds, used to control the corresponding threshold selection branch to perform input sampling and reference voltage sampling; ck21~ck2k serve as comparison control signals corresponding to the detection thresholds, used to control the switched capacitor comparator to enter the comparison phase.
[0137] The above control method enables different detection thresholds to complete sampling and comparison operations separately within their corresponding detection cycles, avoiding timing interference between multiple threshold detection processes.
[0138] Optionally, it also includes a detection result latching module (not shown); the detection result latching module is connected to the output of the latch amplifier AMP2 and is used to store the comparison results corresponding to different detection cycles.
[0139] Optionally, the detection result latching module includes multiple result latching units; each result latching unit corresponds to a detection cycle, or a combination of a detection threshold and a detection direction; used to output detection results: OC1, OC2, ..., OCk.
[0140] Furthermore, the configuration control module may also include a communication interface for receiving configuration parameters output by an external controller and writing the configuration parameters into the corresponding register.
[0141] By configuring the control module, the same switched capacitor comparator detection circuit can support different numbers of detection thresholds, different scanning sequences, and different detection modes, thereby improving the versatility and configurability of the detection circuit.
[0142] This embodiment provides a detection method for a multi-threshold bidirectional switched capacitor voltage comparator, including: Select the target reference voltage from multiple reference voltages according to the detection requirements; During the sampling phase corresponding to the first phase clock signal ck1, the differential input signal to be detected is sampled through the first differential capacitor, and the reference charge corresponding to the target reference voltage is sampled through the second differential capacitor. During the comparison phase corresponding to the second phase clock signal ck2, a comparison voltage is formed by redistributing the input charge and the reference charge, and the comparison result corresponding to the detection threshold is output. During the sampling phase and the comparison phase, the corresponding input connection state is established by controlling the input direction switching unit to form the differential input to be detected in the corresponding detection direction; Select different reference voltages in sequence and repeat the above sampling, comparison and input connection status control steps; Obtain detection results corresponding to multiple detection thresholds and multiple detection directions.
[0143] Optionally, the detection method further includes: determining the voltage range of the differential input signal to be detected based on multiple comparison results corresponding to different detection thresholds.
[0144] Wherein, OC1 to OCk correspond to the comparison results from the first detection threshold to the kth detection threshold, respectively.
[0145] In the specific operation process, when the threshold scanning control module selects the first detection threshold Vrefp1 for detection, the switched capacitor comparator completes a comparison operation and outputs the corresponding comparison result COMP. At this time, the detection result latching module saves the comparison result to the first result latching unit according to the first latching control signal, forming the output result OC1.
[0146] When the threshold scanning control module switches to the second detection threshold Vrefp2, the detection result latching module continues to receive the comparison result COMP and saves the corresponding detection result to the second result latching unit to form the output result OC2.
[0147] By performing the above process sequentially, the final result is: OC1, OC2, ..., OCk.
[0148] Multiple detection results together represent the comparison relationship between the input voltage to be detected and multiple reference thresholds. Therefore, by analyzing the combined state of multiple detection results, the voltage range in which the input voltage is located can be determined.
[0149] For example, when a certain input voltage is greater than a first threshold but less than a second threshold: OC1 and OC2 may present different logic states, and the range of the input voltage can be determined by multiple output results.
[0150] The overall operation of the detection circuit is as follows: During startup, the external CLK input is sent to the timing control module 400. The timing control module 400 outputs: ck1, ck2, and CKSA.
[0151] The threshold scan control module generates sel1~selk based on ck1. It further generates: ck11~ck1k; ck21~ck2k.
[0152] The multi-threshold reference selection unit 200 selects the corresponding reference voltage according to the above control signal.
[0153] The input direction switching unit 300 uses the existing timing signals ck1 and ck2 inside the switched capacitor comparator to generate a direction control signal to change the input polarity of the input voltage.
[0154] The switched capacitor comparator unit 100 performs the following sequentially: input sampling; reference sampling; charge comparison; amplification and latching.
[0155] The final detection result latching module stores multiple threshold detection results.
[0156] To facilitate understanding, a more concrete example is provided below, using the setting of four detection thresholds as an example; the four reference voltages are: Vrefp1=20mV, Vrefp2=40mV, Vrefp3=60mV, Vrefp4=100mV, and Vrefn=0V is set. If Vinp=1.250V and Vinn=1.200V, then the differential input to be detected is: Vdiff = Vinp - Vinn = 50mV The four reference voltages are controlled by corresponding control signals: ck11~ck14 and ck21~ck24 respectively. Each threshold detection cycle includes a sampling phase and a comparison phase.
[0157] First detection phase: 20mV forward direction detection; The first sampling phase, such as Figure 9 As shown, ck1=1, the output of the detection control circuit is: ck11=1; Vrefp1 is connected to the first terminal of the second differential capacitor pair; Vrefn is connected to the second terminal of the second differential capacitor pair.
[0158] At the same time: POL1=1, the input direction switching circuit causes Vinp and Vinn to be connected to the first differential capacitor pair according to the first polarity.
[0159] During this stage, the sampling switch is closed; the preamplifier AMP1 is in a closed-loop state, and at the same time, the closed-loop structure of the preamplifier AMP1 eliminates its own input offset.
[0160] The first comparison stage, such as Figure 10As shown, POL2=1, ck2=1, control signal ck21=1, Vrefn is connected to the first terminal of the second differential capacitor pair; Vrefp1 is connected to the second terminal of the second differential capacitor pair. At this time, the preamplifier enters the open-loop amplification state.
[0161] Since charge sampling has already been completed in the previous stage, the comparator input is equivalent to: At the end of the phase, the comparator output is the logical value of the following inequality:
[0162] To simplify the calculation, taking C1=C2=C3=C4 as an example, then: Vdiff = Vinp - Vinn = 50mV > 20mV is true, therefore, COMP = 1, and the first detection result is latched as: OC1 = 1.
[0163] Second detection stage: 40mV reverse detection, control circuit selection: Vrefp2=40mV.
[0164] Second sampling phase, such as Figure 11 As shown, ck1=1, ck12=1, POL2=1. The input direction switching unit changes the connection relationship so that: Vdiff=Vinn-Vinp=-50mV, and is connected to the preamplifier AMP1 in a closed loop.
[0165] The second comparison stage, such as Figure 12 As shown, POL1=1, ck2=1, ck22=1, the comparator output is the logical value of the following inequality:
[0166] Since -50mV > 40mV is not valid, COMP = 0, and the second detection result is latched as OC2 = 0.
[0167] This indicates that the current input does not meet the 40mV detection condition in the reverse direction.
[0168] Third detection stage: 60mV positive direction detection, Vrefp3=60mV.
[0169] Third sampling phase refer to Figure 13 With control signals ck13=1 and POL1=1, Vrefp3 is connected to the first terminal of the second differential capacitor pair; Vrefn is connected to the second terminal of the second differential capacitor pair.
[0170] The input direction switching unit causes Vinp and Vinn to be connected to the first differential capacitor pair according to the first polarity; the preamplifier AMP1 is in a closed-loop state, and the closed-loop structure of the preamplifier AMP1 eliminates its own input offset.
[0171] Third comparison stage refer to Figure 14 ck2=1, ck23=1, POL2=1. At the end of the phase, the comparator output is the logical value of the following inequality:
[0172] Since 50mV > 60mV is not valid, COMP = 0, and the third detection result is latched as OC3 = 0.
[0173] Fourth detection stage: 100mV reverse detection, Vrefp4=100mV.
[0174] The fourth sampling stage, such as Figure 15 As shown, ck14=1, POL2=1, ck1=1, Vrefp4 is connected to the first end of the second differential capacitor pair; Vrefn is connected to the second end of the second differential capacitor pair. The preamplifier AMP1 is in a closed-loop state, and the closed-loop structure of the preamplifier AMP1 eliminates its own input offset.
[0175] Fourth-stage comparison, such as Figure 16 As shown, ck24=1, POL1=1, ck2=1, the comparator output is the logical value of the following inequality:
[0176] Since -50mV > 100mV is not true, COMP = 0, and the fourth detection result latch is OC4 = 0, indicating that the current input does not meet the reverse 100mV detection condition.
[0177] This indicates that the current input differential voltage is at 20mV. <VIP Within the detection range corresponding to VIN<60mV.
[0178] In this way, this embodiment does not require setting up multiple independent comparators, but utilizes a single switched capacitor comparator unit, through: time-division selection of multiple reference voltages; and automatic switching of input polarity; It also uses a method of comparing charge sampling and charge redistribution to achieve detection in multiple thresholds and two directions.
[0179] Compared to the method of using multiple comparators for parallel detection, this solution reduces the number of comparators, thereby reducing chip area and power consumption. At the same time, since the direction control signal and threshold selection signal are automatically generated by internal timing logic, no complex external control signals are required, which improves system integration and reliability.
[0180] The technical solution of the present invention has now been described in conjunction with the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to the specific embodiments described above. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions resulting from such changes or substitutions will all fall within the scope of protection of the present invention.
Claims
1. A multi-threshold bidirectional switched-capacitor voltage comparator, characterized in that, include: The switched capacitor comparison unit is used to perform charge domain comparison based on the input charge corresponding to the differential input signal to be detected and the reference charge corresponding to the reference voltage, and output the comparison result. A multi-threshold reference selection unit, connected to the switched capacitor comparison unit, is used to switch between multiple reference voltages and load the reference charge corresponding to different reference voltages onto the switched capacitor comparison unit. An input direction switching unit is connected between an external differential input terminal and the switched capacitor comparison unit. It is used to switch the connection polarity of the differential input signal to be detected, so that the switched capacitor comparison unit performs comparison based on the first direction differential input signal and the second direction differential input signal respectively. The timing control module is used to generate timing signals to control the operation of the switched capacitor comparison unit, the multi-threshold reference selection unit, and the input direction switching unit. The switched capacitor voltage comparator performs time-division multiplexing selection of multiple reference voltages through the multi-threshold reference selection unit, and switches the connection polarity of the differential input signal to be detected through the input direction switching unit, so that one switched capacitor comparator unit can realize multiple detection thresholds and two detection directions.
2. The multi-threshold bidirectional switched-capacitor voltage comparator according to claim 1, characterized in that, The switched capacitor comparison unit includes: a first differential capacitor pair, a second differential capacitor pair, a preamplifier, and a latch amplifier; wherein... The first differential capacitor pair is used to acquire the input charge corresponding to the differential input signal to be detected; The second differential capacitor pair is used to acquire the reference charge corresponding to the reference voltage; The first differential capacitor pair and the second differential capacitor pair are connected to the input terminal of the preamplifier; during the comparison phase, the input charge and the reference charge are redistributed to form a comparison voltage at the input terminal of the preamplifier. The preamplifier is used to initially amplify the comparison voltage; The latch amplifier is used to amplify and latch the initially amplified comparison voltage and output the comparison result.
3. The multi-threshold bidirectional switched-capacitor voltage comparator according to claim 2, characterized in that, The first differential capacitor pair includes a first sampling capacitor and a second sampling capacitor. The first sampling capacitor and the second sampling capacitor are respectively connected to the two input terminals of the differential input signal to be detected, and are used to sample the differential input signal. The second differential capacitor pair includes a first reference capacitor and a second reference capacitor, which are respectively connected to the reference voltage input terminal for sampling the reference voltage.
4. The multi-threshold bidirectional switched-capacitor voltage comparator according to claim 1, characterized in that, The multi-threshold reference selection unit includes: Multiple reference voltage input terminals Vrefp1, Vrefp2, ..., Vrefpk; and Each of these corresponds to a plurality of reference selection switches connected between the plurality of reference voltage input terminals and the second differential capacitor pair; Under the control of the threshold selection control signal, the plurality of reference selection switches selectively turn on the reference selection switch corresponding to the target reference voltage input terminal, so that the reference charge corresponding to the target reference voltage is loaded onto the second differential capacitor pair.
5. The multi-threshold bidirectional switched-capacitor voltage comparator according to claim 4, characterized in that: The multi-threshold reference selection unit also includes a base reference voltage terminal Vrefn; The plurality of reference voltage input terminals respectively form differential reference voltages with the base reference voltage terminal Vrefn: Vrefp1-Vrefn; Vrefp2-Vrefn; ...; Vrefpk-Vrefn; to form multiple detection thresholds.
6. The multi-threshold bidirectional switched-capacitor voltage comparator according to claim 1, characterized in that, The input direction switching unit includes multiple input switching switches, which are connected between the external differential input terminal and the first differential capacitor pair. By controlling the conduction state of the plurality of input switching switches, the connection relationship between the differential input signal to be detected and the first differential capacitor pair is changed: In the first connection state, the plurality of input switching switches connect the positive input voltage VIP and the negative input voltage VIN of the differential input signal to be detected to the first differential capacitor pair according to the first polarity, so as to form an effective differential voltage to be measured in the first direction, Vdiff, which satisfies: Vdiff = VIP - VIN. In the second connection state, the plurality of input switching switches interchange the connection positions of the positive input voltage VIP and the negative input voltage VIN with the first differential capacitor pair to form an effective differential voltage under test Vdiff in a second direction opposite to the first direction, satisfying: Vdiff = VIN - VIP. Wherein, VIP is the positive terminal input voltage of the differential input signal to be detected, VIN is the negative terminal input voltage of the differential input signal to be detected, and Vdiff is the effective differential voltage to be measured applied to the first differential capacitor pair after being switched by the input direction switching unit.
7. The multi-threshold bidirectional switched-capacitor voltage comparator according to claim 6, characterized in that, The input direction switching unit includes direction control logic, which generates the direction control signal based on the first phase clock signal ck1 and the second phase clock signal ck2 generated by the timing control module. The direction control logic includes at least one of the following: a frequency divider circuit, a counter, a state machine, a flip-flop, a latch, or a combinational logic circuit.
8. The multi-threshold bidirectional switched-capacitor voltage comparator according to claim 7, characterized in that, The input direction switching unit switches the input polarity according to the direction control signal generated internally. The direction control signal includes a first direction control signal POL1 and a second direction control signal POL2; When POL1 is active, the input direction switching unit establishes a first input connection relationship; When POL2 is active, the input direction switching unit establishes a second input connection relationship; Specifically, POL1 and POL2 control the conduction state of the input switching switch at different working stages corresponding to the first phase clock signal ck1 and the second phase clock signal ck2, respectively, to form an input sampling and comparison process corresponding to the detection direction.
9. The multi-threshold bidirectional switched-capacitor voltage comparator according to claim 1, characterized in that, The timing control module includes: The clock divider unit is used to generate an internal working clock based on an external input clock signal; A non-overlapping clock generation unit is used to generate a first-phase clock signal ck1 and a second-phase clock signal ck2; and The latch control clock generation unit is used to generate a latch control signal CKSA based on the second phase clock signal ck2.
10. The multi-threshold bidirectional switched-capacitor voltage comparator according to claim 9, characterized in that: The first phase clock signal ck1 is used to control the switched capacitor comparator unit to perform input signal sampling and reference voltage sampling; The second phase clock signal ck2 is used to control the switched capacitor comparator unit to perform charge redistribution and comparison; The latch control signal CKSA is used to control the latch amplifier to latch the comparison result.
11. The multi-threshold bidirectional switched-capacitor voltage comparator according to claim 1, characterized in that, It also includes a threshold scan control module; The threshold scanning control module is used to generate multiple threshold selection signals sequentially according to the detection time sequence: sel1, sel2, ..., selk; wherein, only one threshold selection signal is valid within the same detection cycle.
12. The multi-threshold bidirectional switched-capacitor voltage comparator according to claim 11, characterized in that, The threshold scanning control module includes: A state machine is used to control the state transitions between different detection stages; A counter is used to determine the current detection threshold number; and The strobe signal generation logic is used to generate a corresponding threshold selection signal based on the current state and the threshold number.
13. The multi-threshold bidirectional switched-capacitor voltage comparator according to claim 11, characterized in that: The threshold scanning control module performs a logical combination of the threshold selection signal and the clock signal generated by the timing control module to generate: ck11~ck1k; and: ck21~ck2k; Among them, ck11~ck1k are used to control the sampling process corresponding to different detection thresholds; ck21~ck2k are used to control the comparison process corresponding to different detection thresholds.
14. The multi-threshold bidirectional switched-capacitor voltage comparator according to claim 11, characterized in that, The threshold scanning control module selects multiple reference thresholds according to: sequential scanning mode, cyclic scanning mode, priority scanning mode, or custom scanning mode.
15. The multi-threshold bidirectional switched-capacitor voltage comparator according to claim 11, characterized in that, It also includes a configuration control module; the configuration control module includes: The configuration register is used to set the number of detection thresholds to enable, the threshold scanning order, and the detection cycle; A threshold enable register is used to mask reference thresholds that do not need to be detected; and The scan mode register is used to configure the threshold scan mode.
16. The multi-threshold bidirectional switched-capacitor voltage comparator according to claim 1, characterized in that, It also includes a detection result latching module; the detection result latching module is connected to the output of the latch amplifier and is used to store the comparison results corresponding to different detection cycles.
17. The multi-threshold bidirectional switched-capacitor voltage comparator according to claim 16, characterized in that, The detection result latching module includes multiple result latching units; Each of the aforementioned result latching units corresponds to a detection threshold, which is used to store the comparison result output by the latch amplifier in the detection period corresponding to the detection threshold; The multiple result latching units output detection results OC1, OC2, ..., OCk corresponding to each detection threshold, where OC1, OC2, ..., OCk correspond to the comparison results of the first detection threshold, the second detection threshold, ..., the kth detection threshold, respectively.
18. A detection method based on the multi-threshold bidirectional switched capacitor voltage comparator according to any one of claims 1 to 17, characterized in that, include: Select the target reference voltage from multiple reference voltages according to the detection requirements; During the sampling phase corresponding to the first phase clock signal ck1, the differential input signal to be detected is sampled through the first differential capacitor, and the reference charge corresponding to the target reference voltage is sampled through the second differential capacitor. During the comparison phase corresponding to the second phase clock signal ck2, a comparison voltage is formed by redistributing the input charge and the reference charge, and the comparison result corresponding to the detection threshold is output. During the sampling phase and the comparison phase, the corresponding input connection state is established by controlling the input direction switching unit to form the differential input to be detected in the corresponding detection direction; Select different reference voltages in sequence and repeat the above sampling, comparison, and input connection status control steps. Obtain detection results corresponding to multiple detection thresholds and multiple detection directions.
19. The detection method according to claim 18, characterized in that: It also includes determining the voltage range of the differential input signal to be detected based on multiple comparison results corresponding to different detection thresholds and different detection directions.
