Newbie ambilight question

Hi!

I'm very new to Arduino and a lot of electronics.
I saw some tutorials for creating your own ambilight.
But I have a question regarding the assembly.

What do I need to send separate signals to the multiple leds?
Like I have 10 leds in a row but they all need to be a different color.

I want to use the following RGB leds : http://www.ebay.com/itm/100-pcs-5mm-Fast-RGB-Flash-Rainbow-MultiColor-LED-/330714359321?pt=LH_DefaultDomain_0&hash=item4d001ca619#ht_1174wt_1156Forward
And I have a Arduino Leonardo.

Thanks!

Most likely, RGB Flash leds have a pregrogrammed chip inside, and can't be control fromexternal device. Probably, this isn't what you are looking for. Search leds w/o "flash"

So first of all I will be needing the following leds : http://www.ebay.com/itm/100-Pcs-5mm-Red-Green-blue-RGB-LED-Light-Rainbow-free-R-/110396023112?pt=LH_DefaultDomain_0&hash=item19b41da148

No, it's the same pre-programmed, only slowly -);. LED shouldn't vary color on it's own.

Thanks :P, I have found the correct ones with 4 pins.
But which ones do I need to order, Anode or Cathode and what's the difference?

It's up to you, if this is your first project, have a look in "LED Lights and Displays" Arduino Playground - InterfacingWithHardware, a lot depends on what hardware do you have to drive this leds.
Factors to be considered:

  1. Cost
  2. Availability
    3 Shipment time
    4 Coding complexity

Also, how big is your project, ambilight 100 leds, 10 or 1.

Danton:
Thanks :P, I have found the correct ones with 4 pins.
But which ones do I need to order, Anode or Cathode and what's the difference?

Common Anode is 1 pin in and 3 pins out. Ideal for driving with a LED driver chip like WS2801, MY9221, MAX16807 & STP16DP05.
Common Cathode is 3 pins in and one pin out.

I personally would get common anode LED's and a couple of WS2803 chips as I have used the device and it works well (and is cheap). Each WS2803 can drive 6x RGB LED's

@Riva

Thanks for your answer!
What would you recommend, 5mm or 10mm leds?
And how did you set it up / what are the schematics?

:slight_smile:

Also a lot depends on your level in electronics and in software. Some chips greatly simplify hardware design, and there is on-line library to communicate with IC ( TLC5940, MAX7219/7221.), so no problem on software side, but they cost more.
WS2801 / WS2803 is good choice, as it has serial interface, so less wiring/cables work.
To make life easier, you could find addressable RGB strips, that works with arduino, than all assembly boils down to hook up 4 wires.

To have learning experience, look into 74HC595 IC, it's cheap, but more complicated to communicate with. I'm working myself right now with this register, 9 IC, 72 PWM channel, arduino kicking SPI train commands set, in 38 usec, every 125 usec. No assembly so far!

Danton:
What would you recommend, 5mm or 10mm leds?
And how did you set it up / what are the schematics?

LED size depends on what you want to do.
I have no schematic yet but attached is a picture of the breadboard test I did. Ignore the red thing on the breadboard as it's just a DS3231 RTC (I intend on altering the LED colours over time).

I think I'm going to order 5mm RGB anode wide hat led's :

A led string is a option, but how many light does it give?

And it's hard to choose the right IC :P.

A led string is a option, but how many light does it give?

You always could have a look on youtube, to choose what kind of "high level "design you like the best , than check if there is a link to project on the web, and after move to hardware part. This one direction process, general overview -> LEDS -> Drivers IC -> Wiring -> Software.
Choosing leds before you make your decision on art side doesn't make much sense.

@Magician : That was a great tip.

I've looked into it and I'm going for a 12V 5M 300 RGB SMD 5050 led strip, with a 12V 2A power adapter.
Which IC would fit best in here? I was thinking of the WS2803D because it's cheaper than the WS2801.
Or would you recommend somethint like the 74HC595?
I want a lot of possible color combinations.

And I think this is the way to connect the strip.
http://www.ladyada.net/products/rgbledstrip/

Hi Danton,

Because of the nature of the LED strip you specified you should not need a LED driver IC unless your going to cut the 5M strip into several (more than 2) shorter strips and control each strip independently. You could just use 3x suitable NPN transistors per strip connected to separate PWM pins on the arduino (the UNO has 6 PMW pins so you can connect 2x strips and control them independently)

EDIT:
Just looked at your Ladyada link and it shows them using STP16NF06/TIP120 at bottom of page.

Riva:
you should not need a LED driver IC unless your going to cut the 5M strip into several (more than 2) shorter strips and control each strip independently. You could just use 3x suitable NPN transistors per strip connected to separate PWM pins on the arduino

I'm going to cut up almost the whole strip to use them seperatly.
Something like:
Arduino Leonardo -> IC -> 3 or 6 Led strips

Do I still need 3 NPN transistors per strip? Or can these be placed before the IC?

Danton:
I'm going to cut up almost the whole strip to use them seperatly.
Something like:
Arduino Leonardo -> IC -> 3 or 6 Led strips
Do I still need 3 NPN transistors per strip? Or can these be placed before the IC?

If your using something like the WS2803D it's datasheet says it can handle 12V directly so no need for the NPN's

Which IC would fit best in here? I was thinking of the WS2803D because it's cheaper than the WS2801.
Or would you recommend somethint like the 74HC595?

WS2803D looks O'K, WS2801 is 5V you can't use it with 12V strip.
How you need to control your 6 pieces of lighting, individually or they all changing color as a whole?

I want to control each strip individually.

O'K, than. Leonardo, AFAIK has 7 PWM pins, but you 'd need 3 x 3 = 9 /* for 3 strips /, and 3 x 6 = 18 / for 6 strips */.
It's mean you need more PWM pins than board has. There are an options:
WS2803 = 18 channels (1 IC needed)
TLC5940 = 16 channels (2 IC = 32 channels)
74HC595+ULN2803 (pair) = 8 ( 3 pairs of IC = 24 channels ).

Oke, but is it also possible to do something like this?

Arduino
-> Supplies signal to WS2803 via PWM pin and 12V

WS2803
-> 6 led strips all on different channels
-> signal to next WS2803

I need to be sure about the 12V :).