Precision AC Calibrator for Audio Measurement

Go To Last Post
19 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Prompted by my recent build of a DC reference, and another freak's mention of a video calibrator I've been wondering about AC calibration, in particular in the context of audio levels. A quick simulation...

 

 

 

 

...shows exactly what you'd expect. The precision elements would be the voltage reference, V1, and the two resistors R1 and R2. U1 just needs to make a decent virtual earth mix point and plays no real part in the precision of the unit. By using an AVR to drive the switch, V5, you can make the switching frequency have a non-integer relationship to the input signal which means that the output signal, when free-running on a 'scope, will not appear 'locked'. All you need to do is observe where the positive peaks and negative peaks meet and adjust the input level until they touch.

 

It should be trivial to reach 0.5% basic accuracy which is a 0.04dB error.

 

Can anyone see any problems?

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Interesting approach.

What part will VcSW1 be?

Will it introduce an additional error in the precision reference signal?

If so, you might end up with another stage to allow one to tweak the reference signal.

 

Given that you have a precision reference voltage, and an op-amp, an alternative approach might be to configure the op-amp as a precision detector / envelope detector.

Feed the Vref and the Envelope Detector voltages into a second op-amp with whatever gain you want to amplify the voltage difference between the two.

(Convert mV difference to 1/10ths of a volt difference, etc.)

 

Now a micro can read the difference voltage and display it on an LCD / GLCD.

Add an LED or two, (a project can never have too many LEDs), to show that the input is way too high, getting close, or is set "perfectly", (based upon how close you want it, and have the ability to adjust it), and add a couple more LEDs for the signal is too low, getting close, etc.

 

Sounds like a weekend project!

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:

What part will VcSW1 be?

 

In my chip drawers I have some DG211/308/309; I need to check out if there is any leakage of the control signal into the signal path. But yes, any ON resistance there will need to be taken into account. If the channel-to-channel matching was any good I could use a second switch in the input path.

 

 

DocJC wrote:

If so, you might end up with another stage to allow one to tweak the reference signal.

[

 

That's what I want to avoid as that tweak requires a calibrated 'something'.

 

DocJC wrote:

Given that you have a precision reference voltage, and an op-amp, an alternative approach might be to configure the op-amp as a precision detector / envelope detector...

 

Interesting idea. Thanks.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Use high value of resistors (maybe 10k, 100k)...then the switch ohms or ohms drift is a much lower fraction...5 ohms out of 1000 is much worse than 5 out of 100000.

higher ohms means higher thermal noise

higher ohms affected by moisture, dirt, etc

higher ohms picks up external noise easier.

higher ohms increase bias current offset voltage (IxR).

 

The opamp seems way overdone. except possibly to have an instant transient switch response.  All of your signals are KHz and no gain.

You could prob use a 1 MHz part & certainly easily use a 5 MHz part.

Why put an extreme BW (34 MHZ!!) opamp in ??

High BW is great for picking up noise & requiring even more stringent bypassing.

High BW means other things are traded off against it, like 

    poor offset voltage, reducing precision

    rail-rail input

    rail-rail output

    single supply output

    drift stability

    cost  $$

 

Where is this sinewave from & why can't you electronically offset that sinewave circuit?  Or perhaps, that is an input signal?

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Mon. Jun 1, 2020 - 04:32 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:

Why put an extreme BW (34 MHZ!!) opamp in ??

 

It was near the top of the list in the simulator's drop-down selection menu!

 

In real life I'd be looking at something with a low input bias current.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0



In real life I'd be looking at something with a low input bias current.

    you have a lot of leeway, since your ohms are low

 

Years ago, I got some samples of a new chip...we were building sample /hold integrators...you could see the meter voltage slowly drift by a volt after maybe 10 seconds...we didn't care, since we'd take readings within 20 microseconds.   I said let's try a chip I just got ...so we popped it in (back when using sockets) & jetted for lunch. We returned in an hour and wondered who messed with our setup, since the error voltage was still zero.  Turned out the drift was femtoamps...and  it would take DAYS before any drift would be noticable.

   

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

PArdon my ignorance.......

 

What exactly would this circuit be good for?  In looking at the simulator output you are switching the peak to peak output from +/-1v then to -1/-3v @ 33.3 hz

 

I am not seeing what this would help with calibrating.

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jim, it confirms that the size of the input signal is as you expect, in this case that it's p-p value is 1v.

 

It's essentially what's inside a video calibration box as I discussed in another thread; with video signals you care a *lot* about the absolute level of the signal, to within millivolts.

 

I'm not sure I'd see a need to use it for audio, though, given the logarithmic response of the ear, unless I was trying not to exceed, say, a hard limit for a digital input (and really, you should be 12dB below that point).

 

As an aside; I wonder if for precision you would need to match the output impedances of the voltage source (including the series resistance of that switch) and the signal. Ideally you'd want them both as low as possible, no?

 

Neil

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 I wonder if for precision you would need to match the output impedances of the voltage source (including the series resistance of that switch) and the signal. Ideally you'd want them both as low as possible, no?

Of course, sort of. 

If the 2V is measured at the final output of the source (during circuit operation), then NO, as it is already included. 

If the 2V is measured before the output impedance (during circuit operation), then YES, it needs included.

 

Show your sinewave circuit...can its output simply be electronically offset (rather than using the switch).  

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Mon. Jun 1, 2020 - 12:23 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:

Show your sinewave circuit...can its output simply be electronically offset (rather than using the switch).  

 

It's a sinewave from an unknown source, so it will need buffering.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jgmdesign wrote:

Pardon my ignorance.......What exactly would this circuit be good for?  In looking at the simulator output you are switching the peak to peak output from +/-1v then to -1/-3v @ 33.3 hz

 

Consider yourself pardoned.

 

I've been thinking about how to validate the measurements we all make with our test instruments.

 

Resistance = easy. Precision resistors are not difficult to buy and not too expensive.

DC Voltage = easy. Little precision references, like I used in my recent post, are now cheap and widely available.

Time and Frequency = easy. GPS disciplined TXCOs can be bought for not much money on eBay.

DC Current = not too hard. Voltage and Resistance are easy so add those together and you get a current, albeit relatively small.

 

Where it starts to get tricky is AC.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

barnacle wrote:
It's essentially what's inside a video calibration box as I discussed in another thread; with video signals you care a *lot* about the absolute level of the signal, to within millivolts.

As someone who has spent the majority of my working career in analog video I certainly know about signal levels in that world.

 

Brian Fairchild wrote:
Consider yourself pardoned.

Not sure how to take that....

 

MY question is based on the signal levels you have shown in your simulators o-scope, and teh circuit itself where you switch the signal offset with a 33.3hz squarewave.  I could see using a human activated switch as sort of a range selection, but not a 'modulation' scheme.  Hence why I am asking where would you use this to calibrate an instrument or device?

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DC Current = not too hard. Voltage and Resistance are easy so add those together and you get a current, albeit relatively small.

Well, that's fine, if you want to make a current going directly to GND...probably useless, unless using that to cal a clamp-on current meter.   Anything else (driving a load) will topple the apple cart (unless your resistance is a very high value, like making micoramps).  With an opamp added to the mix, you can make a current source (or sink)...for higher currents, also add a power transistor. 

 

It's a sinewave from an unknown source, so it will need buffering.

And protection .....so someone hooks to a 24V DC supply or maybe AC line by mistake.   Use some protection scheme and deny the incoming troubles. 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jgmdesign wrote:

Brian Fairchild wrote:
Consider yourself pardoned.

Not sure how to take that....

 

Please take it in the spirit it was intended, meant with good humour. No slight intended.

 

jgmdesign wrote:

MY question is based on the signal levels you have shown in your simulators o-scope, and teh circuit itself where you switch the signal offset with a 33.3hz squarewave.

 

The 'trick' is to run the timebase on the scope so that the shifted and non-shifted portions both appear on the screen at the time time. By adjusting the level of the incoming signal until the positive peaks of the 'lower' part touch the negative peaks of the 'upper' part you set the level of the incoming signal to be the amplitude of the additional squarewave.

 

It's one of those weird counter-intuitive how-does-this-possibly-work things.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0



By adjusting the level of the incoming signal until the positive peaks of the 'lower' part touch the negative peaks of the 'upper' part you set the level of the incoming signal to be the amplitude of the additional squarewave.

Reminds us of creating a poor-man's eye diagram! 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:
The 'trick' is to run the timebase on the scope so that the shifted and non-shifted portions both appear on the screen at the time time. By adjusting the level of the incoming signal until the positive peaks of the 'lower' part touch the negative peaks of the 'upper' part you set the level of the incoming signal to be the amplitude of the additional squarewave.

 

Annnnnddddd.... the purpose of this is for?

 

Is teh intent that the 33hz square wave amplitude is the 'reference' the input signal needs to be set to?  If that is the case then why not simply connect the scope to the input signal and set it to the proper level and walk away?

 

JIm

 

 

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

By adjusting the gain and offset of the scope channel you can 'zoom' in on the peaks of the signals and gain over an order of magnitude improvement on simply looking at the raw signal.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Or do that with an op-amp, no O'scope needed, (Post #2) cheeky

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

By adjusting the gain and offset of the scope channel you can 'zoom' in

Depends somewhat on the goal...

  For just seeing "what it looks like", that's wonderful bliss.

             If it is a fast moving signal (multi MHz/GHz.)..then channel overload & step recovery times may come into play) 

 

   For taking numerical measurements, then the offset needs to be precisely & accurately measured (such as a 1.2578 V offset)

           The more zoomed in, the more critical this becomes.

            stability also important--did the input level change while you got coffee, or did the offset drift? 

 

Now, with digital scopes, a lot of the former baloney goes away, if higher res ADC's are available.

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Tue. Jun 2, 2020 - 06:34 PM