So I'm using an arduino to controll power to a string of LEDs. I have an IRF510 MOSFET transistor, but I need some help hooking it up...
So I have confirmed that I have the Digital Pin outputting PWM using just a plain LED, but when I add the MOSFET to control an LED powered by an external source, I run into problems. It doesn't change brightness right; when the arduino is outputting PWM with a value of 255, its at its brightest, but when it outputs a PWM of 0, the LED is still lit! It's almost like it reached a minimum brightness, which isn't that different from the brightness at 255. Also, when I touch the metal part of the MOSFET or the metal part of the arduino's female usb piece, the LED brightens up a lot.
Anyways, I have the source pin connected to the negative end of my power source (a 3v wall wort), the drain pin connected to the negative end of the LED (the positive side of the LED is connected to the positive end of the power supply), and the gate pin is connected to pin 11 on the arduino with the PWM. Am I doing anything blatantly wrong? Am I using the wrong transistor for what I'm trying to make it do?
ps. Sorry if what I said sounds really stupid, since I'm relatively new to making circuitry. I was always a software person ;)