Weihnachtsprojekt - Lichterkette ansteuern

Christmas is slowly coming to an end. One is happy, the other is a little sad that it is already over.

Now the fairy lights are repackaged and disappear at the attic. Here we introduce you to a small project on how you can pimp small fairy lights.

We take a small battery-powered string of lights. I use one with 100 low power LEDs in RGBW (red, green, blue, white) version. By default, this string of lights is powered by 3 batteries and all colors are lit at the same time.

Now let's use an Arduino Uno (Get here with us) instead of the battery compartment.

 

So that we can create different effects, we separate the string of lights at the supply line to:

This means that we have 4 individual LED strands at our disposal. Unfortunately, due to the construction of the fairy lights, the individual colors are not available to me, but all 4 colors at the same time.

What we have to consider is the resistance at the switch in the battery compartment:

In this case, it is a 2.8 x (red, grey, gold, gold) resistance.

So that the string of lights is not operated without resistance, I have simply tried different sizes of resistors (from large to small), and I am satisfied with the brightness with a 10 x resistance.

To avoid having to solder the string of lights directly, we use a pinheader bar and a residual hole grid board. On the ground line we have crimped a pinheader directly.

This makes it easy to put the string of lights on the Arduino.

We are already finished with the hardware and write our program, which can of course be adapted and optimized according to your own needs. Leave your effects in the comentars.

 

 

Void Setup() {   pinMode(7, Output);   pinMode(6, Output);   pinMode(5, Output);   pinMode(4, Output);
}

Void light chain( Bool A, Bool B, Bool C, Bool D) {   digitalWrite(7, A);   digitalWrite(6, B);   digitalWrite(5, C);   digitalWrite(4, D);   Delay(Random(100,300));
}

Void Loop() {
 light chain (High,High,High,High);
 light chain (High,High,High,Low);
 light chain (High,High,Low,High);
 light chain (High,High,Low,Low);
 light chain (High,Low,High,High);
 light chain (High,Low,High,Low);
 light chain (High,Low,Low,High);
 light chain (High,Low,Low,Low);
 light chain (Low,High,High,High);
 light chain (Low,High,High,Low);
 light chain (Low,High,Low,High);
 light chain (Low,High,Low,Low);
 light chain (Low,Low,High,High);
 light chain (Low,Low,High,Low);
 light chain (Low,Low,Low,High);
 chain (LOW,LOW,LOW,LOW);
 light chain (High,Low,Low,Low);
 light chain (Low,High,Low,Low);
 light chain (Low,Low,High,Low);
 light chain (Low,Low,Low,High);
}

 

This is what the whole thing looks like done with a power bank:

 

We wish you a merry Christmas and a good start to 2019!

For arduinoSpecials

Leave a comment

All comments are moderated before being published

Recommended blog posts

  1. Install ESP32 now from the board manager
  2. Lüftersteuerung Raspberry Pi
  3. Arduino IDE - Programmieren für Einsteiger - Teil 1
  4. ESP32 - das Multitalent
  5. OTA - Over the Air - ESP programming via WLAN