how to regulate voltage from a generator