Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Christmas crib LED+AUDIO+MOTION

Status
Not open for further replies.

Vermes

Advanced Member level 4
Advanced Member level 4
Joined
Aug 2, 2011
Messages
1,163
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,316
Visit site
Activity points
22,318


It is a project of Christmas crib with a dynamic LED lighting, music and motion.
Size is 55cm high and 40cm wide. The whole was made mostly of wood and MDF. Nativity scene is illuminated by LEDs, mainly warm-white 3528. The driver has 36 PWM channels with possibility of infinitely variable light intensity. The device is based on two STM32 microcontrollers, one of which (smaller one) is only to generate 24 PWMs (14 hardware, 10 software) and the other (larger) generates the remaining 12 PWMs (hardware) and does all the rest (SD support, audio, inputs).
Applying the gamma correction significantly offsets the nonlinearity of the human eye at lightening/dimming.
The driver is equipped with an SD card, on which there are music files (WAV) and light program files (TXT).
To describe the sequence of light, script “language” was created, which consists of commands such as:
  • DIMM (lightens/dims the channel to set brightness at a given time)
  • DELAY
  • BLINK (a combination of two DIMM commands and DELAY)
  • GOTO
  • LOOP (making block a specified number of times)
The whole is stored in a TXT file. The driver reads the file from the SD card and parses the content. This gives a great comfort in creating light sequences without having to descend to the level of hardware, with only a notepad and a SD card reader.
There can be few sequences of light and they will be performed in parallel. This allows to blink stars in loop and in another “thread” blinking lights on the Christmas tree. It is possible to enable/disable the “thread” from the “language”.
The driver also plays music recorded on the SD card (WAV file 32KHz) via digital to analogue converter 12-bit, a simple amplifier and a small speaker 1W. Although 12-bit resolution, the quality of sound is fully satisfactory.
The light program can be synchronized to music, with the option of new “language”, time (relative or absolute) can be given, and commands to be executed then.
One of the PWM channels was used to control the DC motor, which rotates the wheel with figures. By using optocouplers, the figures may be stopped in certain positions (there are several digital inputs).
The whole is powered by 5V (power consumption is about 2-3W, depending on the number of LEDs attached). Unfortunately, you need to use a second power supply to the amplifier AUDIO, because digital part introduced terrible noises.



Synchronizing one Christmas carol with light takes about 1 day of work. Audio editor and a simple program on PC (thanks to which you can play light program without need to copy it to the SD card) make the synchronization easier.
Video of Christmas crib:


This is a fragment of the script describing the light program. Colouring was made by a free editor Notepad++, where your own “language” may be defined.



Link to original thread – Szopka Bożonarodzeniowa LED+AUDIO+MOTION
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top