Hi everyone, I'm just starting to play with digital led strips and have a

Hi everyone,
I’m just starting to play with digital led strips and have a basic question about connecting it to an arduino.

I’m reading this guide: http://www.tweaking4all.com/hardware/arduino/arduino-ws2812-led/
They say that when the arduino is not connected to my computer I should use my 5v power adapter to power it via the 5v pin.
But when reading here: http://arduino.cc/en/Main/arduinoBoardUno it says “Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don’t advise it.”.

What’s the best practice here?

Thank you!

If you’ve got a USB power supply, plug that into the USB port of the Uno to power it. Doing that is pretty mistake-proof.

If it’s a > 5V power supply with a barrel jack connector, plug it into the barrel jack connector of the Uno. Ideally, it should be 7-12V (if it’s less, the regulator on the Uno might not have enough “headroom” to regulate the Vin down to the 5V it needs. If it’s more, you run the risk of burning out the regulator.)

If you really know what you’re doing, you can feed a regulated 5V into the 5V pin. But if you try and plug it in and miss, you’ll toast the board. Ask Me How I Know™.

Note that you should power the strips separately to the Arduino itself, because if you try to pull enough power for any more than a couple of LEDs from the Uno’s 5V pin, you’ll toast it. But do be sure to connect the grounds of the Arduino’s power supply and the strips’ power supply together.

Glad you asked, I’m curious about the proper (least expensive not having to buy another arduino) way too.

@Robert_Atkins Thanks for the help!
Can you explain why it’s important to connect the grounds of the arduino power supply and the strips’ power supply?

Short answer: it probably won’t work otherwise ;-).

Long answer: voltage is a relative measure—the +ve terminal of a car battery has 12V higher potential than the -ve terminal. You need to tie the grounds together so all the voltages in your circuit are relative to the same level.

The answers to this SO question might help: http://electronics.stackexchange.com/questions/10129/when-a-battery-is-your-power-source-what-is-ground

(Also, when I say “the grounds of the strips power supply and the Arduino’s power supply”, any of the ground pins on the Arduino count.)

Makes perfect sense, thanks @Robert_Atkins

@David_Brailovsky The LEDs use the voltage difference (called the “potential”) between their data pin and ground pin to determine whether the data line is “high” (5V above ground, in the case of an Arduino) or “low” (0V above ground). If the ground is not common to both circuits then the LED driver could be comparing the Arduino’s idea of high (5V) to a different ground, which might be floating (say) 2V above the Arduino’s ground. In this case, the Arduino’s high output looks like low to the LED driver (3V above ground, which might not make the threshold for “high” depending on the chip reading the signal), and its low looks low too, leaving the chip thinking that it’s just ignoring a bunch of low-voltage noise on the data line.

Tying the grounds together eliminates this problem.

@Luminous_Elements Great explanation, thanks!

A symptom of not having a common ground, grounds tied together, is the strip behaves very, very erratically (if at all) for those reasons stated by +Luminous Elements.