# Capture analog input frequency of any amplitude and output same frequency at set amplitude

#### simondavidkelly

Joined Nov 12, 2009
13
Hi Guys,

I would like to build a circuit that takes an analog input signal between 1mV and 3V and output a signal at 2.83V at the same frequency.

I've only worked on analog valve amps so far and haven't a clue where to start.

Cheers

Si

#### Delta Prime

Joined Nov 15, 2019
1,026
Hello there.
Hi Guys,Ive only worked on analog valve amps so far and haven't a clue where to start.
Yeah, but you know how it's going to end...that's very specific criteria you have for the output . Do we need to produce different types of frequencies from DC to terahertz and shapes of Signal Waveforms? Such as Square Waves, Rectangular Waves, Triangular Waves, Sawtoothed Waveforms and a variety of pulses and spikes.

#### simondavidkelly

Joined Nov 12, 2009
13
Hi Delta,

I'm after a sine wave output from a sine wave input. Range is from around 10Hz through to 40kHz. A nice clean output would be preferable

Thanks

#### drc_567

Joined Dec 29, 2008
1,114
Maybe there is some alternate approach to the objective.

#### MrChips

Joined Oct 2, 2009
23,565
It is a common error on AAC forums to think, ”I will just ask for a solution to my specific problem since you don’t need to know the gory details”.

Wrong. Tell us the big picture and we can suggest the appropriate solution. Very often the original question is running off on the wrong path for starters.

#### Ian0

Joined Aug 7, 2020
2,283
Does the output sinewave need to be a pure sinewave, even if the input waveform isn't? Or should it be a copy of the input waveform? Does the output waveform have to be in phase with the input?

#### ci139

Joined Jul 11, 2016
1,696
peak detectors $$\cases{V_{PK}=\frac{V_{IN_{MAX}}-V_{IN_{MIN}}}2\\ \Delta V=-\frac{V_{IN_{MAX}}+V_{IN_{MIN}}}2}$$
quanted auto-ranging $$V_{Q}=\left({V_{IN}+\Delta V}\right)·α·n^k$$
analog multiplier $$V_{O}=\frac{V_{Q}}{V_{PK}·α·n^k}·Const.$$
————————————————
but the peak values vary in time ??? -- so you should redefine what is that you exactly need

Last edited:

#### Ian0

Joined Aug 7, 2020
2,283
Probably would also need to know at what rate this input signal can vary in amplitude or frequency.

#### peterdeco

Joined Oct 8, 2019
360
It sounds like he just needs an amplifier with AGC.

Last edited:

#### Ian0

Joined Aug 7, 2020
2,283
That's what I thought. I was going to suggest a THAT4301, (or perhaps a remote-cut-off pentode!)

The application intrigues me. . . .

Last edited:

#### MisterBill2

Joined Jan 23, 2018
8,804
It sounds like he just needs an amplifier with AGC.
It certainly might work to use an amplifier with a level compressor, except that usually compression adds a bit of distortion, and with such a specific output voltage requirement it could get complicated. The other BIG question is the application. Driving a frequency counter does not need a low distortion signal, likewise feeding a synthesizer input.

Thus a much more detailed description of the application is needed, other wise all the responses will just be guesses.

#### Audioguru again

Joined Oct 21, 2019
3,206
You are making an "Auto-Tune" circuit that corrects the pitch of many singers who cannot sing worth a damn (Drake is one).
Your circuit will need an amplifier with a wide range auto-gain-control, a phase-locked-loop IC and a voltage-controlled-oscillator. Then its squarewave output will need to be filtered into a sinewave.

Cher sang "Believe" (
) in 1988 with the auto-tune turned up so high that it was obvious.

#### Ian0

Joined Aug 7, 2020
2,283
Couldn’t you just use a comparator as a zero-crossing detector instead of the AGC if you only needed a squarewave to drive the PLL.
Filtering the squarewave into a sine wave is easier said than done if you have a wide frequency range!

#### Alec_t

Joined Sep 17, 2013
12,091
I think any analogue solution involving AGC is going to have quite a lag between input and output. How rapidly does the amplitude of the input signal change within that 1mV-3V range?

#### MisterBill2

Joined Jan 23, 2018
8,804
wow! A.G. is way off topic already. The TS wants exactly the same frequency.

#### Audioguru again

Joined Oct 21, 2019
3,206
Is it for tuning a guitar or another musical instrument? Usually a person's hearing is used to adjust the musical instrument to be the same frequency as the reference beep. Maybe the reference is music.

#### WBahn

Joined Mar 31, 2012
26,398
Hi Delta,

I'm after a sine wave output from a sine wave input. Range is from around 10Hz through to 40kHz. A nice clean output would be preferable

Thanks
What do you consider to be "a nice clean output"?

What if your 2 V sine wave input at 100 Hz has a 2 mV sine wave at 20 kHz riding on it?

#### Ian0

Joined Aug 7, 2020
2,283
But if the input is not a sinewave, does the output still have to be a "nice clean sinewave"

#### Papabravo

Joined Feb 24, 2006
16,182
What do you consider to be "a nice clean output"?

What if your 2 V sine wave input at 100 Hz has a 2 mV sine wave at 20 kHz riding on it?
This sounds like take the frequency content (aka FFT) and produce an output where each frequency component, above a certain level, in the original has a weighting such that the resultant combination has a fixed amplitude. It would sound nothing like the original. It would be like playing Also Sprach Zarathustra (Strauss Op. 30) with the bass cranked down and the treble cranked up. Why would you do such a thing. The golden ears would mess themselves!

#### simondavidkelly

Joined Nov 12, 2009
13
Hi All,

Firstly, A.G, that device is a crime against music

So what I have,

A computer outputting a test signal that's a reasonably clean sine wave (not perfect), but very hard to adjust the amplitude accurately (and impossible to get to my required 2.83V RMS)
The signal goes from 10hz to 25khz (or 30khz if you set it) in around 1.25 seconds. Amplitude variations are minimal during that time. I'd really like it to be near zero for accurate measurements.

I understand I could probably buy something that could do the testing job for me, but I am trying to learn and like building my own stuff as solutions. I was a mechanical engineer and currently a software engineer. My electronics is sketchy and I've only done analog with valves to far.

Cheers

Si