solved: Rail to rail *input* opamp for Vdd=36V? - Page 1
Forum section: electronics / beginners

author: incf
author_rank: Frequent Contributor
timestamp: March 26, 2025, 12:36:00 pm
content: Hi everyone, I've got some high side current sensing to do where I want to have very little offset.The high side operates at up to 32V.Ideally I'm looking for an op-amp with rail to rail *inputs* that can operate with Vdd_abs_max=36V or higher.The general problem that I am running into is getting a ~5mV current sense signal that exists on the 32V rail down to 5V or 3.3V without introducing too much error.0.1% resistors and a differential amplifier running on the 5V rail is not suitable due to voltage offset issues from the resistors.I'm reluctant to try to build a charge pump supply to provide a local 5V rail above the current sense resistor on the 32V rail - I've got multiple current sense resistors at different voltages and feel the circuit sprawl could get quite "big". (But maybe I shouldn't be reluctant)This hypothetical part would be operating as a inverting amplifier:Vsupply+=32VVsupply-=0VInverting input=31.995V (through two resistor feedback network to get a certain gain)Non-inverting input=32VOutput= (irrelevant, probably 32V at zero current, and around 0V at full current)Does anyone know of a part that can do it? Ideally a "jellybean"/commodity amplifier for which an alternate supplier exists.I wish a commodity amplifer similar to the venerable LM324 supported having it's inputs equal to it's positive supply rail

author: tggzzz
author_rank: Super Contributor
timestamp: March 26, 2025, 12:42:55 pm
content: https://www.analog.com/en/resources/technical-articles/robust-high-voltage-over-the-top-op-amps-maintain-high-input-impedance-with-inputs-driven-apart-or.html

author: incf
author_rank: Frequent Contributor
timestamp: March 26, 2025, 01:07:43 pm
content: Quote from: Simmed on March 26, 2025, 01:02:41 pm*Input* not outputTake a look at the common mode input range specs on those partsIn general the higher the supply voltage the worse the common mode input range seems to be.

author: incf
author_rank: Frequent Contributor
timestamp: March 26, 2025, 01:14:02 pm
content: Quote from: tggzzz on March 26, 2025, 12:42:55 pmWhile I like the concept of the LT6015, it doesn't fit the bill.I'm limited to the cheap commodity type parts with multiple suppliers.Maybe if I were clever a LM324 could be made into a current mirror to shift everything down from 32V to something like 2.5V.

author: Siwastaja
author_rank: Super Contributor
timestamp: March 26, 2025, 01:17:19 pm
content: Did you look at the specific category of current-sense amplifiers? They have input common mode ranges greatly exceeding supply rails due to internal laser-trimmed resistors. Seems like finding the same properties in "general purpose" opamps section is difficult.

author: hli
author_rank: Frequent Contributor
timestamp: March 26, 2025, 01:23:55 pm
content: Quote from: incf on March 26, 2025, 01:14:02 pmThis makes it complicated. What you are looking for is a current sense amplifier, not just an OpAmp. Your problem is not only the input voltage, but especially your input common mode voltage - usually offset gets worse (or even much worse) when both inputs are close to the rails.Both AD ant TI have several current sense amplifiers, but I'm not aware of ones available from multiple suppliers. Looking for differential amplifiers might yield something.So you probably need to supply the sense amplifier near your power rail and the level-shift the signal. I think 'The Art of Electronics' had something about this, but I might be wrong.https://www.renesas.com/en/document/apn/current-sensing-low-voltage-precision-op-amps?srsltid=AfmBOop3Tz0lUZUeFIGGK1U3ALczzBx0DGPWSGLFIsT8r1JMOHvp9zF0orhttps://www.analog.com/en/resources/design-notes/highside-currentsense-amplifier-operates-at-high-voltage.htmlmight also help (when you search for 'high side current sense amplifier level shift' there is probably more).

author: incf
author_rank: Frequent Contributor
timestamp: March 26, 2025, 01:32:09 pm
content: Quote from: Siwastaja on March 26, 2025, 01:17:19 pmIf one excludes the company Analog Devices, there are only 25 devices in that category that meet the supply voltage range. (and at a glance none of them really look like interchangeable commodity parts that have a second suppler)

author: incf
author_rank: Frequent Contributor
timestamp: March 26, 2025, 01:35:43 pm
content: Quote from: hli on March 26, 2025, 01:23:55 pmA 5V integrated charge pump IC might be able to make a floating rail (above the 32V rail) that a standard 5V rail-to-rail amplifier like the MCP6001 can deal with.I've been reluctant to go that route mostly due to unfamiliarity. But perhaps I have no choiceI suspect that I'm likely to stumble over a few "traps for young players" with floating charge pump supplies.Now that I think about it, I probably would struggle to use an integrated change pump because this is a high side application (if 32V is ground, where do you get a higher voltage from to feed the integrated charge pump that expects a positive voltage). I'd probably be forced to implement a discrete high voltage charge pump just to deal with that. Or do several stages of regulation (down -2.5V then up 5V)A fixed (charge pump?) supply rail of exactly 34.5V @ 2mA with a LM321 looks attractive in comparison. Or more likely, a dedicated boost converter (eg. 3843 family)

author: Siwastaja
author_rank: Super Contributor
timestamp: March 26, 2025, 01:46:53 pm
content: Quote from: incf on March 26, 2025, 01:32:09 pmICs that work directly with high supply voltages are specialized, rare and expensive. Normally one uses regulators to get the supply voltage to something accepted by the suitable parts, not the other way around. Linear regulators cost like $0.05, so I would not rule out parts with smaller supply voltage, as long as the common mode input range is there.

author: Siwastaja
author_rank: Super Contributor
timestamp: March 26, 2025, 01:54:58 pm
content: And don't get too fixated with second-sourcing. If you want every part to be second-sourcable, soon you'll discover you can't do anything anyway. You could get the same level of future-proofing by just adding double footprints on the PCB to allow population of similar part - but it would not need to be completely pin-compatible.

author: Peabody
author_rank: Super Contributor
timestamp: March 26, 2025, 02:01:03 pm
content: I have no experience with this, but can you clarify what you are doing with the 5mV signal? Is it going into an ADC input of a microcontroller? I'm just trying to make sense of the opamp output being "irrelevant" and swinging from 0V to 32V.How would a bench multimeter do this?I guess alternatives might include measuring the current on the low side, or possibly moving the ground for the rest of the circuit up to 27V. Then jellybean parts would work.

author: tggzzz
author_rank: Super Contributor
timestamp: March 26, 2025, 02:06:57 pm
content: TAoE plus x-chapters have many ideas for this type of problem, and tables of many useful opamps.Once you have them, you will use them for other things.

author: incf
author_rank: Frequent Contributor
timestamp: March 26, 2025, 02:11:03 pm
content: Quote from: Peabody on March 26, 2025, 02:01:03 pmA microcontroller will read it though a voltage divider and can do some math/filtering.Specs are: 0 to 30 amps across 10 milliohms with 10% accuracy full range and offset of roughly +/- 0.5 amps(0.5A across 10 milliohms is 5mV, 30A across 10 milliohms is 300mV)Ideally, would "like" to do a lot little better than an offset of 0.5A. Hence the 5mV figure to steer the focus towards approaches that can deal with small differential voltages.

author: Zero999
author_rank: Super Contributor
timestamp: March 26, 2025, 02:19:13 pm
content: Why do you need a rail-to-rail input? Surly you only need the input range to include the positive rail?How about using an op-amp and transistor current mirror? The op-amp then only needs to be rated for 5V, or so. Heck, if 36V is the absolute maximum and accuracy isn't important then use the TL072 an get rid of R4 and D1 and connect the op-amp's negative pin directly to 0V.

author: incf
author_rank: Frequent Contributor
timestamp: March 26, 2025, 02:35:32 pm
content: Quote from: Zero999 on March 26, 2025, 02:19:13 pmThat's exactly the sort of analog trickery I was looking for.I didn't know the TL072 included V+ in it's common mode range (I looked everywhere except at the TL072)current mirrors look like very flexible way to shift signals across floating railsI think the TL072 could be coaxed into doing an inverting amplifier as well, but I think the current mirror is more robust (it will automatically reject changes in supply voltage)Originally I was thinking about the problem wrong, so I asked the wrong questions.I'll play around the circuit a bitAlso I forgot that I have to do the same thing on both positive and negative 30V rails (it's an inverter). A TL072 will work for a positive rail (V+ in common mode input range). And a LM321 will work for a negative rail (V- in common mode input range).

author: jmelson
author_rank: Super Contributor
timestamp: March 26, 2025, 02:52:27 pm
content: I used Zero999's scheme in a project a long time ago, it worked well. In a more recent project, I used an LTC2075HV for high-side current sensing, and it worked fine. It doesn't go completely to the + rail, but quite close. You might check that one out. For 36V you don't need the HV variant.Jon

author: timeandfrequency
author_rank: Frequent Contributor
timestamp: March 26, 2025, 03:21:34 pm
content: Hello incf,It might be that using a vanilla opamp and some current mirror voodoo will do the trick. But of course the path is a bit steep and finalspecs could be disappointing.If you need mutiple source for a dedicated part (in this case, the current sense amplifier), you may want to select 2 or 3 parts from different manufacturers and put multiple footprints on the PCB. You only populate one of those, depending on parts procurement.Here's the list ofCurrent Sense Amplifier from LT/AD(uni and bidi versions, up to 105 V, zero drift, 'Over-The-Top' feature, which is even better than 'rail to rail').

author: David Hess
author_rank: Super Contributor
timestamp: March 26, 2025, 03:56:58 pm
content: Quote from: incf on March 26, 2025, 01:14:02 pmThere are plenty of 36+ volt JFET input parts which have an input common mode range that includes the positive supply. The venerable LM301A bipolar part also works to the positive supply.

author: incf
author_rank: Frequent Contributor
timestamp: March 26, 2025, 03:58:41 pm
content: Quote from: timeandfrequency on March 26, 2025, 03:21:34 pmI have to admit that I'm not sure offhand how the opamp's CMRR spec would affect it's ability to serve as unity buffer/current mirrorIf I understand the formulas right, a CMRR of 80dB on a unity gain buffer would give a offset voltage of 100 microvolts per volt - I think?So from 10V to 30V a common mode offset voltage of 2mV might develop (equivalent to an error of +/-0.2 amps across a 10 milliohm shunt)Quote from: David Hess on March 26, 2025, 03:56:58 pmWhich ones? so far I've gotTL071/072/074TL081/082/084LM301Aedit: gee... the '301 really is a lousy amplifier. The large signal gain is only 15k not the usual >1M - I feel like having so little gain would introduce offset error (2mV @ 30V I think)

author: langwadt
author_rank: Super Contributor
timestamp: March 26, 2025, 04:06:09 pm
content: Quote from: Siwastaja on March 26, 2025, 01:54:58 pmand there seems to be quite few pin-compatible sot-23 current sense amplifiers

author: David Hess
author_rank: Super Contributor
timestamp: March 26, 2025, 04:09:19 pm
content: Quote from: incf on March 26, 2025, 03:58:41 pmThe LM301 is fabulous. Name another operational amplifier which supports clamping.TLE2071/2/4TL031/2/4TL051/2/4TL061/2/4LF351/3LF355/6/7The LF355/6/7 work with supply voltages to 44 volts, if they are still available.

author: timeandfrequency
author_rank: Frequent Contributor
timestamp: March 26, 2025, 04:09:41 pm
content: TheCA3140goes a bit below its negative supply rail.

author: incf
author_rank: Frequent Contributor
timestamp: March 26, 2025, 04:16:25 pm
content: Quote from: David Hess on March 26, 2025, 04:09:19 pmClamping? I'm not sure what exactly you mean. Like internal ESD diodes on the inputs?

author: David Hess
author_rank: Super Contributor
timestamp: March 26, 2025, 04:51:14 pm
content: Quote from: incf on March 26, 2025, 04:16:25 pmFor an operational amplifier, clamping means that the transconductance (current) output before the output buffer is brought out on a pin and can be used to limit the output of the amplifier, improving recovery time by preventing windup and saturation.Shown below is an example where the 301A is used as a high side error amplifier for current limiting, and its compensation pin ( 8 ) is clamped through D2 so that when the current limit becomes active, the 301A can respond more quickly than an unclamped operational amplifier could.

author: Kleinstein
author_rank: Super Contributor
timestamp: March 26, 2025, 04:55:53 pm
content: The quite some modern RR op-amps (e.g. OPA990 and related). However they often have 2 input stages and an cross over between the 2 at some 1 V below the positive supply. This could be just the range used with high side sensing. The specs near the positive supply can also be worse than in most of the range. The AZ amplifiers usually compensate for this by the switched part, at least for slower signals.An alternative to the LTC2057 is the MCP6V51 - similar data, usually a different case.

author: Zero999
author_rank: Super Contributor
timestamp: March 26, 2025, 07:45:23 pm
content: Quote from: incf on March 26, 2025, 03:58:41 pmIt's the input offset voltage which is the main problem for the current mirror circuit. The CMRR isn't a big deal because both inputs stay around the same voltage. The supply rejection ratio is more of an issue, if the input voltage doesn't stay constant, but that can be improved with the zener diode.QuoteThe stuff about clamping is nice to know, but irrelevant to this application.The low gain shouldn't be a problem with the current mirror circuit, because the gain of the circuit is close to unity. The output is connected to a source follower, which means the voltage on M1's source is the same as the gate, plus a fixed threshold voltage. Changing the input voltage by 100mV, causes the op-amp's output to change by roughly the same voltage.I was going to suggest the ZXTC1009, because it's very easy to use, but it's not a generic IC and is only rated to 20V, so will need some tricks with a cascode to get it to work at higher voltages.https://www.mouser.com/datasheet/2/115/ZXCT1009-93594.pdfSchematic for educational purposes only. M1 has a potential divider which delivers half the supply voltage to its gate. The source voltage follows the gate voltage and is always a couple of volts above the gate. The voltage across the ZXTC1009 is therefore half the supply voltage minus a couple of volts. No current flows through the MOSFET's gate, so the drain current is the same as the source. The ZXTC1009 changes its current draw dependant on the the supply voltage and is sensed by R4. It works on the same principle as the current mirror circuit in my previous post.A cascode circuit similar to the above can be used with the current mirror circuit I posted, to improve the supply rejection ratio. Engineering is all a compromise. If you want better accuracy, lower offsets, higher supply rejection etc. then it means more costly ICs and/or more components.

author: incf
author_rank: Frequent Contributor
timestamp: March 26, 2025, 07:53:22 pm
content: I've committed myself to using something like the TL081 in a current mirror.It's performance in the simulator is "adequate". I only wish those ancient amplifiers were widely available (ie. multiple suppliers) in SOT-23-5 packages.Also sort of wish that low offset/chopper stabilized versions of those ancient amplifiers were ubiquitous enough to meet the criteria for use.

author: Kleinstein
author_rank: Super Contributor
timestamp: March 26, 2025, 09:01:43 pm
content: There are plenty of chopper stabilized OP-amps and many of them have rail to rail inputs. Only the choices with more than 30 V supply range is a bit limited.The types are usually also manufacturer specific, though rather similar types can often be found from different sources.It is no longer common to have 2nd sources, but there can still be similar parts with a different name. Even with the same number, but a different manufacturer there can still be differences. E.g. 74LV4054 from Ti and NXP have quite different on resistance.The simulations usually don't inlcude the offset and offset drift part.The old types may be too large to fit in a SOT23. So one may have to look at modern parts.The TL081H is available in sot23, but it is a quite different part.

author: Zero999
author_rank: Super Contributor
timestamp: March 26, 2025, 09:04:13 pm
content: Quote from: incf on March 26, 2025, 07:53:22 pmThe TL081H is available in SOT23-5, but you don't get the offset trim, which is presumably why you're using it rather than the TL082.https://www.ti.com/lit/ds/symlink/tl081a.pdfAnd, please do breadboard it. Don't rely on SPICE models which are imperfect.

author: David Hess
author_rank: Super Contributor
timestamp: March 26, 2025, 10:34:29 pm
content: If you use the circuit posted by Zero999, then the operational amplifier does not need to be high voltage:https://www.eevblog.com/forum/beginners/rail-to-rail-*input*-opamp-for-vdd36v/msg5861273/#msg5861273The transistor sees the full voltage, but the zener diode provides a regulated low voltage negative supply to the operational amplifier. Now the only requirement is an input voltage range which includes the positive supply. The OPA186 is such a chopper stabilized part which is inexpensive and available in the SOT-23 package, but there are several options.

author: incf
author_rank: Frequent Contributor
timestamp: March 26, 2025, 10:44:11 pm
content: Quote from: David Hess on March 26, 2025, 10:34:29 pmYou (and Zero999, et. al) are right, I suppose a single zener + power resistor is probably worth the flexibility and increased accuracy.

author: Alex Nikitin
author_rank: Super Contributor
timestamp: March 26, 2025, 10:50:33 pm
content: With this kind of accuracy requirements I would go for aHall-effect based sensor.CheersAlex

author: incf
author_rank: Frequent Contributor
timestamp: March 26, 2025, 10:54:00 pm
content: Quote from: Alex Nikitin on March 26, 2025, 10:50:33 pmI did not know that those modules existed (and are not as expensive as I would have thought). While I can't use them, I will remember them in the future.

author: KE5FX
author_rank: Super Contributor
timestamp: March 26, 2025, 10:58:08 pm
content: Quote from: incf on March 26, 2025, 10:44:11 pmDebatable whether you even need the zener. The opamp's PSRR shouldn't be a limiting factor, so it doesn't need a regulated or stable voltage. It's not driving any current, so it shouldn't need much supply current. With a so-called 'micropower' opamp, you should be able to use a 10:1 resistive divider or something similar.

author: incf
author_rank: Frequent Contributor
timestamp: March 26, 2025, 11:16:52 pm
content: Quote from: KE5FX on March 26, 2025, 10:58:08 pmI have to admit that the thought of supplying a >1k impedance supply makes me hesitate a bit. (eg. 10k and 1k across 32V for power dissipation [real values would be selected for voltage in addition to power dissipation])I don't regularly do PSRR calculationsSupply voltage is 12V to 32VThe circuit I had planned would produce 0 to 3V across 100k on the low side. (30uA)A chopper amp like the 5.5V rated TSZ121 consumes 40uA "max" (30uA typ)I suppose that gives 30 to 70mV of drop which "seems like" nothing given the 80dB PSRR.With such a wide operating voltage range, I probably would need a zener. I think the output voltage needs to get above the threshold voltage of the current mirror FET (maybe a BJT based current mirror circuit might tolerate low voltage operation better)

author: KE5FX
author_rank: Super Contributor
timestamp: March 27, 2025, 12:07:48 am
content: Yeah, a supply voltage range near 3:1 does make the zener more attractive. I missed that part earlier. Could likely still be done (some opamps areverystingy with their power consumption) but the upside may not be there.

author: incf
author_rank: Frequent Contributor
timestamp: March 27, 2025, 12:26:53 am
content: Suppose the supply of an op amp goes from 5.5V down to 2V (ie. 32V down to 12V through a divider) at DC, or maybe over the course of 10 minutes.At DC can things like PSRR or CMRR increase the offset voltage beyond the stated max?Do PSRR specs apply to those sorts of DC changes? Or is it a strictly AC specification?Same question for CMRR?(Supply voltage rejection ratio vs PSRR?)I "feel like" PSRR is more of an "AC thing" (aka. >1Hz - but maybe I've been spending too much time reading datasheets for chopper op amps)It probably depends on the type of op-amp (ie. chopper amplifiers might do PSRR specs differently than general purpose amps)edit: I need to reread TI's "Op-Amps for Everyone"

author: Zero999
author_rank: Super Contributor
timestamp: March 27, 2025, 07:52:32 am
content: Quote from: incf on March 27, 2025, 12:26:53 amThe power supply rejection ratio is 90dB at 10Hz, which means any change in power supply voltage is divided by 1090/20= 32k.I repeat, you really need to test this in real life.

author: David Hess
author_rank: Super Contributor
timestamp: March 27, 2025, 04:53:35 pm
content: Quote from: incf on March 27, 2025, 12:26:53 amYes, because the input offset voltage specification applies under specific conditions, including power. If you rely on the +/-15 volt specification but operate in a single supply application with a common mode voltage close to one rail, then the CMRR adds to the input offset voltage.QuoteCMRR and PSRR apply at DC and AC, and decrease with increasing frequency. However if the graph shows the same curve versus frequency for CMRR, PSRR, or Aol (open loop gain), then they were measured incorrectly. A lot of old datasheets have this problem. For instance the CMRR curve should be much better than the Aol curve.