Electronic energy regulator