I want to tell the story of creating a music box with elements of light illumination - a beautiful gift with the possibility of individual selection of light effects and musical accompaniment. Casket called uncomplicated - LED HEART. What kind of work has been done, I want to share a short story on the work on this with my hobby project.
The first video with a heart of LEDs I saw in 2010 on one of the youtube channels. The project is impressed. And in 2011, as a student, for a couple of weeks of work in the evenings, in secret from his girlfriend, he assembled a simple version of the LED heart, presented it on March 8th. The project was developed by itself - and hardware and firmware - studied, invented bicycles.
It looked ... well, something like this:
No photo, unfortunately, will not fully convey the degree of gift exclusivity, which 9 years ago seemed to me unsurpassed in some places. In the canned fish bank there was a printed circuit board with Attiny13A (in the photo, the MK is not visible, it was soldered by wiring outside - a bunch of wires extending beyond the upper limit of the photo), with shift registers and bright LEDs soldered along the outline of the heart symbol. On the outer side of the lid of the tin can is the inscription: “In your hands everything is filled with love ... and even ...” and on the inner side “... mackerel. Since March 8! ”. By pressing the big red button, the lights started running, the LEDs blinked and poured in accordance with the fact that it got into 1 kilobyte of the microcontroller's memory. Creative and romance splashing over the edge, as you can see. As I remember now, I wander between the rows of the supermarket and think about what kind of case to choose for a “hearty gift” ... suddenly my eyes stumble onto a shelf with canned goods ... and here it is ... enlightenment ...
Well, a little distracted, I will continue.
The story itself
Having received the desired response from his future spouse, the idea settled in his head that the production and sale of such interesting gifts might make sense in principle. Such a souvenir evokes positive emotions and symbolizes the warm feelings of the one who gives it. But study, diploma, work, routine, personal life did not allow to allocate enough time to engage in such adventures - everything ended without starting.
Three years have passed ... 2014 has come ... At some point, I began to stumble again on the Internet on similar projects - some of them were already more advanced and interesting - the idea to develop a unique heart version and start producing it with a new force, in the market- still nothing like that. At the same time, obviously, people showed interest. Having already experience in engineering, I began to approach this issue more systematically. But still, the work on this heart was held in a hobby mode - on some evenings, and on weekends, if possible, in parallel with other hobby projects and the main work, which was in the first place in the priority of all works. Therefore, in the end, the time frame turned out to be incredibly bloated for such a project.
Where did the study began?
First, the weaknesses found in the amateur constructions they saw were identified and assessed. The most important thing then noted:
The lack of variety of elements of light illumination.
The simplicity and clumsiness of the structures, which always lubricates the first impression and may not lead to the proper effect when giving. The overwhelming majority of the considered devices looked like an amateur hand-made article, nothing more (like the type I did in 2010) - not solid, not serious, boring ... Most of the examined heart designs either have no body at all or this body is horrible - Ala jigsaw of rotten plywood, a screw in the board, the windows of the org. glass etc. Some kind of optimum is needed - the type of device should not at least scare people away, on the contrary - it should transmit to the maximum the whole range of feelings from the one who gives it, and at the same time - the device should not be too large, super-complex, etc. .
The lack of sound effects of light effects in projects of hearts (with very few exceptions), although, in my opinion, it suggests itself. Just flashing the LED matrix is ​​not enough. Music should enhance the effect, add romance at the time of donation. Music can and at all be an individual feature of such a gift, it “warms up” the right atmosphere for the corresponding situation - romantic / solemn / fun and any other. It has been suggested that if the effects of illumination, with all the rest, are also synchronized with the background melody, it will be very cool, convincing and cool.
Since, according to the previous paragraph, there should be music - the idea to make a music box by itself - you open - play and sparkle - close - silence and fade away.
All these thoughts brain stormed for a while. First I had to decide on the specific functionality of the box. In general terms, it was seen as:
The heart must have an LED matrix of sufficient resolution so that you can run the ticker, do the simplest animation. Must be the possibility of a smooth extinction and the expansion of the LEDs.
The possibility of quickly creating and correcting lighting effects should be implemented to quickly rebuild the illumination program for a specific customer. Here it should be clarified that the model of interaction with customers implied the following. Initially, the client is provided with a basic set of illumination programs with preset melodies, from which he selects one that best suits his wishes - then, for his part, we adjust the illumination program, adapting it for this particular person, his occasion / holiday (text of a running line, which other frames). In the future, a gradual expansion of the base of available melodies and lighting effects was planned. Also, for my part, I can always advise the best option after talking with the client, based on the input data. The possibility of fully individual elaboration of the melody and illumination is not completely excluded, but at an increased cost, since the process of drawing up a program of light effects for a new tune in any case turns out to be significantly longer than the other processes of preparing the device for sale.
A specious body (relying so far only on your taste at the prototype stage).
Power autonomy, because the device is essentially a souvenir, it makes no sense to make it stationary, tied to an external source.
Further, these requirements were formalized into specific technical tasks, and one by one these tasks were gradually solved. In the process, various materials, construction types were sorted out, circuitry was thought out, and the lion's share of time was taken by writing software, realizing the ability to quickly add / remove / edit light effects, etc. As an example of such transformations, I can offer a demonstration of the work of the intermediate version of the casket prototype, made in 2015 - can be considered as the result of iteration 1 (the video quality is terrible, the sound was superimposed separately from an mp3 file, could not adequately record it then):
And already the final version, compiled in 2017:
It may seem that here the LEDs are dimmer than in the 2015 version, but this is not the case - just when shooting, there was too much light from an external source. The sound here is already real.
By the time this sample appeared, a lot of things had changed both from the outside, and from within the device, and in its software part.
Briefly about HW
The electronics of the box are located on three printed circuit boards. On the one are the LEDs, transistors and resistors needed for the matrix switching on of the LEDs, the Atmega32A control microcontroller and its harness. On the second board, power-on control is implemented when the box is opened, the power-off circuit with unacceptable power supply drawdown. On the third board implemented mp3 player (purchase module).
The case is a purchased metal box. Inside, the entire structure is based on a plastic frame printed on a 3D printer. Some elements are held using adhesive joints, the main board is held on magnets embedded in a plastic base. The box is powered by three AAA batteries.
SW in brief
For the PC, a code generator program with a graphical interface was developed that allows you to quickly create and edit lighting effects, monitor all necessary time intervals (to synchronize with the background melody) and immediately generate a code for the microcontroller firmware located on the heart board. A specific format for writing effect parameters to data sets was developed. On the MK side, the firmware parses these arrays and converts the desired LEDs to luminescence at the right times. The format of recording effects in the code tables is quite economical - the internal memory of the microcontroller programs is quite enough for both the firmware code and tables with light effect parameters.
On the solution of technical issues and problems encountered during the development, you can write a separate article. Of course, this is not “rocket Sains” and chewing such questions can be boring for the public, but if you are interested in someone, you can definitely be confused.
Total
What is the result? The casket project can still be endlessly licked and modernized, improved in completely different directions, add functionality, etc. But in the form in which the box was conceived - it was made, the design project was completed. For (small) mass production, some more work needs to be done, but this is a matter of technology, as they say.
Somewhere in the middle of the road, it was realized that trying to independently develop the commercial component of the project is not very interesting for me, there is neither time nor great desire for it. There was no person who would take over most of the sales organization work, work with melodies and lighting effects in my environment. With such a potential partnership, I agreed to close all technical issues, production, procurement and logistics. But it did not work out. And the time is constantly busy with other tasks - either more interesting, or simply necessary / everyday.
Therefore, at the moment I consider the project completed at this stage. In total, 3 copies of the latest version were made - two for gifts to relatives and one copy made to order. It may happen that the story will continue in some form, I will not blame, but at the moment the status is. In general, the result of the work I was satisfied. But the most valuable is the reaction of close people, to whom the first samples of the heart were intended, for this it would not be a pity to spend as much time as you like!
Well, in terms of the rationality of such a project, objective conclusions were made, lessons were learned that will surely serve me in future affairs and accomplishments!
Thank you, if you have read it, always happy to talk in the comments, if you have questions, comments, suggestions.