-
-
Save ericfont/0070bcbd08789e07bea6ff62c07f7fb0 to your computer and use it in GitHub Desktop.
This time using Schmitt-input flip flop with comparator (output blue), which seems to produce a very reliable transition (yellow) right when clock (green) goes up.
Screencast_20251202_154421.webm
The hysteresis is good cause sometimes the transition injects glitches into the analog input signal (red)
Add 10mohm feedback for output and apply a notch filter, so green final output has much less of the oscillation frequency:
Screencast_20251202_163950.webm
Here is 0.1V(peak) 20khz sine (yellow) being reconstructed w/ notch (green):
Screencast_20251203_023127.webm
my notch filter may be suffering from breadboard parasitics.
It seems the second integral signal isn't properly integrating cause its top or bottom gets clipped:
Screencast_20251203_025522.webm
So it seems once its has decayed enough so that the top of the 2nd-integral signal no longer clips, then that triggers the resumption of proper integration...but what happens is the decay keeps on happening and actually over shoots and hits the other rail.
To lessen likelihood of entering this situation, should always DC block the input signal.
If instead did two RC low pass filters in series, then I'd think at least the "integration" would always remain around the middle voltage, so wouldn't have this rail hitting issue. The capacitors would always be keeping the proper voltage. Would still need an opamp afterwards to amplify the signal so it is the same amplitude range as the input signal.
but if try two RC integrations, then get not so great frequency spectrum:
There is a 3rd harmonic. So the question I need to investigate is can I get rid of that harmonic with RC and just deal with RC-only, without having to even involve opamp? Or is the issue something else that can be avoided in some other manner?











sim