How does this op-amp autoswitcher from Nordic PPK2 works? - Page 1
Forum section: electronics / beginners

author: flabou
author_rank: Newbie
timestamp: April 02, 2022, 12:47:27 pm
content: I am trying to understand how the following circuit from the Nordic Power Profiler Kit 2 (https://www.nordicsemi.com/Products/Development-hardware/Power-Profiler-Kit-2) works:The Nordic PPK2 is a small current data logger device which can also supply the circuit. It can measure a wide dynamic range from 100nA to 1A, at up to 100ksps, not with an exceptional accuracy but for the price I think it's a neat little device.The following picture depicts the circuit that selects which sense resistor to use based on the voltage difference across the currently connected sense resistor, to provide the auto-range capability.For completeness, the swx signals go to a series of p-mos as shown below:VDUT+ and VDUT- measure the current from the Device Under Test, and are sent to a discrete (as in made with op-amps instead of integrated) instrumentation amplifier with an adjustable offset, which outputs the current measurement sent to the ADC and also the input signal of the automatic switching circuit.In practice, I guess first only the 1k resistor is connected, then while the current rises, the other resistors are connected one by one. I do not know if previous resistor are disconnected as new ones are connected, but I would guess no because there is no switch on the 1k resistor anyway.I did the analysis for one of the op-amp of the auto-switch circuit, and I got the following equation, which I hope is correct:$$ V_+ = [V_{bot} + \frac{68}{98} (V_{top}-V_{bot})] \cdot 0.7975 + 0.2025 \cdot SWX $$However, from there I do not know how to analyze the circuit, or more importantly, how one even comes up with such an idea. I could replace Vtop and Vbot with the relation to the previous and following circuit and write basically the same equation 4 times, in which case I would have a huge equation. But I feel like there probably is a more intuitive, practical way to do it.Could someone enlighten me? How would you go about analysing this circuit? How did the original designer come up with this?

author: jmelson
author_rank: Super Contributor
timestamp: April 02, 2022, 04:33:04 pm
content: It is a 4-level comparator. The chain of resistors R12 - R31 set 4 voltage points to comapre to. Each comparator has a resistor from the output to the + input, that provides hysteresis, or a latching function. As the input is ramped from low to high, each output will trip in sequence.Jon

author: flabou
author_rank: Newbie
timestamp: April 03, 2022, 01:53:49 pm
content: Thanks for the reply, I understood that it was a comparator, and now I understand the hystersis, which is around 1.8V total if I didn't make a mistake. I think what confuses me is the way the output of each of the comparators is connected to the bottom Vbot of the previous divider, and to the top Vtop of the next divider.From there, I find it hard to know what the state will be based on the input signal (and possibly the previous state because of the hysteresis). Also, I am intrigued as to how the designer thought about doing it this way, the process that led to this circuit.

author: baoshi
author_rank: Regular Contributor
timestamp: December 15, 2022, 04:17:13 am
content: I'm too trying to figure out how it works.It seems the circuit needs to remember the state of which range it is in so as to activate the corresponding comparators for monitoring. One cannot simply set 4 different levels because the shunt is changing.But I failed to simulate this with LTSpice.Maybe someone more into this can help.

author: Dave_g8
author_rank: Regular Contributor
timestamp: June 13, 2024, 10:30:13 am
content: Hi,For information, I did a basic simulation using Tina-TI, emulating the sense voltage with the input waveform as shown attached.The Vsense voltage sequence is as follows.1. Starts a 0V.2. After a time delay it steps to 0.5V.3. After a time delay it ramps up to just above the threshold voltage.4. It remains at this level for a short time.5. After a delay it steps down to 0.5V (emulating a change of sense resistor)6. Repeats steps 3 to 5 several times.7. After a time delay steps down to 0V.The top trace is the emulated Vsense voltage, followed by SW1, SW2, SW3 and SW4 which are the control signals for the MOSFETs selecting the sense resistors.The simulation shows the expected behaviour for the auto selection implementation.