BBD compander gain / output question

Started by j_flanders, November 18, 2018, 07:52:55 PM

Previous topic - Next topic

j_flanders

EDIT:
The 'error' came from my DAW, so before going through all the posts and all those calculations, read the last post first:
https://www.diystompboxes.com/smfforum/index.php?topic=121394.msg1140948#msg1140948

I'm audio-probing the input and output of the compander in a bbd pedal and can't explain the results.

I have rather crude, DIY-equipment, but so far it seems to work well:
My 'signal generator' is a Ditto Looper, looping a pure sine wave (In this test I tried with 250Hz, 1000Hz, 2000Hz)
My 'scope' is a simple audio probe -> USB interface for guitar -> DAW (Reaper, using a real time frequency plot plugin, that shows me the amplitude of the input frequency)

Here's the compressor part of the circuit:



My first, side-question: The output is biased at 3V. Why wouldn't they bias around 1/2 which would be 4.5V?
Calculation for the output bias:
(1 + (10k + 10k)/30k)*1.8V = 3V
Which comes from this formula (bottom right) from the datasheet of the V571M:


My main question:
According to the datasheet I should expect an output vs input from the compressor like this:
in -24db  out:-12db
in:-18db  out: -9db
in:-12db  out: -6db
etc.

However the output I see is always 3db above what I would expect:
in:-30db  out:-12db (-30db + 15db + extra 3db)
in:-27db  out:-10.5db (-27db + 13.5db + extra 3db)
in:-24db  out: -9db (-24db + 12db + extra 3db)
in:-21db  out:-12db (-21db + 10.5db + extra 3db)
in:-18db  out: -6db (-18db + 9db + extra 3db)
in:-15db  out:-4.5db (-15db + 7.5db + extra 3db)
in:-12db  out: -3db  (-12db +  6db + extra 3db)
in: -9db  out:-1.5db ( -9db + 4.5db + extra 3db)
in: -6db  out:   0db  ( -6db +   3db + extra 3db)

The expander does the same thing but in the opposite direction.
What I would expect is:
in:-24db  out:-48db
in:-18db  out:-36db
in:-12db  out:-24db

What I see when probing the input and output of the expander ( which in the circuit only has in and out connected and a Crect and Thd trim cap):
in:-24db  out:-54db (-24db - 24db -6 extra db)
in:-18db  out:-42db (-18db -18db -6 extra db)
in:-12db  out:-30db (-12db -12db -6 extra db)

Eventually these 3db and 6db differences cancel out:

compressor in/out:
in: -30db out:-12db

expander in/out:
in: -12db out:-30db

But I still wonder where they come from and also wonder if adding 3db of gain to the compressed signal, which (after going through the antialias filter, which is set for unity gain up to 1/2 clock frequency) goes to the first BBD should better be avoided.

The image above showing the compressor from the datasheet also has a gain formula, but I don't know if that is related, nor what value to enter for Vin.

Looking at the DMM schematic, I see they put an extra 68k resistor across R3, the internal 20k resistor. Is that related, or why would they put it there? Lowering R3 would infact increase gain though, not?...
DMM compressor part:


Rob Strand

#1
The formula for the gain uses Vin_av.

Vrms = 0.707 * Vpk
Vav   = 0.693 0.636 * Vpk

Vp = one sided peak (0 to the peak)

I should ask. How are you measuring the voltage? Peaks?



Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Rob Strand

QuoteMy first, side-question: The output is biased at 3V. Why wouldn't they bias around 1/2 which would be 4.5V?
Calculation for the output bias:
(1 + (10k + 10k)/30k)*1.8V = 3V
The examples in the datasheet are 3V because the supply is 6V.
Some people copy the datasheet for other voltages but the biasing is stuck on 3V and is non-optimal.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

j_flanders

Thanks Rob, but I'm afraid I still don't understand.
Gain depends on input voltage.
I'm varying the input voltage.
How can the db always be 3 while the gain is different for each input voltage?

For example:

input: 10mV peak to peak:

Vav =  0.693*0.005 = 0.003465
gain= sqrt((10000*20000*0.000140)/(2*30000*0.003465)= 11,6 (+db around 20db ?)

output= 116mV

-------------------
input= 100mV peak to peak:

Vav =  0.693*0.05 = 0.03465
gain= sqrt((10000*20000*0.000140)/(2*30000*0.03465)= 3.6 (+db around 9,5 ?)

output= 3,6V

Rob Strand

#4
Here's how I just calculated it:

0dB  = 1mW into 600 ohms
0dB  corresponds to Vrms = sqrt(1e-3*600) = 775mV          ; a lot of people will know this number
Vav = (0.636/0.707)*Vrms = 0.9 * Vrms  = 698mV

Compressor formula:
gain  = sqrt(R1 R2 Ib /(2*R3 * Vin_av))
         = sqrt(10k * 20k 140e-6 / (2*20k * 0.698))
         = 1.0

I think this is correct now.
----------------
You just posted the same time as me.
Give me a sec to check your calcs.

I also screwed up my calculation. (now fixed)
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

j_flanders

#5
Quote from: Rob Strand on November 18, 2018, 08:53:19 PM
Some people copy the datasheet for other voltages but the biasing is stuck on 3V and is non-optimal.
My example is also used by Boss: 9v -> 3v bias
The other example is EHX DMM and uses -15v with bias of -9,96v (and their expander to 6.26v)

Both are not 'some people", or so I thought...

Rob Strand

#6
QuoteMy example is also used by Boss: 9v -> 3v bias
The other example is EHX DMM and uses -15v with bias of -9,96v

Both are not 'some people", or so I thought...
Agreed but I've see it a lot.  IIRC there's some point in the datasheet or applications notes where they talk about the bias point. [See two posts down]

There are more details consider: the gain cell and the rectifier have signal swing limits. If we just use the internal values of R1, R2, R3 and don't add external series resistors that restricts the allowed voltage swing.  However it still doesn't make sense because an asymmetrical bias might stop overload in one direction but it will make it worse in another.  I used to know all the details of those chips in my head.  Some of it has withered away.   I'm pretty sure there's no reason for the skewed biasing over symmetrical biasing.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Rob Strand

#7
Quotegain= sqrt((10000*20000*0.000140)/(2*30000*0.003465)= 11,6 (+db around 20db ?)
I think you are using 30k for R3 when it should be 20k.

30k (R4) is the bias resistor and 20k (R3) is the input resistor.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Rob Strand

#8
Regarding the biasing,
https://pdf1.alldatasheet.com/datasheet-pdf/view/18878/PHILIPS/NE571.html
https://pdf1.alldatasheet.com/datasheet-pdf/view/18878/PHILIPS/NE571/+07JJ9UL.hKpRudSICEY+/datasheet.pdf

Look at figure 4.  This circuit is running on 15V.   pins 5,12 have an 8.2k to tweak the bias point.
--------------
Edit: And at the bottom of the second column on page 5:

Expandor case only:
"The output will bias to 3.0V when the internal resistors are used.
External resistors may be placed in series with R3, (which will affect
the gain), or in parallel with R4 to raise the DC bias to any desired
value."   

Compressor case is just above that:
"The values of RDC will
determine the DC bias at the output of the op amp."
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

j_flanders

Ok, let's first tackle the bias issue:

For example Boss DM2 and 3:

Compressor:
Bias = (1 + (Rdc1+Rdc2 / R4)) * 1.8

Rdc1 = 10k (external)
Rdc2 = 10k (external)
R4 = 30k (internal)

Bias = (1+ (20/30)*1.8
Bias = 3V
Vcc = 9V


Expander:
Bias = (1 + (R3 / R4)) * 1.8

R3 = 20k (internal)
R4 = 30k (internal)

Bias = (1+ (20/30)*1.8
Bias = 3V
Vcc = 9V

Remarks:
For the compressor there's no need to 'tamper' with the internal resistors as you can set the bias lower or higher through Rdc1 and Rdc2 alone.
For the expander you need to 'tamper' with the internal resistors and you can either change R3 which changes gain and input impedance or change R4.

Another example EHX DMM (ec 2002 version, but the same on ec2000 and others):

Compressor:
Bias = (1 + (Rdc1+Rdc2 / R4)) * -1.8

Rdc1 = 68k (external)
Rdc2 = 68k (external)
R4 = 30k (internal)

Bias = (1+ (136/30)*1.8
Bias = -9.16V
Vcc = -15V

DMM has an extra 68k resistors parallel to R3(the internal 20k). This can only change the gain, as R3 is not involved with setting bias for the compressor.

Expander:
Bias = (1 + (R3 / R4)) * 1.8

R3 = 20k (internal)
R4 = 30k (internal)

DMM has an extra 7.5k resistor in series with R3 (7.5k from pin 10 to pin 11)
DMM has an extra 11k resistor parallel to R4 (11k from pin 12 to ground)

Their R3 and R4 values:
R3 = 27.5k from: 20k + 7.5k
R4 = 6k from: (1/(1/30 + 1/11)

Bias = (1 + 27.5/6) * -1.8
Bias = -5.15V
Vcc = -15V

So, DMM increases compressor gain by lowering input resistor R3, and increases expander gain by increasing R3. It compresses more and expands more. I have no DMM to check how they deviate from the 1:2 and 2:1 ratios.
Boss DM2 sticks to the 1:2 and 2:1 ratios as it never changes the internal resistors, but there's still that unexplained extra +3db in the compressor and extra -6db in the expander.


Now for the gain question...
I assume the gain calculation would result in 2 and 0.5, regardless of the input.
-24db compresses to -12 (-12db expands to -24db)
-18db compresses to -9 (-18db expands to -9db)
The ratio is always 2:1

However in the circuit I'm probing, that ratio changes:
-24db compresses to -9db
-18db compresses to -6db
First ratio is 2.6 and the next ratio is 3

So, I'm thinking that the extra +3db and -6db have nothing to do with the gain. It seems like my 0db level has been offset by 3db... (there's something in the datasheet about that, I think)
Compressor should compress -6db to -3db according to the 2:1 ratio
But in my case it compresses -6db to 0db. I don't think there's a gain that could do this. Only 0db compresses to 0db. Even -0.000002db would compresses to -0.000001db.
Unless perhaps you change the gain, but my circuit is not changing the compressor gain, only the bias...

Quote from: Rob Strand on November 18, 2018, 09:18:21 PM
I used to know all the details of those chips in my head.  Some of it has withered away.   
I know. :)
Because the past two weeks I've been looking for info on the compander chips and 90% of everything I can find comes from your (and Mark's) posts here...
I've read the datasheets of all the available compander chips multiple times.
I also remembered someone talking about the spec sheets, and more specifically the gain formula's being wrong in all datasheets except for one.
I couldn't find that specific post last night, but now I have:

https://www.diystompboxes.com/smfforum/index.php?topic=98995.msg870831#msg870831
Quote from: R O Tiree on September 29, 2012, 07:29:37 AM

I've learned to take datasheets with a fairly large pinch of salt... Take the NE570/1, for example.  On the vast majority of datasheets for this family of companders, the gain formula is incorrect for the expander.  Even "Making Music With The NE570 Compander", which set out to de-mystify this chip and its applications, simply copies the same error blindly.  I set up a spreadsheet with a graphics "front end" to enable me (and, if it worked, anyone else who wanted it) to click a button, set a resistor value here and there to see what would happen to the gain curves and the output DC bias values.  The sums just did not add up.  So, I breadboarded a bog-standard compressor linked directly to an expander as per the datasheets' test circuits.  Unsurprisingly, I found that the test signal out of the expander matched the input signal to the compressor within a couple of percent.  That is, after all, what the thing was designed to do in the first place.  However, comparing the signal going into the expander and that coming out, I just could not reconcile it with my spreadsheet.

There's a square-root in the gain equation for the compressor, and the equation works perfectly in real-life.  Have a look at this excerpt taken from the relevant page of the OnSemi datasheet:



On most datasheets, however, you'll see a square term for the expander section, as above.  The truth is, that square term should not be there.  One might think that symmetry would dictate that it should be and, clearly, so did the person who originally made this error, which most people have copied verbatim.  The equation is correct on the Philips datasheet for the SA570, by the way, dated 2003 on the version I have squirrelled away on my hard drive, and the 2 chips are direct drop-in replacements for each other.

In order for the sums to work correctly, Vin(Avg) is defined as 0.9*Vrms, for a sine wave test signal, and (for those who need it) Vrms is V/SQRT(2), where V is the amplitude, or ½Vp-p.  The resistor values in the equations are those internal to the chip, values as follows: R1 = 10k, R2 and R3 = 20k.  So, work out Vin(Avg), do the sum for the compressor gain and then multiply by Vin again to get the output amplitude.  That's your "new" Vin.  Now do the sum again for the expander gain (work out Vin(Avg) based on "new" Vin), multiply by "new" Vin and you should end up with the same as the original.

Bottom line... See that test circuit on the datasheet?  How about building it and proving that it works?  99+% of the time, it will be exactly as advertised, but at least you proved you haven't got a duff chip.  If it doesn't work, try another chip and then start investigating further if your results are consistently different to the datasheet's.


Quote from: Rob Strand on November 18, 2018, 09:22:15 PM
I think you are using 30k for R3 when it should be 20k.
Yes, I accidentally mixed them up. But even with the correct value, I still don't understand how it relates to the 3db offset.

Rob Strand

#10
You have done a really great job of writing that up.

QuoteFor example Boss DM2 and 3:
Compressor:
Expander:
Correct.

QuoteRemarks:
For the compressor there's no need to 'tamper' with the internal resistors as you can set the bias lower or higher through Rdc1 and Rdc2 alone.
For the expander you need to 'tamper' with the internal resistors and you can either change R3 which changes gain and input impedance or change R4.
Yes that's correct.

QuoteAnother example EHX DMM (ec 2002 version, but the same on ec2000 and others)
Compressor:
Expander:
:
The calculations are fine  Only one detail here about interpreting the results:  It is actually clearer and more correct to do all the calculations with a positive voltage +15.7V.   After that,  you then interpret the DC bias voltages as being measured referenced to the -15.7V rail.      If you measured the DC voltages references to 0V marked on  the circuit you would not measure your calculated values.   The reason is the circuit's ground is positive but the NE570's ground is actually connected to -15.7V.   It's a bit of a weird psu set-up.

QuoteSo, DMM increases compressor gain by lowering input resistor R3, and increases expander gain by increasing R3. It compresses more and expands more. I have no DMM to check how they deviate from the 1:2 and 2:1 ratios.
Boss DM2 sticks to the 1:2 and 2:1 ratios as it never changes the internal resistors, but there's still that unexplained extra +3db in the compressor and extra -6db in the expander.
OK a couple of things here.  One point may clear-up your dilemma.

Those compressors and expanders are *always* 2:1.   This comes out in the maths.   You can't actually change the compression ratio unless you change the structure by changing *how* the gain and rectifier connections are made.  For example the ALC circuit has infinite compression but it changes how the connections are made.

What you can change is the gain.    I can start with one circuit and boost or decrease the gain by changing R3.    So if before I put 775mV in and got 775mV out I could modify the circuit to increase the gain (by 1/0.775) so the output is say 1V when the input is 775mV.  In your mind think of this as just adding an extra gain stage after the compressor or expander.

Now here the most important point.   A compression ratio of 2:1 means if the input *changes* by 6dB the output will *change* by 3dB.     It does not mean the output is 3dB lower than the output.   That *can* occur but it occurs under special conditions.

Suppose we have two circuits.    Both compressors and both 2:1.  the difference is one has a gain 3dB higher than the other.
Circuit 1:   Baseline: Input level 775mV  output 775mV gain 0dB.
                Increase input: Input level 1550mV (6dB higher baseline input).  Output  1095mV (3dB higher output)
                The input *changed* 6dB.  The output *changed* 3dB.
                The output just happens to also be 3dB lower than the input.

Circuit 2:   Baseline: Input level 775mV  output 1095mV, gain 3dB.
                Increase input:  Input level 1550mV (6dB higher than baseline input).  Output 1547mV (3dB higher output)
                The input *changed* 6dB.  The output *changed* 3dB.
                However note the input and output are the same after the input changed to the higher level.

What is happening here is:
-  the ratio of the input change (in dB) to output change (in dB) is the same in Circuit 1 and Circuit 2.  This follows from the 2:1 compression ratio.   
- The output voltage relative to the input voltage does not follow the compression ratio.   It does in circuit 1 but not in circuit 2.    That follows because we can make the overall gain anything we want.

What you might notice is the second circuit produces an output voltage the same as input voltage at 1550mV where as the first circuit this point occurs at 775mV.     The voltage where the input and output agree can be called the reference voltage.      For a 2:1 compressor, if you make the 6dB higher or lower than this reference voltage the output will be 3dB higher or lower.   

We can re-interpret the results like this:

Circuit 2:
      Baseline:  Input level 1550mV .  Output 1547mV
      Decrease input:  Input level 775mV  (6dB lower than baseline input) output 1095mV (3dB lower output)
      The input *changed* 6dB.  The output *changed* 3dB.
      Now the output just happens to be 3dB lower than the input.

The main points here are:
- the compression ratio refers to the changes in dB of the input and output.
- there's the concept of reference level [or unity gain level].  For a compressor inputs above the reference level
  are made softer and those below the reference level are made louder.
- the addition of overall gain is one way to shift the reference level.

QuoteNow for the gain question...
So if you look at the dB changes of the input and output in all of your results you will see they are all 2:1.

QuoteI also remembered someone talking about the spec sheets, and more specifically the gain formula's being wrong in all datasheets except for one.
I couldn't find that specific post last night, but now I hav
Some of the documents have errors.    I don't agree that having convert Vin to Vin_av is an issue.  It's an added detail but the circuit does work like that.   Some compressors don't use averaging rectifiers they use rms rectifiers (or even peaks detectors).

I'm pretty sure the formulas in the NE570 datasheet are correct: fig 3 for the expander and fig 4 for the compressor.   Some of the app notes have issues.  All the formulas can be derived by analysing the circuit starting with the formulas in fig 6 and fig 9.  You need one additional piece of information that Vout_av  / Vin_av = Vout / Vin;  all that is saying is the waveform doesn't change shape (sine in gives sine out).  The compressor needs a bit of mathematical care to manipulate it into the right form.   You don't want Vout_av in your formulas you want Vin_av; and that's where the "added piece" comes in.

So I guess there's some things you need to check:
- When you measure xxxdB  what voltage is 0dB?  (0dB for your measurement may not correspond to the reference voltage for the compressor/expandor.)
- When you calculate gain you have to use volts.  So that means converting the dB measurement to voltages.
- When you calculate gain you will have to convert the voltage to Vav using the appropriate conversion factor to get from peak-to-peak, peak, or rms to average; assuming a sine.  Those are in my earlier posts.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Scruffie

Just to point out for the DMM the bias is high on the compander side because there's a voltage divider right after it to cut the signal back down (again) and so the op amp gets its half supply.

Rob Strand

I've back engineered your voltage measurements
and adjusted the *measurement* voltage reference
so the measurements match the calculations

Measurements:
QuoteHowever the output I see is always 3db above what I would expect:
in:-30db  out:-12db (-30db + 15db + extra 3db)
in:-27db  out:-10.5db (-27db + 13.5db + extra 3db)
in:-24db  out: -9db (-24db + 12db + extra 3db)
in:-21db  out:-12db (-21db + 10.5db + extra 3db)
in:-18db  out: -6db (-18db + 9db + extra 3db)
in:-15db  out:-4.5db (-15db + 7.5db + extra 3db)
in:-12db  out: -3db  (-12db +  6db + extra 3db)
in: -9db  out:-1.5db ( -9db + 4.5db + extra 3db)
in: -6db  out:   0db  ( -6db +   3db + extra 3db)

Calculations: (for compressor)

V dB ref =    0.390 V      (used to convert Vin and Vout to dB; dB = 20*log10(Vmeas/VdB_ref))
            
Vin [dB]   Vrms [V]   gain [lin]   gain [dB]   Vout [dB]
         

-30        0.012          7.94          18.00           -12.00
-27        0.017          6.68          16.50           -10.50
-24        0.025          5.62          15.00           -9.00
-21        0.035          4.73          13.50           -7.50
-18        0.049          3.98          12.00           -6.00
-15        0.069          3.35          10.50           -4.50
-12        0.098          2.82          9.00          -3.00
-9        0.138          2.37          7.50          -1.50
-6          0.195          2.00          6.00          0.00
                        

So it seem 0dB on your measurement system corresponds to  0.390V

The funny thing is 2x0.390V = 0.780; something close to 775mV.


Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Rob Strand

#13
So I checked the expander as well.  Your measurements:
Quotein:-24db  out:-54db (-24db - 24db -6 extra db)
in:-18db  out:-42db (-18db -18db -6 extra db)
in:-12db  out:-30db (-12db -12db -6 extra db)

Calculations (for Expander)
            
V dB ref =    0.390         
            
Vin [dB]   Vrms [V]   gain [lin]   gain [dB]   Vo [dB]
            
         
-24          0.025          0.03          -30.00   -54.00
-18          0.049          0.06          -24.00   -42.00
-12          0.098          0.13          -18.00   -30.00


I get the same conclusion that the dB reference voltage for the measurement
system is  0.390V.

At least it is consistent with the compressor.   So you need to input a known voltage into your measurement system then see what dB is shown.   That will let you "calibrate"  the dB reference voltage.
-------------------
BTW don't confuse the Reference level for the compressor or expander with the reference level for the measurement system.   The reference level for the measurement system determines what voltage
corresponds to 0dB measurement.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

j_flanders

Quote from: Rob Strand on November 19, 2018, 05:48:43 PM
So I guess there's some things you need to check:
- When you measure xxxdB  what voltage is 0dB?  (0dB for your measurement may not correspond to the reference voltage for the compressor/expandor.)
- When you calculate gain you have to use volts.  So that means converting the dB measurement to voltages.
- When you calculate gain you will have to convert the voltage to Vav using the appropriate conversion factor to get from peak-to-peak, peak, or rms to average; assuming a sine.  Those are in my earlier posts.
Thanks for the detailed replies and those suggestions, and making me actually check all that. :)
Because after checking the looper-usb-daw-'scope' I'm afraid I have to say that is where the 3db difference comes from. Sorry. :-[

Originally this started out as checking for bbd insertion gain/loss at different frequencies, but looking at the recording db meter in the DAW gave me unexpected results, which made me realize that noise and clock frequency were also present in that level reading.

To eliminate those I switched to using the real time spectrum analyzer. That way I could see the (db)level of the input frequency alone.
Although I knew that certain settings such as 'slope' and 'block size', 'smoothing' etc. would affect the overall frequency response, I just assumed, wrongly so, that they wouldn't matter when checking the level of one specific frequency.

Depending on the block size, the 'db error' after compression changes. If I had chosen a different block size, we would have been trying to figure out where the extra 4.5 db or extra 6db difference came from, instead of that extra 3db...

One specific block size gives the correct results, but I know too little, actually nothing, about FFT, all those windows (Hamming, Hanning, Barlett etc) to be sure that that will work with other frequencies as well.

To double check, I used my DMMeter:
Ditto Looper : 2000Hz sine wave
Adjusted block size in DAW to 8192 to get 'correct' results.

Pre compressor/Post Compressor:

Pre.: 0.050 Vrms(dmm) = 0.141 Vpp(calc) =  -24db (daw)
Post: 0.191 Vrms(dmm) = 0.540 VPP(calc) =  -12db (daw)
Voltage gain: 3.83 => 11,64 db

Pre.: 0.100 Vrms(dmm)  = 0.283 Vpp(calc) = -18db (daw)
Post: 0.275 Vrms(dmm)  = 0.778 VPP(calc) =  -9db (daw)
Voltage gain: 2.75 => 8.8 db

...
Pre.: 0.250 Vrms(dmm) = 0.707 Vpp(calc) =  -9db (daw)
Post: 0.438 Vrms(dmm) = 1.239 VPP(calc) = -4.5db (daw)
Voltage gain: 1.752 => 4,8 db

That looks more like it. :)

Quote from: Rob Strand on November 19, 2018, 05:48:43 PM
I'm pretty sure the formulas in the NE570 datasheet are correct: fig 3 for the expander and fig 4 for the compressor. 
I think he's referring to the expander gain formula, specifically the ²
In most datasheets for the 570/571 it's this:
From the Philips data sheet:


In the ON Semi it's this:


(I'll change the entry post to prevent people from going through all those calculations and point them to here)
Thanks again!

Rob Strand

Quoteecause after checking the looper-usb-daw-'scope' I'm afraid I have to say that is where the 3db difference
Good you found it.

QuoteOne specific block size gives the correct results, but I know too little, actually nothing, about FFT, all those windows (Hamming, Hanning, Barlett etc) to be sure that that will work with other frequencies as well.
There's plenty of traps in this stuff.   In some software the windows don't have a gain of one (they use un normalized windows out of textbooks and it's really annoying).    If I don't want to think about it I might use Hanning, Hanning^2, or Blackman-Harris.  I'll use larger block sizes say 16384 to 65536.   Averaging is rarely bad for sine-wave inputs and takes the fuzz out of the spectrum.  I always do a calibration check.

QuoteTo double check, I used my DMMeter:
Ditto Looper : 2000Hz sine wave
Some DMMs are off a bit at 2kHz, 1kHz not bad but 200 to 400Hz better.  Unfortunately 200 to 400Hz might trigger more problems with your FFT's.   You can check your meter by outputting 200, 400, 1k 2k from a PC (or DSP board) and measuring it with the DMM.  If your output levels are set to the same the level for each frequency,  the signal level coming out should be fairly consistent so when you measure  any variations you see are probably due to the DMM.

Once you confirm your DMM.  It's worth doing some FFT checks at different frequencies.  Write down the settings that work.  One day it will come in handy.

QuoteThat looks more like it.
Definitely!  I believe those results.

QuoteI think he's referring to the expander gain formula, specifically the ²
In most datasheets for the 570/571 it's this:
From the Philips data sheet:
In the ON Semi it's this:
I've seen that error.  I didn't realize it was on the ON Semi datasheets.  The Philips one is right for sure.
Most of my life I used the Philips docs.

This databook has the original Philips data and all the app notes:
ftp://bitsavers.informatik.uni-stuttgart.de/components/signetics/_dataBooks/1989_Linear_Data_Manual_Volume_1_Communications.pdf
PDF pages 402 to 433
Document pages 4-325 to 4-356
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.