New Year's LED star on a microcontroller. LED star on the Christmas tree to which I put my hands Scheme of a flashing star on the Christmas tree

DIY glowing star decoration for the New Year using microcircuit K561IE8. A simple module based on the K561IE8 chip was developed specifically for the experiments. Let's assemble a flashing tip for the New Year tree with our own hands.

How to make a star lighting module for a Christmas tree

1. The basis is a simple star-tip sprinkled with sparkles. These sparkles fell off the Chinese product and stuck to my hands like needles from a February New Year tree. To stop shedding, I immediately carefully coated the star with transparent varnish; latex varnish worked very well on water based. After varnishing, the star faded a little, but the sparkles no longer fell off.

2. The figure shows the electronics circuit. The pulse generator is assembled on a blinking LED HL1. The K561IE8 chip is a decimal decoder. In this embodiment, only 6 pins are used to control the LEDs and the cycle ends at the 9th pulse. Initially I tried to control the LEDs without transistor switches, the microcircuit worked, but it was difficult for it to turn on 5 LEDs at the same time, the microcircuit got hot and the LEDs did not burn brightly. Therefore, transistor switches VT1 and VT2 were supplied to turn them on. Diodes VD1-VD8 decouple the control circuits of the transistors from the outputs of the microcircuit and at the same time form a pattern for turning on the LEDs.

3. The module itself is assembled on a printed circuit board. The transistors are mounted on the board using a hinged method. The LED leads are extended with separate wires.

4. Charging from cell phone. If necessary, the power cables can also be extended. The charger parameters are standard - the output is 7 Volts at a current of up to 0.6 Amperes. Before installing the board on the star, you need to check the functionality of the device. If the brightness of the LEDs varies, the dimmest ones will have to be connected through separate current-limiting resistors or replaced with brighter ones.

Transistors installed

Result of work homemade device visible in the video clip. Since the microcircuit has 10 sequentially connected pins, the number of combinations of sequential switching or running lights is quite large and is probably limited only by the number of LEDs and manufacturing time. I would also like to emphasize the safety of the design, it is powered low voltage from a short-circuit protected power supply installed in an outlet. Let's have fun celebrating the New Year!

More material on the topic of homemade New Year's decorations.

The Christmas holidays are over.
Shortly before the new year, I brought a box of old toys from the garage. It was curious what was preserved there after 20 years of oblivion. I discovered several construction sets, a battery-powered traffic light, a remote-controlled (wired) car, pinball, football, hockey, railway, “behind the wheel”, etc. Many toys needed to be put in order. I hoped that the restored toys would be of interest to my growing children. In any case, the hand does not rise to take them and throw them away. If the reader is interested, I will describe and even compare these old toys and construction sets with modern ones.
But now I’ll tell you about how I restored the main decoration Christmas tree- red five-pointed star. There will be a lot of pictures.



It consists of two halves, twisted together with a plastic bolt, which also serves to put the star on the Christmas tree. Inside there is a mount for five light bulbs (60V,50mA). They are connected in series.


Despite the voltage reserve, only three light bulbs turned out to be working. Similar lamps could only be found for 24V. It was impossible to make anything worthwhile from the available parts, but New Year was already very close.
Then I decided to use modern technologies and replace incandescent bulbs with LEDs. There was a 12V tape available. A ring of four segments just fit (and stuck) inside the star.


The diodes could be powered in at least two ways. I started with something simple: I soldered a wire with a connector and connected it to the power supply. Everything worked. The star and power supply were slightly warm (within normal limits).
This is how we celebrated the New Year.


By the way, at one time the body of the star melted a little. It may be from an incorrectly installed lamp, or from problems with heat transfer. Now it won't happen again.


Everything is fine, but I wanted to keep the original wire and avoid having to use additional block nutrition. An unexpectedly found Chinese LED driver with a quenching capacitor helped me with this. He had two drawbacks. One resistance was getting very hot, and the driver board did not want to fit into the star housing.


In the end I built hinged installation a similar scheme, while removing the “extra” details. It is not practical to protect LEDs. If they burn out, okay, we’ll replace them. But the scheme was still not left without protection. A series-connected light bulb from some kind of garland will successfully replace a fuse. It even dampens voltage surges, flashing funny when the circuit is connected to the network.


As a result, I got a working star that decorated the tree on Christmas night. It does not fade (the current through the LEDs was ~10mA), it is similar to original product. It just burns differently. It shines with a ring, not five lights. In my opinion, this option is also quite interesting.


Next New Year, my Christmas tree will again be decorated with a glowing red star!
Things with soul and history will decorate your life and become a subject for discussion.

PS. I'll leave a couple more photos here. This is an option for decorating a window sill, made from a sheet of cardboard, a piece of foam plastic, double-sided tape and a meter-long piece of LED strip. The design is powered by two lithium batteries, torn from an old laptop battery.

Tags: new year, LED Strip Light, LEDs, decorations, Christmas tree


This is a little guide on how to make the stars sparkle. In this way, you can create a New Year tree without cutting down the forest. This is what the Christmas trees look like:

Can't watch the video - Click here...

With a little soldering, you can make some cute LED stars. The size can be 6 - 10 cm wide, and a 9-volt battery will be supplied.

If you want to be able to easily change batteries, see Step 5. The star can be attached to the clip of a 9-volt battery...

Take your soldering iron, LEDs, find some batteries and make bright New Year's decorations out of it all.
If suddenly you are not confident in your soldering talent, start with something simple - a star. It's really easy and you can definitely do it. Believe me.

Step 1: Materials and Tools


For the New Year's LED star you will need:

5 red 5mm or 10mm LEDs: the choice is yours. The bulbs must be red to provide sufficient light from a 9-volt battery. I tried both regular diodes and matte ones. Choose what you like best
- 9 Volt battery.
- 10 cm of durable copper wire.

If you want to make a *flashing* diode star, you will need different types LEDs:

1 flashing diode 5 mm red.
- 4 “low-current” LEDs with a transparent bulb, also red.

The total cost of one twinkling star is about 90 rubles, depending on where the diodes were purchased. An ordinary sprocket will cost 30 rubles less.

Tools you will need:
- for the template: 5 mm plywood or something similar.
- soldering iron and solder
- pliers and pliers
- polymer clay or a third hand to secure the star parts for soldering
- multimeter for debugging

Step 2: Layout


New Year's diode star:
The circuit for an LED star is not very complicated. Five diodes are connected “head to tail” into one circuit.

The switch in the circuit is not a physical part of the star. The asterisk lights up (the circuit is closed) when the wire is connected to the positive terminal of the battery.

Step 3: Making a diode star


To make soldering the diodes as easy as possible, I made a template from plywood. This is a circle with marks for five light bulbs.
- Place the diodes on the template.
- Spread the legs of the diodes at an angle so that they coincide with the sides of the star and adjacent legs of different diodes intersect with each other.
- Fix the diode contacts on the template.
- Solder the contact connections
- Cut off excess edges with small pliers.

You have a closed star.
- Cut off the worst soldered joint.
- Now you have a star with a cut.

Check the operation of the circuit:
Connect the ends of the star to the battery terminals. Don't forget about the polarity of diodes and batteries! If the star is lit, you did everything right. If not:
- most likely, you connected at least one diode using the “head-to-head” principle instead of “head-to-tail”.
- If all the diodes are soldered correctly and STILL does not work (this happened to me...), most likely one of the diodes is not working. Test each diode individually with a multimeter or a 3-volt coin cell battery or power supply.

Solder a piece of copper wire (about 4 cm) to the negative terminal of the diode circuit. Picture 3 shows this step.

Step 4: Final Stage


You're almost done! All that remains is to solder a piece of wire to the negative pole of the battery.

There are a couple of features here:
- Take a piece of wire, the same length as the one you just soldered to the star.
- Place the battery and apply the wire to the larger contact of the battery (marked with a minus sign).
- To solder wires to a contact, make sure that both the wire and the contact are well heated before adding solder.

CLUE:
First fix the position of the battery and wire. Use duct tape, a third hand, or anything else to secure the battery and wire before soldering.

Finally, solder the other end of the wire to the positive terminal of the diode star. Now everything is ready :-D

Liked? You can make a Christmas tree in the same way. It requires a little more effort and patience, but the result will justify these difficulties! If you have mastered the asterisk, the Christmas tree simply has to turn out!

Step 5: Add a battery clamp...

The time has come, the end of the year, snow holidays and good mood)) What is a (New Year/Christmas) holiday without a tree? What's a Christmas tree without decorations? It is about decoration that we will talk about, or rather about the final touch, so to speak about the cherry on the cake, or more precisely about the star on the Christmas tree. In general, you are welcome under CUT.

Actually, a star for the Christmas tree was ordered from the Chinese. The lot has a choice of sizes, all as in Soviet times: product No. 1 No. 2 No. 3 I ordered No. 2. The size from tip to tip of the star is 18cm.

The star is made of transparent, brittle plastic; there are many edges on the surface for refraction of light.
Actually, everything is simple: two identical halves, a core with electronics, a leg-mount for the top and a switch.
This is what it looks like when turned on.

We could end the review here, but dear reader, you won’t get away with it that easily)))
I decided that I wanted the best and I knew how to get it from this simple piece of plastic. Yes, the WS2812B solution is quite predictable - simple and beautiful, but here I have my own approach.

1) I will not use arduino or ESP.
2) I don’t need any IR receivers, WIFI or Bluetooth, I’m not going to sit under the Christmas tree and switch colors, that’s a software task.
3) The device will be made on one board, and not from shit and sticks of different modules of wires and hot glue.
4) I will use PIC18F46J50 and write all the code myself in mikroC.
In general, such an old school approach)))

The first step is to measure the star and create the board in Altium.

Further developments here

After trying on the paper version of the board, you can begin to create a real board from foil PCB. We take a piece out of the stash and cut the piece to size.
A film photoresist will be used and for successful “rolling” it is necessary to clean the contaminated surface (a sign of contamination is water rolling off the board)
We take a dish sponge and clean it with the abrasive part; in addition, you can use a product with acid (for example, a toilet bowl cleaner).
The main thing is to achieve the result, and the method by which it was obtained is not very important to us. A surface that is wetted with water is considered success. (It is not visible in the photo, but there is a water film on the entire board and the water does not readily leave the workpiece.)
Now you can start adjusting the pre-prepared photomasks. (They are printed on transparent film; to increase the density, you can use solvent vapors and double layer templates)
We “roll” the photoresist, there is a lot different ways. I wet the workpiece, place the prepared piece of film, level it and remove the water with a silicone spatula. Next, I place the workpiece between two sheets of paper and send it to the laminator. (I would like to note that there are many ways to perform this procedure)
We install the sheet between the templates, making sure that the placement is correct.
It's time for exposition.
After a certain time (individually for each type of photoresist of lamps and distances), we don’t seem to see the result, but if you look closely there are changes.
All that remains is to carefully, like an archaeologist, use a brush to reveal these changes in a solution of weak alkali (soda ash).
After washing we get a mask, open areas copper will be removed at the next stage of “etching”, so you need to carefully examine the mask and remove the “jambs”
After etching we get an almost finished board.
Next, we use a solvent or strong alkali (clog cleaner) to remove the photoresist. Attention: when working with alkali, use glasses and gloves to avoid chemical burns and permanent damage to vision.
Now you can slowly see the result of the time spent.
We cut off all the excess and try on the board for the future location.
We drill holes.
Next, I decided to tin the board (the solder is of course not chrome, but the metallic sheen will be useful to me)
After tinning and cleaning the board, we assemble.
Next, let's connect the power supply (there was a problem with it, the Chinese raised the voltage to 5.4, we had to lower it a little by changing the values ​​of the setting resistors to TL431)

After all the pain of bingo.

Now all that remains is to write the program.
The requirements are simple, many effects and random selection. To control the LEDs, I used SPI. More details under the spoiler.

Briefly about programming

If you look at the description, then to control the ws2812B signals of equal periods are used, but of different durations of the level of logical one “1” and zero “0”. It is worth noting that the control signals are quite fast with tolerances of 150ns.
However, there is one feature, ws2812b is not very demanding in terms of maintaining these tolerances and only the duration is critical high level, low level may seriously deviate from the specified requirements. This allows SPI to be used to send data. If set correct frequency SPI, then you can send two signal bits in one byte, which is actually what I used.
In my design there are 2 sides (they are parallel), on each side there are 15 LEDs in series, knowing that each ws2812b has 3 bytes for color encoding (this is 12 bytes via SPI), we get that everything requires 180 bytes of RAM (“video memory ").Therefore, to output colors, you need to create an array of 180 bytes, change the values ​​to create a pattern, and send these 180 bytes over SPI.

After we figured out how to control it, we configure the microcontroller and write several functions

Star update - "video memory" output
Setting the color of a specific pixel (for convenience, I introduced the coordinate system of a star ring and a ray)
Copy of pixel color
Setting the color of all memory,
Setting the beam color,
Setting the ring color,
Rotation of rays,
“Retraction” and “repulsion” of the rings relative to the center of the star.

These 8 functions allow you to create different effects. Using randomness and mathematics, I created 15 different modes. To randomly generate effects and select a sequence of effects, I used pseudo-random (random number generation) to avoid repetition when restart you can set the starting point of generation for these purposes; I used the sum of video memory cells immediately after the microcontroller started operating when it contained various arbitrary information.


In the end, this is what I got. (here I turn the stars on and off to show the modes)


Well, I guess I can say goodbye to this, I hope you, dear reader, liked the review. And for dessert, a festive GIF)

I'm planning to buy +17 Add to favorites I liked the review +100 +169

The proposed circuit works as a generator of simple LED lighting effects.
The LEDs are arranged in the form of eight rays of a star, as you can see by looking at the picture printed circuit board.
This design is an ideal decoration for a Christmas tree or decorative element home interior.

The first LED is the center. Then come the inner ring LEDs (D3-D19), then the next ring and so on, all the way to the outer ring (D43-D50). Then everything repeats again. The switching speed depends on the parameter of the variable resistor P1.

The clock generator is built on a 555 timer (IC1), then the clock is fed to a decimal counter 4017 (IC2). a signal appears sequentially at pins 0-6, which controls the LEDs using buffer transistors (T1-T7). The seventh clock pulse resets the counter and everything repeats.

Rice. 1. Tree star switch diagram

List of components:

Resistors:
R1 = 2 kOhm
R2 = 10 kOhm
R3 = 33 kOhm
R4 = 390 Ohm
R5,R6,R9,R12,R15,R18,R21 = 1 kOhm
R7,R8,R10,R11,R13,R14,R16,R17,R19,R20,R22,R23 = 100 Ohm
P1 = 25 kOhm variable
Capacitors:
C1,C3,C4 = 0.1 µF
C2 = 2.2 uF 16V electrolyte
Semiconductors:
D1 = 1N4148
D2-D50 = red LEDs
T1-T7 = BC547
IC1 = 555
IC2 = 4017
Power supply:
Krona battery or any other 9V cell battery


Rice. 2. Arrangement of elements