[solved] AN1827 clever high-side current sense circuit - doesn't work as shown? - Page 1
Forum section: electronics / projects

author: Whales
author_rank: Super Contributor
timestamp: June 07, 2025, 12:26:31 pm
content: I recently came across a magic circuit in AN1827 that takes the voltage drop across a high-side current sense resistor and translates it to a GND referenced signal. It uses a standard 5V high-speed rail-to-rail opamp (not a BW-limited current sense amplifier):...but according to my QUCS-S transient spice sim it doesn't work:The problem appears to be with the BSS84 mosfet. They mention using a PNP in the green blurb and indeed that seems to fix it:I suspect the reason for failure is that the BSS84 (like most discrete mosfets) has a body diode in it, like so:Unfortunately I also suspect that the PNP version would not work in real life either. The datasheet for a 2N3906 specifies that the emitter - base <= 5V for it not to break down, and in this circuit that is not true. This circuit uses a PNP "upside down" compared to how I usually see them.Thoughts? Perhaps I'm missing something here?

author: Whales
author_rank: Super Contributor
timestamp: June 07, 2025, 12:34:52 pm
content: Doh solved! They just drew the BSS84 the wrong way around. With the BSS84 reversed to the "normal" orientation it works, and with the PNP flipped to the normal orientation it works even better still (and does not violate any part spec).

author: BadeBhaiya
author_rank: Regular Contributor
timestamp: June 09, 2025, 08:50:50 am
content: Pretty cool, quite simple!Using a PNP would make the swing narrower but besides that its the superior option. Using a PMOS would hurt the bandwidth.

author: Terry Bites
author_rank: Super Contributor
timestamp: June 09, 2025, 02:53:26 pm
content: Its great that it was such a simple fix.The pnp version is less precise but requires far less opamp headroom than the mosfet version.

author: Whales
author_rank: Super Contributor
timestamp: June 09, 2025, 08:37:19 pm
content: Quote from: BadeBhaiya on June 09, 2025, 08:50:50 amYes that's what I found too.In my graphs above the bandwidth is limited by the opamp. IRL I'm testing these circuits with some cheap R2R GS8052/4 video opamps. They are completely overkill and I slow them down a bit with extra capacitance between the output & negative input, but they're cheap and I want to experience the thrills of overspeed opamps at least once in my life

author: Peabody
author_rank: Super Contributor
timestamp: June 09, 2025, 09:50:23 pm
content: For the benefit of us non-EE types, could someone explain what R9 of the original circuit does, and how its value is calculated?

author: Vovk_Z
author_rank: Super Contributor
timestamp: June 09, 2025, 11:05:58 pm
content: Quote from: Peabody on June 09, 2025, 09:50:23 pmIt regulates output current Io (as shown in the picture, Io = Vsh / R9). So, you have to calculate R6, R9, and R7 together, accordingly with the needed Vout and measured input current.

author: BadeBhaiya
author_rank: Regular Contributor
timestamp: June 10, 2025, 08:37:07 am
content: Quote from: Whales on June 09, 2025, 08:37:19 pmWhy not go the opposite way and pair the fast opamps with RF grade BJTs and have a very high freq current sensing circuit

author: mikerj
author_rank: Super Contributor
timestamp: June 10, 2025, 01:46:38 pm
content: Quote from: Peabody on June 09, 2025, 09:50:23 pmThe op-amp ensures the voltage across R9 is the same as the sense resistor R6 by controlling the current going through the transistor and R7. For example 100 amps was flowing through the sense resistor would give a voltage drop of 10mV, the op-amp would adjust the transistor gate until the same 10mV is developed across R9, giving a current of 10mV/100R = 0.1mA. This 0.1mA also flows through R7, creating an output voltage of 0.1mA*10k = 1V. For measuring smaller current the sense resistor value would need to be increased.

author: Peabody
author_rank: Super Contributor
timestamp: June 10, 2025, 02:09:10 pm
content: Quote from: mikerj on June 10, 2025, 01:46:38 pmThanks very much. But that 1V output voltage is the voltage across R7. Right? The actual output voltage will be about 11V with respect to the MCU/ADC if they share a common ground with the 12V source. So maybe it would be useful to divide R7 into 6.8K and 3.3K.

author: prosper
author_rank: Regular Contributor
timestamp: June 10, 2025, 05:02:08 pm
content: weird, because the note on the original circuit explicitly states that it's a source-follower. In common-source (or common-emitter) mode, I'd worry about instability/oscillations and poor transient response if the opamp can't keep up

author: mikerj
author_rank: Super Contributor
timestamp: June 10, 2025, 09:14:11 pm
content: Quote from: Peabody on June 10, 2025, 02:09:10 pmThe 1V is with respect to ground, this is what the micro will see. The beauty of using currents is the ease in which you can change references like this, and also change gain with a single resistor.

author: Peabody
author_rank: Super Contributor
timestamp: June 10, 2025, 10:18:05 pm
content: Ok, so in your example, of the 12V source 10mV is dropped across R9, and 1V is dropped across R7, and the rest (about 11V) is dropped across the mosfet. Is that right?

author: thm_w
author_rank: Super Contributor
timestamp: June 10, 2025, 10:32:18 pm
content: Link:https://www.renesas.com/ja/document/apn/an1827-high-side-high-current-sensing-techniquesCorrectly drawn version:https://www.analog.com/en/resources/analog-dialogue/articles/high-side-current-sensing-wide-dynamic-range.htmlSimilar toina138but not quite the same.

author: Psi
author_rank: Super Contributor
timestamp: June 10, 2025, 11:08:30 pm
content: What's the advantage of this app note instead of using a $0.15 current sense amp with gain, like an INA180.Other than being able to use an existing opamp that you might have in the BOM already.

author: Whales
author_rank: Super Contributor
timestamp: June 11, 2025, 04:07:16 am
content: Quote from: Psi on June 10, 2025, 11:08:30 pmCurrent sense amps have great CMRR but poor bandwidth. Your INA180 is one of the better ones I've seen with GBP = 350KHz, but that's still not always enough.Eg I'm playing around with some designs of peak-current-mode buck controller. Every cycle they turn the high-side mosfet on and keep it on until its current reaches a set threshold, then turn it off. If the cycles are occurring at 200KHz then the current sensing needs much higher bandwidth than this (perhaps 10x) to see any sort of detail within each cycle.I suspect it's really hard to design a fully differential current sense amp with higher bandwidth (and not sacrifice the CMRR). The high-side sensing circuit in this appnote has an easier job to solve because it will see less common-mode noise than some of the situations a current sense amp is expected to work (like on a resistor in series with an inductor).

author: mikerj
author_rank: Super Contributor
timestamp: June 11, 2025, 11:39:46 am
content: Quote from: Peabody on June 10, 2025, 10:18:05 pmYes, that's correct.

author: Vovk_Z
author_rank: Super Contributor
timestamp: June 12, 2025, 11:53:26 am
content: Quote from: BadeBhaiya on June 10, 2025, 08:37:07 amUsually you want a precision OPamp to be there, because fast ones as usually have not good enough DC precision.