What's wrong with this?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
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

Re: What's wrong with this?
On 15/06/2018 11:54, Piotr Wyderski wrote:
Quoted text here. Click to load it

Quoted text here. Click to load it

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


Re: What's wrong with this?
On Friday, June 15, 2018 at 10:02:51 PM UTC+10, piglet wrote:
Quoted text here. Click to load it

Quoted text here. Click to load it
  
Quoted text here. Click to load it

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


Re: What's wrong with this?
snipped-for-privacy@ieee.org wrote:

Quoted text here. Click to load it

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.

Quoted text here. Click to load it

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

Quoted text here. Click to load it
 > I'd probably add a capacitor or two to ground

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

Quoted text here. Click to load it

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


Re: What's wrong with this?
Piotr Wyderski wrote:

Quoted text here. Click to load it

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

    Best regards, Piotr


Re: What's wrong with this?
snipped-for-privacy@ieee.org wrote:

[snip]

Bill, you and Lasse were right, the opamp was oscillating.
However, in a very Heisenberg-like fashion, it was hard to
catch it red-handed. The frequency was 2.53MHz. Adding 68nF
between VREF and GND silenced it completely, reducing the
total offset to a magnificent value of 200uV (end to end,
including the ampification stage). Now it is 8 times better
than what the datasheet says and super-linear and symmetric
in the desired range of load currents. The LTC1407 ADC
attached after this stage shines, too.

Thank you for your help, case closed, I owe you all a beer!

A side effect is that I know of a cheap proven Chinese
distributor of genuine LTC parts, if somebody is interested.
The name of the shop is POCCIO on AliExpress.

    Best regards, Piotr


Re: What's wrong with this?
On Sunday, June 17, 2018 at 6:32:57 PM UTC+10, Piotr Wyderski wrote:
Quoted text here. Click to load it

Pimpom suggested it first,and I was more worried about the comparators oscillating which was a bit silly when they weren't there.

Quoted text here. Click to load it

Offsets do have a habit of reflecting oscillations somewhere in the circuit, and scope probes often add enough capacitance to kill the oscillation.

Quoted text here. Click to load it

The datasheets mostly list worst cases ...

Quoted text here. Click to load it

That's worth knowing. I've been a fan of Linear Technology for a very long time, when the customer needs the performance enough to justify the price.

--  
Bill Sloman, Sydney


Re: What's wrong with this?
On 17/06/2018 11:03, snipped-for-privacy@ieee.org wrote:
Quoted text here. Click to load it

Not pimpom, same initial letter, but it was I, piglet :)

piglet



Re: What's wrong with this?
On Tuesday, June 19, 2018 at 12:38:47 AM UTC+10, piglet wrote:
Quoted text here. Click to load it

I'm mortified. I actually checked before I posted, but clearly not carefully enough.

--  
Bill Sloman, Sydney

Re: What's wrong with this?
On Sunday, June 17, 2018 at 4:32:57 AM UTC-4, Piotr Wyderski wrote:
Quoted text here. Click to load it

You wouldn't have had to go to all this trouble if you incorporated broken  
loop gain/phase analysis into your SPICE. Anything less is a wish. Your cir
cuit may still be marginal and unstable with environmental and component va
lue shifts. https://pdfs.semanticscholar.org/8201/8b9c16d5686e4342ee76b008a
7c6affed3c9.pdf

Re: What's wrong with this?
fredag den 15. juni 2018 kl. 12.54.11 UTC+2 skrev Piotr Wyderski:
Quoted text here. Click to load it

maybe relevant? https://youtu.be/1VlKoR0ldIE


Re: What's wrong with this?
On Fri, 15 Jun 2018 12:54:07 +0200, Piotr Wyderski

Quoted text here. Click to load it

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  


Re: What's wrong with this?
On Fri, 15 Jun 2018 08:15:21 -0700, John Larkin

Quoted text here. Click to load it


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  


Re: What's wrong with this?
John Larkin wrote:
Quoted text here. Click to load it

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.




Re: What's wrong with this?
On Sat, 16 Jun 2018 20:28:49 -0400, "Tom Del Rosso"

Quoted text here. Click to load it

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  


Re: What's wrong with this?
John Larkin wrote:
Quoted text here. Click to load it

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




Re: What's wrong with this?
On Sat, 16 Jun 2018 22:43:46 -0400, "Tom Del Rosso"

Quoted text here. Click to load it

More, actually.


--  

John Larkin         Highland Technology, Inc

lunatic fringe electronics  


Re: What's wrong with this?
John Larkin wrote:
Quoted text here. Click to load it

That's what I meant.  It's inevitable since it's so inefficient and  
designed for the least inefficiency with a full wave.




Re: What's wrong with this?
On Saturday, June 16, 2018 at 10:43:52 PM UTC-4, Tom Del Rosso wrote:
Quoted text here. Click to load it

Or more so.  The radiation curve has to be pretty high to get decent light out.  If you aren't heating the temperature high enough all you get is heat.  Lower the watts in and the temperature drops considerably and you get more heat relative to the light.  

Rick C.  

Re: What's wrong with this?
On Sunday, June 17, 2018 at 2:52:35 PM UTC+10, snipped-for-privacy@gmail.com wrot
e:
Quoted text here. Click to load it
t out.  If you aren't heating the temperature high enough all you get is he
at.  Lower the watts in and the temperature drops considerably and you get  
more heat relative to the light.  

Radiated power rises as the fourth power of temperature, so less power mean
s a lower temperature, and even less radiation at wavelengths we can see.

Most of the power we put into a filament lamp comes out as infra-red radiat
ion anyway, and running it cooler makes this worse.

https://en.wikipedia.org/wiki/Black-body_radiation

--  
Bill Sloman, Sydney

Site Timeline