The Output Voltage of LM358

The LM358 is not rail to rail, and the output will always be a volt or two less than the positive supply voltage. If you intend the output stage to be a comparator, use a comparator.

Get rid of C5, C7 and C8; they are not doing anything useful.

Neither amplifier in the circuit is properly biased, even a rail to rail op amp.

What is connected to J1? What is this circuit supposed to do?