Controlling PWM fans with arduino and mains power

pylon:
A PWM signal is a rectangle wave where the percentage of the HIGH value of one cycle is equal to the PWM value. So if you set the value to 127 you should get a PWM signal with 50% duty. The translation of this PWM to actual rotations is done by the fan.

I don't see any problems here.

Yes, these chips are quite easy to work with. The problem might be to get one that support 25kHz.

You have been an amazing help! Thank you so much for all this.
When everything's arrived and I'm struggling to get it to function as intended I may be back but for now, thank you!