So I'm using a lm339 comparator to switch my charger on and off for my 60v battery. Even with hysteresis it switches the relay so fast the relay melts from the arcs. It seems to go to a state where it is half on, instead of being either on or off. Note that the relay is driven by a power transistor. My circuit is near identical to this one:, vref is 7805 regulator, r8 is 10k plus 10k trimmer in series, r9 1k, r10 100k. What am I missing here? I just need it to slow to no more than one relay cycle per second. I'm guessing a capacitor somewhere would help, but I'm new to comparators.