how to stop a flickering pulse?

A capacitor is likely to smooth out that flicker. If you have a scopemeter you would be able to see the waveform of the flicker and see whats going on more clearly.