Hi there I'm trying to get a night light system setup for when the kids wake in the middle of the night. Programatically everything seems to be working with a regular LED turning on or off. I then trioed to use an LED strip based on the adafruit tutorial. The light strips did light up for a few seconds but as soon as I changed the code to turn on just on color 100% the board started to smoke and went poof. I am now wondering if someone could help me troubleshoot the problem. I was using a 12V 1Amp power source directly into the UNO. The change from the tutorial was that I used P16NF06 Modfet instead of the IRLB8721 Mosfet that was recommended. I am wondering if this was the problem. Thanks Hilton
Please supply a circuit and code.
I used the code and the layout as in the link except that instead of IRLB8721 I used P16NF06 Mosfet's https://learn.adafruit.com/rgb-led-strips/usage
bikingbadger: I was using a 12V 1Amp power source directly into the UNO.
With an LED strip you were probably drawing more current through the UNO board's copper traces than they could handle... hence Adafruit's warning
"For longer strips requiring more than 1A, wire power directly to the strip, then run power and ground wires back to the Arduino."
So I should be using some sort of relay? Or just running the 12V power directly to the LED strip? I'd love to know how to calculate this or some way of explaining what I should be looking for in the future so that I don't destroy the boards.
"just running the 12V power directly to the LED strip", not connecting it the Vin pin.
Then Arduino controls a transistor to connect the LED- to Gnd to turn it on, see the left hand picture.
The LED/resistor represents the group of 3 LEDs and resistor that make up the segments of an LED strip, with many segments wired in parallel to make up a strip.
I might be getting ahead of myself and still pretty new to reading diagrams. I can make out a resistor and an LED. I don't quite understand how the 12V connects to the LED and then to the others on the left. From what I have gathered so far it would be better to power the LED with the 12V/1amp power source I have. the thing is whether I can split off the power before the arduino and still power the arduino without any issues?
If you are simply turning the LED strip on and off, use a relay.
If you want to vary the light level, you need to use Pulse Width Modulation (PWM). This enables the LEDs to be turned on and off very fast so the average light level can be varied. A relay is not suitable to switch at speed so we use a transistor or MOSFET. This is what CrossRoads has drawn.
There are two types of MOSFET, a P or N channel. That are the two drawing shown. An N channel switchs the Gnd side and a P channel switches the positive.
N channel is the most common as it is easier to use with the Arduino. You must use a "logic level gate" MOSFET as others do not fully turn on at 5v so will not work well.
Ahh. starting to make sense. thanks everyone for the patience. How would I know if the P16NF06 is a "logic level gate" MOSFET. I do have some TIP120's but i would like to know for future use what everything I did wrong was as not to repeat it. A tutorial if any is out there on this type of thing would be great. Just not sure what to search to find the answer.
Check it's datasheet: http://www.st.com/content/ccc/resource/technical/document/datasheet/f3/e2/b6/5c/fc/9c/41/16/CD00002501.pdf/files/CD00002501.pdf/jcr:content/translations/en.CD00002501.pdf No entries there for Vgs = 4.5V or 5V, so that is a Standard Gate part.
Compare to http://www.st.com/content/ccc/resource/technical/document/datasheet/66/f2/4e/c4/ee/dc/45/e4/CD00002848.pdf/files/CD00002848.pdf/jcr:content/translations/en.CD00002848.pdf which has Rds with Vgs of 5V at 8A ID current, of 0.08 ohm (80 milliOhm) typical. Kind of high.
A better part is AOI510 or AOI514 with much lower Rds. http://www.digikey.com/product-search/en?keywords=aoi510 http://www.digikey.com/product-search/en?keywords=aoi514
Could you explain what this means: "Rds with Vgs of 5V at 8A ID current, of 0.08 ohm (80 milliOhm) typical" Like I mentioned just getting into electronics so even though I can read it, it does not make sense to my monkey brain yet. Really appreciate the help
Rds is Resistance between drain and source of the MOSFET. The V on the gate (control pin) determines how "turned on" MOSFET is and this determines the Rds. A logic level gate MOSFET turns on fully at 5v and the Rds is at it's minimum.
Thanks for the help everyone. I managed to get the LED strip working on a Nano I had lying around and am giving it a test this evening. I also used only 2m of the strip to keep things a bit more sensible.
Some parts claim to have Logic Level gates - but reading the datasheets show that only 0.25mA (250uA) of current flow is supported. Checking for higher current flow with the Vgs input at 4.5V is needed.