So, i have a Schmidt trigger circuit that outputs a square signal, from the crankshaft sensor.
I use that to calculate the rpm.
Can someone point me in the right direction on how to proceed with this, and what type of circuit do i need?
"Logarithm amplifier" + "DC restorer"? What are you trying to measure? If you are interested just in the frequency of the signal, there are very simple circuits you can use.
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.
Anything wrong with just clipping the signal with a zener diode? Two components, a resistor and the zener. If your sensor has enough output impedance you can even eliminate the resistor.
I would like the sine wave to be "unclipped".
The sine wave is just for demonstration purposes.
Why you need sine in the end? Why don't you tell what you are going to do with that "normalized" 0-3V sine? If you are interested only in frequency, then you don't need sine and simple zerocrossing detector is sane solution here. Otherwise you need automatic gain/attenuation control. Shifting is easy, internet search keywords "dc offset shift opamp"
Well, i get the frequency from the square wave output of the Schmidt trigger.
So, the sine wave is just to show, over CAN bus, what an inductive crankshaft sensor outputs.
This looks like an inductive pickup, so the output voltage is proportional to the rate of change of magnetic flux, which is proportional to speed. So if you use an OPAMP integrator, you will get a sine wave of constant level regardless of speed. You can set the output amplitude by setting the time constant of the integrator. You will need a feedback resistor in parallel with the integrating capacitor, to stop the integrator saturating when the engine stops. The time constant Rf*Cf should be about 50s time the integrator time constant Rin*Cf.
You can then offset the output by applying a fixed current to the inverting input of the integrator OPAMP. The value of Rf, together with the input current, sets the output bias voltage.
I will try to research what you propose, @nfmax.
Thanks everyone, for the input.