Nothing new, innovative or exciting in this topic. If you have already passed the flashing lights on the microcontroller for a long time, then you will most likely not be interested and you will only waste your time. To all those who are just starting to study microcontrollers, I offer here such a simple example of how you can beautifully give blinking LEDs (and at the same time add yourself a valuable experience).
I warned you. If you want to see what happened to me (a lot of pictures ), then I ask for a cat.
Initially, the idea was to make a photo print on the textolite ( like here ) from nortonix, plus add a beautiful highlight. Then, in the course of long thoughts before going to bed, a final idea was formulated, the essence of which is a blinking heart, in the center of which there will be a photo of a girl. Then I remembered that I already saw this on the hub here from Terehoff . But still I decided to do it my own way. Moreover, my other element base is
So, what I used in the project “artificial heart” :
- 32 LEDs (any color, which is closer to the soul);
- 1 LED tri-color (RGB);
- 4 buttons;
- 1 mk Tiny2313 (heart of the heart);
- 4 shift registers (classic, 595);
- a piece of PCB, two pieces of plexiglass, a cloud of resistors and all sorts of small gadgets.
In general, I used everything that came to hand. I don’t understand how, but it always works out like that for me. Here, I even added a toothpick here.
So let's go!
0) We are writing a microcontroller control program so that he knows when and what foot to raise or lower (I used CodeVision AVR and AVR Studio for debugging for this).
1) In the proteus (or other simulator) we draw our project, load the firmware, check if it works.
Note: carefully monitor what type of work you have chosen for the LEDs, remember that the analog way of working eats a lot of resources.
If yes, then
2) we do the wiring of the circuit based on the actual pinout and the type of housing of the circuit elements,
if not, return to step 0.
3) Using the loot, transfer the drawing to the future board.
4) We poison, cut, drill, trick.
5) Insert the elements of the circuit into the holes, solder,
carefully process with a file.
Here you can see how I laughed, forgetting to connect the buttons when wiring the board, as a result - mtf-e jumpers.
7) connect 5 V and enjoy.
If it turned out, then
8) Urrrrra! Works! we proceed with the installation of auxiliary gadgets (plexiglass, heart, buttons, pins, power connector).
A black background and a white heart are selected, inside of which there is a three-color diode.
If not, return to step 2 (which became in my case, because I sometimes get stupid. I can’t figure out how this time, but I forgot to connect two buttons, so in the photo you will see jumpers from the wire. Brake )
9) We do the final test of robots:
And finally, a short video:
As a result, as you can see, in vain I brought the drawing of the girl to the board - it still closed with a heart. In vain I placed a programming connector on the board (I could have known it, I don’t know). Well, I did a lot of things wrong and wrong, but I’m still happy with the result - and this is the main thing.
Thanks for attention.
PS Yes, you can do a hundred times better. Yes, I know, everything is elementary. There is nothing easier. And I agree with you, but only, and only after I have done all this. Although in theory he seemed to know how, but in fact he made so many mistakes that I won’t voice everything - they’ll laugh for sure. With this topic I just wanted to remind once again that no matter what level of knowledge / skills you are, do everything to the end, regardless of all obstacles, and you will be rewarded!
Something video did not attach. I apologize for illiteracy. Video here - youtu.be/cy9f3qK6wxI