I am trying to control/fade a couple of High Power LEDs, these are basically 12V 18W LEDs inside a nice package.
I want to use an Arduino and a N-Channel MOSFET to adjust the brightness.
I tested the LEDs by directly driving them from a bench power supply and controlling the brightness by adjusting the voltage (between 0-12V) and it worked just fine.
I then moved on and used the N-Channel MOSFET to control the LEDs by setting an arduino PWM-pin to the Gate-pin. I am not at all an expert but I think that should do it and it indeed works.
Setting the PWM from the Arduino controls the MOSFETs Gate and adjusts the brightness but here is the strange thing that happens. The LEDs are constantly making a whining noise when I lower the PWM. Now the noise is actually not that bad but I am worried that the LEDs will eventually die out because something is certainly not right.
Any idea on what I am doing wrong? Please don't suggest that I should move on to other ways of driving these LEDs as I don't have access to much electronics.