I am using 2 of these mosfets:
https://assets.nexperia.com/documents/data-sheet/PSMN017-30PL.pdf
to drive 24V fans. I am providing power with a 24V 10A power supply and I drive the gate using a PWM with a frequency of 488Hz. When testing on a protoboard the circuit worked very well, there was some switching noise but it was barely noticeable and I couldn't hear it unless I put my head next to it. I also added a 0.33uF and a 10uF capacitors (to smooth out the output and stop the fans from buzzing) and a diode to protect the mosfet. When I moved the circuit to a PCB the MOSFETs started making a very loud noise that stops when the signal is LOW or HIGH (0 or 255). The only difference is that instead of through hole capacitors (One electrolytic and one ceramic) I used surface mount ceramic capacitors (1206 for 10uF and 0603 for 0.33uF) to save space. Do you think that this change might be the cause of it? I also noticed that the MOSFETs on the board get a lot warmer.
https://assets.nexperia.com/documents/data-sheet/PSMN017-30PL.pdf
to drive 24V fans. I am providing power with a 24V 10A power supply and I drive the gate using a PWM with a frequency of 488Hz. When testing on a protoboard the circuit worked very well, there was some switching noise but it was barely noticeable and I couldn't hear it unless I put my head next to it. I also added a 0.33uF and a 10uF capacitors (to smooth out the output and stop the fans from buzzing) and a diode to protect the mosfet. When I moved the circuit to a PCB the MOSFETs started making a very loud noise that stops when the signal is LOW or HIGH (0 or 255). The only difference is that instead of through hole capacitors (One electrolytic and one ceramic) I used surface mount ceramic capacitors (1206 for 10uF and 0603 for 0.33uF) to save space. Do you think that this change might be the cause of it? I also noticed that the MOSFETs on the board get a lot warmer.