Help Comparator circuit
Here is a basic circuit for a PWM modulator. R1 and R2 halve the supply voltage to provide a 'virtual earth' reference for the op amps. OA1 and OA2 generate a triangle wave. Amplitude is controlled by the ratio of R3 to R4. C2 and R5 determine the frequency. 

OA3 compares the level of the triangle wave to the modulating signal. R7 and R8 produce a small amount of positive feedback, creating hysteresis which ensures that the PWM output 'snaps' from one rail to the other. 

Your sine wave has relatively small amplitude and a large DC offset which would be difficult to null out in a DC coupled circuit, so I AC coupled it through C3 and referenced it to the virtual earth with R6.       







simulate this circuit &ndash; Schematic created using CircuitLab

To avoid clipping the triangle wave peaks need to extend beyond the peaks of the modulating waveform. AC coupling the modulation ensures that the midpoints align, so you just have to make the triangle wave's amplitude larger than the modulation.