I'm working on a very simple project that involves PWM fading a white LED strip using MOSFETs. The LED strip takes 12V, so I thought I'd try to power the Arduino with 12V (which seems to work) and use that to also power the LED/mosfet circuit. The trouble is that it will only work if the Arduino is powered with USB. In other words, it works fine when there is a 12V dc power supply feeding the LED strip when the Arduino itself has USB power. But as soon as I attempt any sort of external power to the Arduino, nothing at all. My schematic is below (apologies in advance, I'm a noob and have never drawn one before )
Any info would be much appreciated. I thought it might work to run the 9v and Ground pins (which is actually closer to 12v with the PS I'm using) to the LED strip when the Arduino is externally powered, but it doesn't PWM fade unless I'm on USB power. The board is an old NG rev. C. Thanks in advance!
Your MOSFET isn't going to hack it, its rated for abs max of 0.2A and its Rds(on) figure for logic-level drive is several ohms!
Go for a logic-level MOSFET with current rating of at least 10A, Rds(on) of at most 50 milli-ohms, and if the LED strips are
higher current than an amp or two you'll have to scale accordingly. You don't want to drop more than 0.5V in the MOSFET
to keep the LEDs bright enough, and ideally you want to keep the I-squared-R losses in the MOSFET low enough to
avoid a heatsink (0.5W or less).
Your supply must be 12V for 12V LED strips - there's no guarantee they will work at 11V even, and if they do the
LEDs may be significantly dimmer.
Thanks for the info! I'll play around with other Mosfets.
Still, I want to be clear that the circuit does work, just not with the arduino powered externally.
It only works when the arduino is powered with USB.
So my basic question remains - why would that be?
My hope is that I could power both the arduino and the circuit with one 12v power supply.
Is this not possible?
According to the reviews on Amazon, each 5cm (approx) length uses somewhere between 12 and 24mA. So your 15cm piece (9 LEDs?) uses no ore than about 75mA, which is within the rating of the 2N7000. If you want to control a much longer length, then you will need to use a larger mosfet.
I don't understand why it doesn't work when you power the Arduino from the 12V supply too. How exactly did you have the 12V supply and the Arduino connected? Can you run a simple blink sketch on the Arduino when you power it from the 12V supply?
Ah, I can't even run Blink on external power! works fine over USB power. The strange thing is that the external supply does power the arduino, and connected LED will blink on for a moment once power is applied. But no activity after that. What could this mean?
nevermind:
Why doesn't my sketch start when I'm powering the board with an external power supply? (Arduino Diecimila or earlier)
Because the RX pin is unconnected, the bootloader on the board may be seeing garbage data coming in, meaning that it never times out and starts your sketch. Try tying the RX pin to ground with a 10K resistor (or connecting RX directly to the TX pin).