Tachometer for spindle

@karl . You’ll need a triac to drive the load. The triac circuit will be high voltage across so it should be optoisolated from the Arduino circuit for safety reasons. A zero Cross detection circuit is also needed to find the exact point in the AC sine waveform where the triac switching should start. The zero Cross detection circuit should also be isolated for safety. Your Arduino will need to read rpm, handle PID loop, and apply phase control to the outgoing AC through the zero cross and triac input/output. Most of this needs to happen at high speed and precise timing so you’ll want to use the Arduino timers and interrupts to manage the zero cross and RPM input.