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?
Also, to be clear, this is not an RGB LED Strip - just a single-color.
Thanks for any suggestions - I'm desperate!
So what is the strip? Data for it? What is the power supply? data for it?
The LED strip is this one http://www.amazon.com/Flexible-Strip-LED-Ribbon-Ledwholesalers/dp/B002QQ1YOM
It's your standard flexible 12v analog LED strip. I'm only using 15 cm.
The power supply is 12V DC @ 3000 mA
The fading works perfectly unless arduino is powered externally. Works fine over USB power.
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?
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).
Thanks so much to all of you for your help!