Ask: How to get (with a fixed range and offset) linearly proportional signal from a variable range on the input?
Conditions: There's a signal (to simplify, consider a sinusoid) with variable amplitude (min. 165mV to max. 1.65V) and variable offset so that the signal's lower value is above and close to 0.
I need a circuit to catch the signal no matter what amplitude and then get an output linearly proportional signal that goes from 0 to 3.3v, as shown bellow:
An AmpOp may be used in association with a digital potentiometer, to vary digitally it's gain. In this configuration, for the max. amplitude, gain should be 1. For the lower amplitude, the gain should be around 10.
P.S.: Said that, the actual signal is a trapezoidal signal that comes from a DC brushless motor phase, like bellow:
[EDIT - A test with a possibly solution]
Using the following circuit, it was possible to obtain a signal from the variable amplitude input signal:
Setting the input signal to a sinusoidal 0-to-6v, and the 50k potentiometer to 91%, we have both graphs bellow:
Setting the input signal to a sinusoidal 0-to-60v, and the 50k potentiometer to 51%, we have both graphs bellow:
Both situations were simulated to 1.0kHz signal on the input. I would like to know if you guys have any advice or any real question which simulation doesn't take into account. Thanks!