How to level shift an analog signal?
There is an old technique that I saw many years ago that looks like it is applicable to your situation.

By the looks of things, you are using a linear CMOS inverter as an amplifier.  I say "linear" as opposed to Schmitt Trigger.  Note that these should be un-buffered inverters such as CD4069UB.  The "UB" suffix indicates un-buffered.

The issue is that you need to bias your input signal right in the center of the linear region of the inverter.  This voltage is usually different for inverters from different manufacturers and is often different for inverters even from the same manufacturer.

There is a simple solution.  Simply use one inverter from that package to set that bias point.







simulate this circuit &ndash; Schematic created using CircuitLab

The top section is a classic linear amplifier using an un-buffered CMOS inverter.  Notice how the feedback sets the bias point for the inverter right in the middle of the linear region.

We use the same principle to generate a bias point for the inverter sections that you want to use as comparitors.  Note that they aren't really comparitors but they function much the same way - you feed your signal into an amplifier running open-loop (no feedback) so as to square up the signal.

The bottom inverter simply has its' input tied to its' output.  This forces the output to be centered in the middle of the linear region.  Note that this is a relatively-low impedance node.

You then take that voltage and use it to bias the inputs of the comparitor stages to that same voltage.

This works so well because all of the inverter stages in any given package are very closely matched.

A standard inverter package has 6 inverters.  You would use one inverter from each package to generate the bias voltage for the remaining 5 inverters in that package.  You should NOT use that voltage to set the bias for inverters in a different package because the bias point might be different.