I want to control my new laser module from my repurposed 3D printer. The laser module has a 12V pin for power, a ground pin and a 5V PWM pin. My board’s fan-control port can generate a 12V PWM signal, so I think I should convert it to 5V to control the laser’s power.

Are there any special considerations when stepping down PWM signals? I’m worried that a linear converter’s capacitors might smooth out my signal or that a buck converter could do something similar. Should I just use a resistor?

Thank you for your help!