Skip to content

plbarrio/christmaslights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Christmas tree lights

Arduino nano and WS2811 LED strip using FastLED library project, with different animation modes, some original other adapted from FastLED examples, which are:

  • Sinusoidal Waves
  • Heart Beats
  • Random color running up.
  • KnightRider
  • Alternating odd and even
  • Dalí, painter brushes
  • Glitter, random brights
  • RainDrops
  • Lightings
  • FLStaticRandom
  • FLFirstLight
  • FLFire2012
  • FLCylon
  • FLJuggle
See the video: demo.
<iframe src="https://www.youtube.com/embed/vo0XyzPjOzQ" frameborder="0" allowfullscreen="true"> </iframe>

Hardware

It uses an Arduino nano, WS2811 LED strip and a button for changing the different modes.

Check https://www.instructables.com/id/Arduino-WS2811-Christmas-Tree/ for instructions

Bill Of Materials (BOM)

  • Arduino nano. I ordered one with pins unsoldered since I soldered directly on the board.
  • WS2811 50 LED strip. There are also with green cables that are more discrete.
  • Switch. One with a long button is better.
  • USB charger. A used one from a cellular phone.
  • USB Cable type A male <-> type mini-B male. Reused from an old camera.
  • Plastic box. Reused a candy one.
  • A cable tie.
  • Three-wire cable.
  • Soldering tin.
  • Glue for the glue gun.
  • Insulating tape
  • Heat shrink tube

Wiring

wiring

Power

Everything is powered through the USB connector. The LED strip is powered through the VIN pin for not overloading the voltage regulator.

LED Strip

There are many types of addressable LED strips. The ones based in WS281x are very common. This chip family makes the Pulse Width Modulation ( PWM ) for you for each color, based on the data received in the data input pin. It uses the first block of data with every color and pushes the rest of the data flow to the next chip trough the data out pin. Fortunately, there are Arduino libraries that make all this work transparent for you.

Arduino LED strip Notes
VIN +5V Directly from USB
D6 Din 5V logic
GND GND

Microcontroller

Since the WS2811 LED strip needs a 5V data input we choose an Arduino with 5V logic. A 3.3V one could also be used, but we should make some sort of logic level adaptation. If not, it could work but a little voltage drop could drive to incorrect data or no data at all arriving at the LED strip.

Simpler microcontrollers as ATtiny85 could be used if you want to cut more the cost. Since we only need 1 output and one input. Depending on the versions the flashing is more difficult if it does not have a USB port.

Switch

One with a long button will suit better to go through the case, then you can actuate it without a pencil.

It is connected to GND because we use the internal pull-up resistor in Arduino to avoid false signals. Then in code a 1 will be no pulsated, and 0 pulsated.

Author

  • Pedro Luis Barrio - Initial work - gitlab

Acknowledgments

Revisions

  1. Changed I/O to use D4 and D5 for SCL communication in further projects
    • D4 -> D6
    • D5 -> D7

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages