Converting varying frequency and duty cycle to varying frequency fixed duty cycle
You can use a T-flip flop. It will divide the frequncy by 2 but the duty cycle will be 50% (at steady state). You can double the frequency at the previous stage (LM331) to match your needs.







simulate this circuit &ndash; Schematic created using CircuitLab

(T) of this flip-flop mathes (D) on 74HC74.
If using the first part on 74HC74 pins would be:

T = pin 1
CLK = pin 3
Q = pin 5
~Q = pin 6


Here is a better schematic: