Controlling an IKEA Dioder LED Strip - Beginner trying to work out simplest case

I am very new to electronics: I've put together most of the projects that came with the beginner's kit I ordered from SparkFun and have been enjoying it a lot. I am, however, constantly frustrated by the large gaps in my knowledge.

I have a single, flexible IKEA LED dioder strip (http://www.ikea.com/us/en/catalog/products/60192355/) that I bought before I had any greater ambition. I know it's far too expensive, but, hey, I already have it. I'm trying to figure out the simplest way to start controlling it with my Arduino Uno.

I have a 12V barrel jack power supply plugged into my Arduino. By connecting a wire to Vin (voltage in, I'm guessing?) and a wire to ground, I've been able to figure out which of the four bundled wires that lead to my dioder is for power and red, green, and blue, respectively. (I essentially followed the instructions here: http://www.instructables.com/id/Control-Ikea-Dioder-LED-Strip-with-Arduino-16X-P/step2/Decode-DIODER-wires/.)

When I connect the RGB wires to pins 9, 10, and 11 on my arduino, they do light, but they won't go very dim at all. I can't seem to get them to go from all the way dark (0) to all the way lit (255). I have a few questions:

1) Is it legitimate to attempt to duplicate the super-simple single RGB LED setup this way with a powered light strip? Is my attempt to control brightness being foiled because of the difference in how the strip is being powered?

2) If there's a problem with this setup, what would be the simplest way to go about this? Do I need the ULN2003 I see mentioned elsewhere (http://arduino.cc/forum/index.php/topic,22202.0.html)? If so, what is its purpose? It seems so self-evident that nowhere in the discussions about it do I find anyone mentioning its role. Is the ULN2003 similar to the 74HC595 shift register that came with my kit?

3) Is there anything dangerous about my current setup? Am I risking burning out any of my components by flailing around with a 12V current like this?

I recognize that these questions must seem absurdly stupid -- I appreciate anyone's patience who's willing to try to help me venture past the absolute-beginner steps I've taken so far. Thanks in advance for any help anyone can provide.

The Dioder strips need 12V to light up fully and will draw about 130-150mA per color at this voltage. If I am reading your post correctly, you are trying to drive it directly from the PWM pins which is why the LEDs are so dim. The ULN2003 chip has 7 high-current drivers that you use between the PWM output of your board and the Dioder. These drivers are referred to as Darlington arrays because of the configuration of the output transistors and the fact that the collector is left open. Your Dioder R, G & B strips connect between +12VDC and the collector of a driver.

The Instructables article uses an SPI bus connected PWM driver board.

Two useful links: http://www.earthshineelectronics.com/files/ASKManualRev5.pdf this is a good little handbook that goes with a nice Arduino starter kit sold by a company in London. http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00001244.pdf ULN2003 data sheet.

--Jeff from Texas

Am I risking burning out any of my components by flailing around with a 12V current like this?

Yes, connecting any voltage to an electronic device that is higher than the devices power supply almost always damages it.

Jeff,

I'm new to all of this terminology, so please forgive me if I misspeak or misunderstand something you've said.

I have the LEDs connected directly, with one wire, to the Vin pin, while I have the R, G, and B lines connected to PWM pins. As soon as the Arduino is plugged in, they're very bright -- so bright, in fact, that when I analogWrite( 9, 10 ), for example, to make the color connected to pin 9 as dim as possible, it's only very slightly dimmer than it is at its brightest.

If I understand you correctly, however, the PWM pins are not meant to control such high current, and this is what I should use a Darlington array for. Excellent! I've just ordered a couple ULN2803s from SparkFun.

Thanks for the links you posted! I'll check them out tonight.

Grumpy_Mike,

So is the Arduino not meant to be supplied with anything more powerful than a 5V? Would using a barrel adapter connected directly to my breadboard be a safe alternative way of powering the LED strip?

So is the Arduino not meant to be supplied with anything more powerful than a 5V?

That is correct.

You can use anything to get your higher voltage onto a bread board. However I do not recommend solder-less bread board. They are an accident waiting to happen and encourage people to change the wiring when the system is powered up.
If your 12V just brushes against the arduino’s 5V pin it is toast.

Make sure when using an external power supply to connect the grounds together.
http://www.thebox.myzen.co.uk/Tutorial/Power_Supplies.html

Mike,

Thanks again for your help answering some very basic questions.

I'm a bit confused, though, because I feel like I'm reading conflicting information. The reason I initially bought a 12V wall wart DC power supply was because of information on threads like this one, which seems to claim that either a 9V or 12V power supply will connect to the barrel jack on my Uno to power it.

Let me try to speculate my way to understanding this a bit. Is it true that a 9V/12V power supply will work for the arduino, but it has a voltage regulator built in that filters it down to 5V? And the problem is in trying to power a device that requires 12V (my dioder LED strip) with the Arduino in between?

Thanks for the warning about using a solder-less breadboard - the risks you mention seem well worth noting. I guess it might be worth it to just splice the 12V that came with the dioder and use it directly.

Not knowing which beginner kit you have, I am going to assume to assume that it has an on-board regulator allowing you to power the chip from 12V. Still, to drive a load like the Dioder from the PWM output, you should put a transistor or driver chip or something. I have attached a simplified picture of what I have in mind. The transistor can handle the 12V and (more importantly) the current that will flow when you turn the diodes on. The resistor can be on the order of 1k as a starting point. It is there to protect the base-emitter junction of the transistor.

I played with the diodes in a local ( is 75 miles still considered local?) Ikea store the first moment I saw it. Why not making your own since parts are so much cheaper?

http://www.adafruit.com/products/285

The 12V supply is down on the same page. BTW, this post should be in the hack board, right?

Is it true that a 9V/12V power supply will work for the arduino, but it has a voltage regulator built in that filters it down to 5V?

Yes that is right.

And the problem is in trying to power a device that requires 12V (my dioder LED strip) with the Arduino in between?

Yes so you power the lights with the same voltage as you put into the jack barrel. However you then can't use the arduino directly to switch this 12V strip, you need to use a transistor like in the post from MizeSoundGuy.

MizeSoundGuy: Not knowing which beginner kit you have, I am going to assume to assume that it has an on-board regulator allowing you to power the chip from 12V. Still, to drive a load like the Dioder from the PWM output, you should put a transistor or driver chip or something. I have attached a simplified picture of what I have in mind. The transistor can handle the 12V and (more importantly) the current that will flow when you turn the diodes on. The resistor can be on the order of 1k as a starting point. It is there to protect the base-emitter junction of the transistor.

I really can't say enough to thank you (and everyone else who has chimed in) for taking time to try to explain this in such simple terms.

I have the Arduino Uno, which came with Inventor's Kit from SparkFun. It lists the input voltage as 7 - 12V, but it's sounding like the PWM output does not equal the possible input. I just ordered a couple Darlington drivers, which sounds like it's exactly the sort of thing you're recommending.

Grumpy_Mike: Yes so you power the lights with the same voltage as you put into the jack barrel. However you then can't use the arduino directly to switch this 12V strip, you need to use a transistor like in the post from MizeSoundGuy.

Okay, thank you -- I know you've answered my question multiple times, now, but it really helps to be able to (slowly, painfully) understand some of the reasons.

liudr: I played with the diodes in a local ( is 75 miles still considered local?) Ikea store the first moment I saw it. Why not making your own since parts are so much cheaper?

http://www.adafruit.com/products/285

The 12V supply is down on the same page. BTW, this post should be in the hack board, right?

Already in the mail! :) I definitely wouldn't buy the dioder again - when I bought this strip, I had never heard the word Arduino, and had no ambition to any kind of electronics customization. I bought them to light up this glass desk I was building. (I ended up using the four solid-stick version since it only took one and lit the whole desk pretty well for only $50, as opposed to 4x $50 if I used the flexible strips. But I'm left with one extra flexible strip, which, yeah, is not the smartest $50 I ever spent.) I only ended up finding out about the Arduino because, with the dioder in place, I began to think, "It would really be awesome if I could have these controlled by events on my computer..."

Regarding mis-categorization, that may very well be true - anyone with the power to do so is welcome to move this to a different board. I apologize if I didn't find the best place to post this.

liudr: http://www.adafruit.com/products/285

The 12V supply is down on the same page.

By the way, I already have this 12V power supply, while the one the product page recommends is this one. Are these equivalent? I wish I understood the meaning behind the different specs on these things.

Awesome desk! Now you can make ambitious projects such as lighting up the desk as ambient light to whatever video/game you play on your screen like this one: (ah, I can't find it :()

liudr: Awesome desk! Now you can make ambitious projects such as lighting up the desk as ambient light to whatever video/game you play on your screen like this one: (ah, I can't find it :()

Thank you! And I think you mean this project, or one like it. Yeah, that's exactly my goal. I'm a developer, so writing the AppleScript or whatever to communicate to the serial connection will be the easy / fun part. It's figuring out this totally new to me electronics that's daunting (but still fun, thanks to the help of folks here).

nate451: By the way, I already have this 12V power supply, while the one the product page recommends is this one. Are these equivalent? I wish I understood the meaning behind the different specs on these things.

The one you have is 600 milli Amperes, according to Ikeas info the led strip will use 500 milli-Amperes at 12 volt. In theory.... it's enough, but you'll be close to pushing the limits of the supply, it may get quite hot. Using a supply capable of handling 2 (or more) times the power used will give you a far better guarantee it will still work in X years time.

Simpson_Jr:

nate451: By the way, I already have this 12V power supply, while the one the product page recommends is this one. Are these equivalent? I wish I understood the meaning behind the different specs on these things.

The one you have is 600 milli Amperes, according to Ikeas info the led strip will use 500 milli-Amperes at 12 volt. In theory.... it's enough, but you'll be close to pushing the limits of the supply, it may get quite hot. Using a supply capable of handling 2 (or more) times the power used will give you a far better guarantee it will still work in X years time.

Ahhhhh. Dammit, I just need to sit down and actually learn about these different units of electrical measurement, don't I? Not really knowing about the differences between volts and Amperes is becoming a real-world liability.

It is indeed best if you know someting about the relation between volts and amperes, I hope I can explain it a little.

The method I used to see whether the supply would be good enough was to look at the power it used at the voltage of Ikeas specs. Apparently the Ikea Leds use 6 watts max at 12 volt.

Power(watts) can be calculated by multiplying the amount of volts times the amount of amperes drawn.

A device using 1 ampere at 1 volt will there for use 1 watt. Should... you only know a device uses 1 watt at 1 volt the current (amperes) can be calculated by dividing the sum (power) by the number of volts.

In case of the Ikea leds 6 watts is the power used, the voltage used is 12 and to determine what the current is the calculation is 6(watts)/12(volts) = 0.5 amperes or 500 milliAmperes. Milli stands for a value 1000 times smaller, 1 milliVolt for example translates to 0.001 volt.

These calculations are part of the so called Ohm's laws.

Besides power, voltage and current ohm's laws also involves resistance or the "ease" for electrons to flow through a device/component. That can quite often be important too. If you know some of these values the others can be calculated.

This page shows basically how to calculate them http://www.the12volt.com/ohm/ohmslaw.asp.

Thank you for taking the time to write this explanation. This was a great start, and it prompted me to look for a few other resources explaining the basics of volts, amperes, and watts. I guess it shows how worthwhile it can be to mess around with things like this: it's amazing how little I understood (and, indeed, still understand) the basics of electricity. This is my favorite reference explaining - in very helpfully concrete detail - what volts, amperes, watts, coulombs, and joules are.