Arduino Xmas tree Shield with WS2812

Christmas comes, and nothing more typical than riding a Christmas tree to give a bit of atmosphere. They come in many types, but this is intended for the most geeks, based on state of de art RGB LEDs and thought to 'planting' directly on an Arduino.



The scheme can not be more simple: an Arduino, 20 addressable LEDs WS2812b, few 100nF and a piezoelectric buzzer.

Arduino Xmas tree Shield with WS2812


The WS2812b are cascaded through a single wire, so that communication with Arduino is extremely simple, only one pin, the data are passed from one circuit to the next, and this enables each LED can be controlled independently. This creates strips or arrays of RGB LEDs easier than ever.
The WS2812b think without exaggeration that is a real gem. Internally includes three LEDs (R, G, B) and an integrated circuit WS2811, which is responsible for handling the data put a single pin, and send the next control each led with 256 levels of intensity.
Here you have a couple of photos I could do the above:


Arduino Xmas tree Shield with WS2812

Arduino Xmas tree Shield with WS2812



Warning! There is another version of the WS2812 equal to 6 pin WS2812b but in the power of the LEDs and the circuit are separate.
Given the boom have had, it is easy to find on ebay  in adhesive strips where only the input pin and the supply must be connected or loose as in this case.

For operation of the LEDs, I use a great library: Adafruit neopixel, can easily handle this type of LEDs.

The code

As I already mentioned, I use the Adafruit library to control the LEDs. Basically is the example 'strandtest' of the library, to which I added a first half in which the tune of 'Jingle Bells' is played using the tone function, and some more effect.
In case you do not want to constantly hear the melody, you need to make a bridge between pins 2 and 7 to ring.

This is the PCB design I've done:

PCB of Arduino Xmas tree Shield with WS2812

Although theoretically requires a bypass capacitor of 100 nF for each LED, I've put a few scattered around the circuit (if any LED gets lost in a given time and not think it will be very serious), so far I have not seen no failure.

Descargar

You can download the code, the PCB and the schematic here: 

Project Photos HERE

Merry Christmas!

If you liked it, remember to share it on your favorite social network. Thanks

3 comments

December 18, 2013 at 10:47 PM

Well done. PCB-tree : what a great idea.

Were the capcitors necessary or did you just put them by safety ?

December 19, 2013 at 9:22 AM

@BarbudorAccording to the documentation, this makes sure there's steady current available to the LED control logic amidst the small surges and dips that can occur as the LED brightness changes.
In minor projects like this, do not need them all, but in a major project may not work properly if the capacitors are not, especially if the number of LEDs is high.

December 20, 2013 at 10:19 PM

beautiful project! congratulations for your work! and thanks for sharing the source code

Post a Comment

Topics

Arduino (8) Christmas (1) FFT (2) Lights (4) Microphone (1) MOC3041 (1) MP3 (2) MP3 Player (2) Optocouplers (1) Power (1) Remote controller (1) RGB Led (3) SD (2) Triac (1) TSOP1738 (1) ULN2003 (1) vs1002 (2) vs1003 (2) vs1053 (2) WS2811 (1) WS2812 (1) WS2812b (1) Xmas (1)

Versión española

Versión española
Arduino es Guay!!

Search in this blog

Loading...

Follow in Facebook

Powered by Blogger.