Led strips have become very common for various uses: from interior and exterior lighting, to decoration… today I’ll explain you which types of strips are available and I’ll show a pratical example for controlling them using Arduino and C#.
Led strips
A led strip is made by a variable number of leds (usually in SMD package) soldered on a flexible PCB. Leds may be single color or RGB, able to produce (almost) all the colors in the light spectrum.
Led strips can also be waterproof, for outdoor use.
The strips include also the resistors needed to drive the leds; the power supply is usually 5 or 12V.
Addressable (digital) strips
Some strips are addressable or digital: those strips include some control chips that allow to drive each led independently from one another. Sometimes the chips are visibile, sometimes they are embedded in the leds:
It’s very important to distinguish the strips according to the number of independent leds: the cheapest ones use a single chip to drive 3 leds. Sometimes in the datasheets you may read about the number of pixel: a led strip with 30 leds/m and 10 pixels/m is a strip with only 10 chips, each of which drives 3 leds; so you can cut the strip only every 3 leds.
The most used control chips are: WS2801, WS2811, LPD8803, HL1606… the Arduino’s library I chose support all of them!
Arduino
Almost all the digital led strips use a simple serial protocol: you need only an Arduino digital PIN to send the data and its ground, connected to the ground of the power supply you use for the strip.
On the Internet you can find some libraries for Arduino; I chose fastspi (official site) because it supports many control chips, it’s easy to use and very efficient in the use of the (limited) hardware resources of Arduino. In the next page you’ll find the Arduino’s sketch and the GUI, developed in C#…
Thanks a lot for these concise and precise explanations. Thanks to share it with us, it works perfectly !
Hello,
Thank you for your article, it helped me a lot.
Is the 60Leds Restriction because of the Byte[] size package ?
Hi! Well no, I put that restriction because my led strip had 60 leds but of course you can increase it with a small change in the code!
Complimenti Luca ottimo tutorial.
Buondì Sig. Luca,
Complimenti per il Suo lavoro.
Avrei bisogno del Suo aiuto in merito ad un progetto per un segnapunti da pallavolo.
Mi occorre realizzare 4 digit a 7 segmenti con pezzi di strisce led per essere visibili da almeno 15m.
A tal proposito ho pensato di utilizzare dei led indirizzabili come quelli della Adafruit NeoPixel.
Visto che la suddetta casa commercia segmenti da 8 led ognuno, ogni digit avrà 7×8=56 Led.
In sintesi, riuscirei a creare un indirizzamento per così tanti led? C’è un limite? Grazie e Scusi la domanda ma sono un neofita di Arduino.
Saluti, Umberto.
Salve Umberto, l’unica accortezza è sull’alimentatore usato per accendere tanti led: deve essere adeguato come corrente di uscita. Per risparmiare potrebbe anche utilizzare delle strisce non indirizzabili, pilotando ogni segmento con un apposito MOSFET.
P.S. – Per farmi comprendere meglio, mi sono ispirato a questo articolo.
http://rubyist.github.io/blog/2014/01/20/led-strips-as-7-segment-display/
Grazie ancora.
Ciao Luca,
grazie per il tutoria.
Una info: volendo controllare la scriscia direttamente con l’alimentazione di Arduino e non con fonte esterna, quanti led posso indirizzare al massimo se utilizzo per es. la striscia di Adafruit? Ci possono essere cali di intensità luminosa al crescere del numero di led con questa soluzione di alimentazione?
Ciao Marcello, purtroppo il chip di alimentazione di Arduino è in grado di fornire qualche centinaio di mA. Adafruit consiglia di stimare 60mA per ogni led, quindi non superarne una decina, altrimenti rischi di danneggiare il tuo Arduino.
Salve, buonasera; piacere sono Luigi volevo dirti che girando su internet mi sono imbattuto negli spettacoli di luci natalizi musicali che fanno in America cercando di capire i vari software e hardware che utilizzano, alla fine mi sono ritrovato difronte ad “arduino” e schede relè “solid state relay” 8 canali e ti allego la foto di quello che ho comprato. Ho acquistato tutto il necessario, utilizzando il software “vixen” ; facendo molte prove ho riscontrato un problema molto strano: colleganado le schede e le luci al relè 220v riesco a farle giocare, invece collegando le luci rgb a 12v le luci si presentano immobili e solo di un colore. Se è possibile un tuo aiuto vorrei capire il problema e se per lei non è un fastidio mandarmi i collegamenti delle schede ad arduino. Le dico anche credendo che arduino 1 non ce la faceva a far giocare le luci ho acquistato anche “arduino mega”.
Aspetto una risposta al più presto,la ringrazio in anticipo.
Buona serata.
Luigi è difficile capire cosa non vada, sicuramente una led strip rgb non può essere comandata con i relays. A seconda della led strip che ha acquistato (“smart”, quindi con controllo intergrato oppure da comandare in PWM da Arduino) servirà collegarla correttamente ad Arduino. Non conosco Vixen quindi le consiglio magari di rivolgersi a forum dedicati a questo software dove sicuramente la sapranno aiutare meglio.
Thanks for your sharing
I have some 12v individual pixel led strips,
could it be the same?
http://addressable-led.com/Products/gs8208-12v-individual-pixel-led-strip.html
Hi Phil, no your led strip uses a different controller (GS8208)
This arduino code does not work with new fastled library andThe FastSPI_led is hard to find nowdays. Do you have a copy of this library? Or you know diffrent lib that will make it work without changeing the code for Arduino?
Hi, unfortunately not, the article was posted 5 years ago…
salve. desideravo delle strisce led colorate per il monopattino, o a batterie ricaricabili o da collegare dentro il vano batterie cosi da collegare alle batterie del monopattino. grazie e distinti saluti
buongiorno Francesco, ormai di strisce led ne trovi tantissime: guarda ad esempio queste, controllabili via bluetooth
Hi Very nice project even if it is several years old. I built this and managed to get it working. Was wondering if you have ever done this same project but with a arduino uno wifi board (esp8266) ?
Hi, I think a very interesting project for that is WLED…