What's wrong with this?

The following circuit is the front-end of a floating voltage and current measurement device intended for 230V mains.

V2 is for mains, R2 is the load, R1 is for current measurement. It simulates flawlessly, with the gain values adjusted to match the desired range.

In the real circuit MEASURED_CURRENT is -40mV (relatively to VREF) for V2=0 and BUFFERED_CURRENT is -79mV. Otherwise the circuit more or less works, with the output voltages following the gain settings, but distorted by these huge offsets.

I don't understand this, the LTC6242 is genuine (from Mouser) and the specs say it is Rail-to-Rail, low offset (125uV max). The RR part should even not be important here, as the circuit is designed to have its virtual mass at VDD/2 (~1.6V), certainly within the opamp's common mode range.

The highest gain there is 12.5, so it should result in ~1.6mV (worst case) of static error after the amplifier stage and a negligible microvolt-range distortion introduced by the followers. But I have -80mV to start from, which translates into ~600mA input current error. How can it be *that* bad?

All the measurements are performed with DC input.

Best regards, Piotr

Version 4 SHEET 1 1032 680 WIRE -1792 -720 -1792 -784 WIRE -1472 -592 -1584 -592 WIRE -1312 -592 -1392 -592 WIRE -640 -544 -672 -544 WIRE -512 -544 -560 -544 WIRE -400 -544 -432 -544 WIRE -1440 -416 -1440 -480 WIRE -1584 -400 -1584 -592 WIRE -1472 -400 -1584 -400 WIRE -80 -400 -80 -512 WIRE -1312 -384 -1312 -592 WIRE -1312 -384 -1408 -384 WIRE -1248 -384 -1248 -464 WIRE -1248 -384 -1312 -384 WIRE -1184 -384 -1248 -384 WIRE -1472 -368 -1488 -368 WIRE -528 -368 -528 -432 WIRE -672 -352 -672 -544 WIRE -560 -352 -672 -352 WIRE -400 -336 -400 -544 WIRE -400 -336 -496 -336 WIRE -320 -336 -320 -416 WIRE -320 -336 -400 -336 WIRE -288 -336 -320 -336 WIRE -1440 -320 -1440 -352 WIRE -560 -320 -576 -320 WIRE 48 -320 48 -336 WIRE -128 -304 -128 -336 WIRE -128 -304 -288 -304 WIRE 16 -304 -128 -304 WIRE 512 -304 384 -304 WIRE 224 -288 80 -288 WIRE -672 -272 -672 -352 WIRE -576 -272 -672 -272 WIRE -528 -272 -528 -304 WIRE -80 -272 -80 -320 WIRE 16 -272 -80 -272 WIRE -672 -256 -672 -272 WIRE -576 -256 -576 -272 WIRE -80 -256 -80 -272 WIRE 48 -224 48 -256 WIRE 448 -224 448 -240 WIRE 384 -208 384 -304 WIRE 416 -208 384 -208 WIRE -224 -192 -224 -224 WIRE 512 -192 512 -304 WIRE 512 -192 480 -192 WIRE 576 -192 512 -192 WIRE -288 -176 -288 -304 WIRE -256 -176 -288 -176 WIRE 416 -176 -80 -176 WIRE -128 -160 -128 -304 WIRE -128 -160 -192 -160 WIRE -928 -144 -944 -144 WIRE -800 -144 -928 -144 WIRE -672 -144 -672 -176 WIRE -672 -144 -720 -144 WIRE -576 -144 -576 -176 WIRE -576 -144 -672 -144 WIRE -400 -144 -400 -336 WIRE -256 -144 -400 -144 WIRE -80 -144 -80 -176 WIRE 448 -128 448 -160 WIRE -672 -96 -672 -144 WIRE -224 -96 -224 -128 WIRE -928 -48 -928 -144 WIRE 48 -48 48 -64 WIRE -128 -32 -128 -160 WIRE 16 -32 -128 -32 WIRE 224 -16 80 -16 WIRE -80 0 -80 -64 WIRE 16 0 -80 0 WIRE -80 32 -80 0 WIRE 48 48 48 16 WIRE -1584 112 -1584 -400 WIRE -1424 112 -1584 112 WIRE -1312 112 -1344 112 WIRE -928 112 -928 32 WIRE -928 112 -1232 112 WIRE -672 112 -672 -16 WIRE -672 112 -928 112 WIRE -80 208 -80 112 FLAG -1792 -640 0 FLAG -528 -272 0 FLAG -528 -432 VDD FLAG -1792 -784 VDD FLAG -320 -416 MEASURED_CURRENT IOPIN -320 -416 Out FLAG -1440 -320 0 FLAG -1440 -480 VDD FLAG -1248 -464 MEASURE_VOLTAGE IOPIN -1248 -464 Out FLAG 448 -128 0 FLAG 448 -240 VDD FLAG 576 -192 VREF IOPIN 576 -192 Out FLAG 48 48 0 FLAG 48 -64 VDD FLAG -80 208 0 FLAG -80 -512 VDD FLAG 48 -224 0 FLAG 48 -336 VDD FLAG -1488 -368 VREF IOPIN -1488 -368 In FLAG -576 -320 VREF IOPIN -576 -320 In FLAG -944 -144 VREF IOPIN -944 -144 In FLAG -224 -96 0 FLAG -224 -224 VDD FLAG -128 -336 BUFFERED_CURRENT SYMBOL voltage -1792 -736 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V1 SYMATTR Value 3.3v SYMBOL voltage -928 -64 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V2 SYMATTR Value SINE(0 10 50) SYMBOL res -704 -160 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R1 SYMATTR Value 10m SYMBOL res -688 -112 R0 SYMATTR InstName R2 SYMATTR Value 32.3 SYMBOL Opamps\\LTC6242 -528 -336 R0 SYMATTR InstName U2 SYMBOL res -688 -272 R0 SYMATTR InstName R5 SYMATTR Value 2k4 SYMBOL Opamps\\LTC6242 -1440 -384 R0 SYMATTR InstName U3 SYMBOL res -1376 -608 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R7 SYMATTR Value 7k5 SYMBOL Opamps\\LTC6242 448 -192 R0 SYMATTR InstName U4 SYMBOL res -1328 96 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R11 SYMATTR Value 1.2Meg SYMBOL Comparators\\LTC6752 48 -80 R0 SYMATTR InstName U1 SYMBOL res -96 -416 R0 SYMATTR InstName R8 SYMATTR Value 2k4 SYMBOL res -96 16 R0 SYMATTR InstName R12 SYMATTR Value 2k4 SYMBOL Comparators\\LTC6752 48 -352 R0 SYMATTR InstName U5 SYMBOL res -96 -160 R0 SYMATTR InstName R13 SYMATTR Value 7k5 SYMBOL res -96 -272 R0 SYMATTR InstName R14 SYMATTR Value 7k5 SYMBOL res -592 -272 R0 SYMATTR InstName R9 SYMATTR Value 2k4 SYMBOL res -544 -560 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R6 SYMATTR Value 7k5 SYMBOL res -416 -560 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R10 SYMATTR Value 7k5 SYMBOL res -1216 96 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R3 SYMATTR Value 1.2Meg SYMBOL Opamps\\LTC6242 -224 -160 R0 SYMATTR InstName U6 TEXT -1824 504 Left 2 !.tran 2e-2

Reply to
Piotr Wyderski
Loading thread data ...

Yes, looks OK to me. Could your measuring meters be imposing too big capacitive load on the Vref buffer? Or supply bypassing is not enough? Have you checked with a scope for hf oscillation?

piglet

Reply to
piglet

fredag den 15. juni 2018 kl. 12.54.11 UTC+2 skrev Piotr Wyderski:

maybe relevant?

formatting link

Reply to
Lasse Langwadt Christensen

I'd be nervous about what the LTC6752 comparators were doing. They are fast - at 280MHz - and stray capacitances might be driving them into oscillatio n (which won't show up on the simulation).

A 2k resistive impedance on the reference input to a fast comparator makes me nervous. I'd probably add a capacitor or two to ground (and make sure th at the ground was very close to the one used by the by-pass capacitors on t he comparator).

--
Bill Sloman, Sydney
Reply to
bill.sloman

This comparator is just for the purpose of simulation, the real device uses TLV3502 (about as fast). It is standing still if the input current is within +/-10 amps, which means always. Its purpose is to detect an overload and turn the device off by activating a D flip-flop.

Moreover, the DUT doesn't have the comparator installed at all. I was replacing a chinese 6242 using hot air with a genuine one and set it up a bit to hot, blowing off the poor SOT23-8 part. The chinese and the other one, nee Mouser, exhibit exactly the same behavior, which makes me believe the seller is indeed a chinese LTC distributor.

Good point, but not in this case: the comparator is waiting in a jar to be soldered again.

Good point, but this can cause the opamp to go unstable. An RC filter would probably be better.

This is a 4-layer board with a dedicated ground plane.

Could this CMOS opamp be damaged *that way* due to an ESD during soldering? But two in a row, exactly the same way? Unlikely.

Best regards, Piotr

Reply to
Piotr Wyderski

Oh, you meant at the input side, no stability issues, never mind.

Best regards, Piotr

Reply to
Piotr Wyderski

You're pushing the input common-mode range of that amp. More supply voltage, or a RRIO amp, might help.

Or maybe something else is wrong. Measure all the node voltages and see.

You don't really need good opamps in an AC power meter. AC meters don't measure DC power, so you can ignore modest DC offsets in the voltage and current signals; a little software can auto-zero both signals.

--
John Larkin         Highland Technology, Inc 

lunatic fringe electronics
 Click to see the full signature
Reply to
John Larkin

I've wondered what a residential meter, rotating disk or CT current pickup, does when the load is, say, a diode and a resistive heater. The real DC power won't get metered right, and the DC current could slow down the disk or saturate the CT.

Even better, a diode+capacitor half-wave supply, with giant unidirectional current spikes.

--
John Larkin         Highland Technology, Inc 

lunatic fringe electronics
 Click to see the full signature
Reply to
John Larkin

How come?

"These op amps have an output stage that swings within

30mV of either supply rail to maximize the signal dynamic range in low supply applications. The input common mode range extends to the negative supply. They are fully specifi ed on 3V and 5V"

Please tell which datasheet parameter you are referring to.

Can't do that, this opamp is driving an LTC1407, which has ABS MAX of 4V.

This would require a new board spin. Currently I assume that *I* am wrong somewhere and that the mistake is dead-simple: a solder bridge somewhere or a misrouted trace. Moreover, I don't care at all about the opamp's linearity close to the rails, because it would mean the protected device is malfunctioning. I do care, however, about the linearity in the VDD/2 region, say +-0.8V wide.

It's not a power meter, but a very quick acting fuse (assumed ~3us from detection to a full disconnect, in reality may be much faster). The secondary function is the sample source of a digital PLL. I'd like to sample mains at 2*1Msps (the ADC is LTC1407), decimating like mad afterwards. For an FPGA 1MHz and 1kHz sampling rates are equally sluggish. Then the decimated stream could be used for metering, but this is not an essential function.

Sure, but I wanted to make it perfect the analog way just to learn something new. I'm just not sure what I have learnt... :-/

The board is composed of many semi-independent blocks and all of them were carefully designed and breadboarded. No surprise there, working as expected since the first power up. Except for this opamp front-end: since it simulated so well...

Best regards, Piotr

Reply to
Piotr Wyderski

What I said, input common-mode range.

We can't diagnose that very well from here. And things like that would make big errors, not little ones.

Measure all the node voltages with an high-Z DVM, and then think about it.

It's disconnecting the 230V mains?

--
John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  
 Click to see the full signature
Reply to
John Larkin

(snip circuit)

I have a question. U1's output is constant while the inverting input has varying voltage. Why is that and what is the purpose of U1's output?

Reply to
John S

U1 and U5 constitute a window comparator to check if the current is within the allowed range. Since the high-speed comparators have push-pull outputs, it is not possible to use the wired OR trick and a gate must be used to combine the results. So the gate might well be NC7SZ57/NC7SZ58, inverting the inversion introduced by swapping the + and - inputs of the comparator whereever needed, making PCB routing task a bit easier.

Best regards, Piotr

Reply to
Piotr Wyderski

The graph "Offset Voltage vs Input Common Mode Voltage" indicate

25uV at TA=25C and 1.5V. +/-300uV absolute worst max in the whole temperature range and in the -0.5..4V voltage range.

I don't consider an opamp which can't faithfully follow its input in the middle of its supply range without introducing ~40mV error an opamp at all, let alone a precision one. And the manufacturer is LTC, selected specifically in order to avoid the chip-related problems. If they can't do it, nobody can. So I still assume there must be my mistake somewhere. But the PCB is right, triple-checked.

Normally would have agreed, now I can believe *anything*.

Yes. There will be a snubber to absorb the inductive spikes. Its purpose is to bulk protect a hundred of MOSFETs against a possible short circuit event.

Best regards, Piotr

Reply to
Piotr Wyderski

Aargh! Disregard. I was thinking U1 was an op-amp.

Reply to
John S

(snip circuit)

I don't understand what is happening with U3's inputs. Look at the inverting input with respect to the non-inverting input. Same thing with U2.

They look broke to me.

Reply to
John S

You snipped my most important line:

"Measure all the node voltages with an high-Z DVM, and then think about it."

Against a hazard that expensive, you might consider a better approach.

--
John Larkin         Highland Technology, Inc 

lunatic fringe electronics
 Click to see the full signature
Reply to
John Larkin

The opamp is trying hard to make the difference between them as small as possible and I think this +/-120nanovolt range is indeee a very good approximation of the word "equal".

Best regards, Piotr

Reply to
Piotr Wyderski

That's why they used to sell those diodes that you stick in a socket and screw the bulb on top. But I thought the consensus was that they didn't work.

Reply to
Tom Del Rosso

They do reduce power consumption and make the bulb last a lot longer... for a given bulb.

--
John Larkin         Highland Technology, Inc 

lunatic fringe electronics
 Click to see the full signature
Reply to
John Larkin

But it seems light output would be reduced as much as power.

Reply to
Tom Del Rosso

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.