Sign in to follow this  
Followers 0
ashley

Christmas Lights to music

9 posts in this topic

I'm new so if I am not using this forum correctly let me know. I am not very good with plcs as far as preparing ladder logic. but I am self teaching and learning by trial and error. My first question is does anyone know if I can input an audio signal and not have to use a drum sequence and "time it to the music" ??? I am going to get one with a couple of Analog I/O and then I am adding a relay 8pt out module as well. I'm trying to figure this out so that I don't have to buy a "ready to go" system. I want a feeling of accomplishment. I have had a click plc in the past and got it to make the lights flash with a drum sequence but that is going to be a lot of work.

Share this post


Link to post
Share on other sites
The first thing you would need to look at is getting the audio signal to the PLC's analog input. This may not be as straight forward as you think. The analog card would be expecting either a 0 to 10 Volts or 4 to 20mA signal. A dry audio signal will be a very low voltage. You would certainly need some sort of amplifier to get the PLC to see it. Even then, you would need to filter out the high frequencies to receive only the bass or drums for your beat. I've done a quick search and do not see any 'off the shelf' devices for this application although I saw some 'build it yourself' type. I've not done this type of application before but maybe some other electronic gurus in these forums have. Good luck.

Share this post


Link to post
Share on other sites
I know PLC's can do the job, with a lot of effort, but .... have you ever looked at http://www.lightorama.com/index.html the work and control and software to configure already done for you .. and you can download music sequences pre-programmed... that is how i would go these days....
1 person likes this

Share this post


Link to post
Share on other sites
My last place of employment (an automation engineering firm) had one of these that they used for their Christmas light displays. They're slick, easy to set up, and some even come with a FM transmitter so that you can broadcast the music for folks to play in their car while they drive through the display. Highly recommended. Greg

Share this post


Link to post
Share on other sites
Just new to the forum and this subject is something that I have been doing for years. The lightorama product looks great, but I needed my own solutions to animatronics issues I faced well before it's time and I have evolved things over the years. If you are simply looking to run a "synchronised" soundtrack and display, try using a cheap MP3 player and electrically tapping into it's control buttons so that the PLC runs it. I have run sequences of up to 10 minutes without any problems at all, and you could likely go much longer owing to the accuracy of things these days. In the early days I did it with cds with no problems either. For the control side it is essentially based around starting up a count on a fixed scan system and then doing compares to trigger whatever is required. Not bagging computers, but I would much rather use a PLC as they are far more reliable in my situations owing to their very nature. Of course things are much more complex than I make it sound, (eg all the safety controls I have to have, plus a host of other stuff) but the basics are pretty easy. The final setup can need patience to get it perfect, as you don't have a visual timeline to match things up. I carefully build my soundtrack, noting times as I go, and then run it in a wave reader so that I can cross-check things again. This then lets me relate actions needed to the count in the PLC quite accurately. The final finetuning is done with a video of the running show that lets me tweak it perfectly....no need to constantly run the show after just changing a few numbers because you lose track of so many minor alterations needed! If you want to get really adventurous you can write it all so that you do block transfers into your compare registers to have a totally different show. Run the MP3 player through to a different track and away you go! If you need to make it really permanent (like most of my installs are) buy a few of the players you end up using, as they all work differently and it can lead to swear words emerging unknown from one's mouth during reconfiguring things for a new player if the old one dies! cheers, Ausman
1 person likes this

Share this post


Link to post
Share on other sites
I don't have the kinda money it would take to get one of these units going.
1 person likes this

Share this post


Link to post
Share on other sites
Sounds like you are only going to get basic on off control of the lighting. With that in mind, I think you would have to build sequencing for each song. If you use the analog input to monitor signal strength, watching for the breaks between songs, you can use that to increment which song/sequence you are using. Start the song timer/drum timer at the beginning of each signal input. That can be tricky because of the way some songs start so low in amplitude, you need a clean signal for sure. Then you need to build each song and you would be at a disadvantage that you would have to keep the songs in order. Changing the order would be a matter of manually assigning each song a new place number so your incrementing would assign it properly.

Share this post


Link to post
Share on other sites

Looks like you are looking for a song before Christmas. I will show you my consent.

Share this post


Link to post
Share on other sites

if you are looking only for something that responds to beat, it is enough to use low pass filter and amplitude detector .that can go into digital input, no need for analog.

what are you using as music player? maybe some info could be sent to PLC separately.

btw if you are into thins kind of things, circuits can be simple which is easy to simulate or just build and test

for example with just few parts on a breadboard or small PCB one can build microphone amplifier with decent low pass filter..

LM358 microphone amplifier circuit - Soldering Mind

https://solderingmind.com/wp-content/uploads/2019/07/lm358-microphone-amplifier.png

by adding apacitor in parallel with R5 you are also eliminating high frequency gain and turning this into a low pass filter, just like shown here:

https://www.electronics-tutorials.ws/filter/filter_5.html

one can also modify circuit into a second order filter.which i think is unnecessary: 

2nd order low pass filter

https://www.electronics-tutorials.ws/filter/second-order-filters.html

mentioned OpAmp is a tiny DIP8 package and sports dual opamp. i would add a volume knob after first stage and use second stage as a buffer to drive an optocoupler like SFH620A which can drive PLC input directly. the whole thing is maybe $2 and a bit of fun.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0