Electronics > Beginners

"Normalize" a variable amplitude sine wave

<< < (3/3)

imacgreg:
What you're asking could be performed using AGC (automatic gain control) or VCA (voltage controlled amplifier) - in audio these are called compressors and/or limiters. Essentially, a variable gain element is controlled in a feedback loop in order to control amplitude. Your application sounds like it would be a lot simpler than most audio applications.

The variable gain element can be a lot of different things: light dependent resistor (opto/LDR), Integrated VCA (see THAT corp), JFET.

The forward path contains the variable gain element. The feedback path does some processing to the output signal (full-wave rectification, peak detection, filtering, scaling) to create a voltage to control the variable gain element.

I'm being intentionally vague, as there are tons of ways to attack this. Perhaps this gives you some ideas/terms to search.

CatalinaWOW:
Given your purpose I would think the simple integrator as proposed by nfmax will be your best bet.  It is simple and robust and still passes on some of the flavor of the signal (variations from a perfect sine).

Andreas:

--- Quote from: dannydnl on February 21, 2020, 05:07:04 pm ---So, i want to take the sinusoidal signal from a crankshaft sensor,

--- End quote ---

The signal is not "sinusoidial" especially at "the gap" of a 60-2 tooth wheel there are some anomalies.
(undershoot at the beginning of the gap and overshoot at the first tooth after the gap).

https://www.picoauto.com/images/uploads/agt/_lrg/gt017-example-waveform-01.png

with best regards

Andreas

Circlotron:
I once used a stepper motor as a tachometer generator, attached to a motor for speed feedback control. I put the generated sine wave straight into an RC (no active components) and it worked just perfectly. Above a certain minimum rpm the amplitude was constant. One thing that might matter to you is phase shift from input to output. If you are just measuring rpm this is no big deal, but if it is some kind of position sensor then it may matter.

T3sl4co1l:

--- Quote from: Mr Evil on February 21, 2020, 07:27:41 pm ---
--- Quote from: dannydnl on February 21, 2020, 07:19:52 pm ---I want to use the sine wave just for displaying purposes.
I will send both signals,the square wave and the sine wave, to a CAN transceiver, then i will display them on a PC.

--- End quote ---
If it's just to look pretty, then I wouldn't bother trying to display the actual signal. Since you know the frequency, just generate an image of a sinewave at that frequency and the desired amplitude, and draw it on the screen.

--- End quote ---

And for that matter, depending on sensor type, it may not even be a sine wave, so displaying it as such could be disingenuous.

Tim

Navigation

[0] Message Index

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod