Automatic voltage regulator for an alternator/synchronous generator

for the voltage use a optocoupler and a zener diode
the AC Voltage goes to a bridge and a capacitor with a few resistors in series bring down the current down the zener will act as a simple level shifter.
if the voltage is 100 volt the opto is off with 120 volts it will be 20 mA.
the output can go straight with a pull up to the analog input of uno.
the pwm output goes via optocoupling to transistors and a BUZ11.
pwm is fast enough the rotor has coil enough
second step is current measurement and control.