I need to calculate the speed of a little generator that produces a bipolar sinusoidal waveform with a peak to peak voltage value variable with the velocity. The produced signal also has a frequency proportional to the velocity. I prefer to process the frequency than the voltage, because I have a direct relation between revolution and speed. Four produce periods are corrispondent to one revolution of the generator drive shaft. My requirements are:
- Max RMS output generated voltage = 45 volt, at the maximum velocity.
- Max output generated frequency=50 kHz at the maximum velocity.
- A square signal circuit output to be sent to the micro min = 0 V, max = 5 V.
- Only unipolar voltage to 12 V or 5 V to supply the circuit.
So I thought to a Schmitt trigger op-amp comparator like this.
But I have two problems:
- Due to the variable peak to peak signal I cannot fix the two comparator's threshold VH, VL.
- I have to scale (I think) the voltage produced by the generator to avoid to damage the op-amp. Here could be sufficient a voltage divider to the non inverting pin, fixing the divider resistors to have a value that at the maximum RMS signal 40 V, produce for example Vcc.
Any idea how I could proceed?
update:I attached a wrong figure (a comparator), instead I would attach a schmitt trigger because from what I read, the only comparator (without positive feedback) could create false trigger in the output due to a noisy input.
Thanks a lot.