Good to see that you appear to be doing the isolation properly...more than can be said for some.

You could add an option for a different voltage range for spindle control.

40 kHz is a bit low. Most will only run at 25-35kHz with Mach3, but you can have more and a lot of drivers claim to do 200-300kHz.