EEVblog Electronics Community Forum
Electronics => Beginners => Topic started by: botcrusher on March 31, 2016, 05:45:12 pm
-
My end goal is to control lighting via DMX-512, that being said and iut of the way, i have several options at my disposal, several of which would work.
1. Software: some kind of package or library that i can use with python, cleanest in terms if requiring no additional hardware. (Aside from dmx module)
2. ATmega, software. Can i even use the analog pins for audio?
3. ATmega, harware. Some kind of low pass filter so i can get a voltage level for a certain frequency?
I'm not sure what the best route would be, if you could give me advice on any of these, or any additional ideas which would work, that would be great.
At the end of the day, i need to analyse peaks at specific frequencies, then interface with either the ATmega, python, or both (i have code for intercomunication)
-
I guess it depends on what you want (and which frequencies you want to analyze, especially for option 2 as you'll only be able to sample up to 5kHz).
Getting something looking good for anything but the bass is more difficult than it sounds. Personally I'd make it quicker with python and one of the FFT libraries out there, but I would do it with option 3 as a cool project. Simply run the input through 1 to 6 band pass filters, then into a envelope follower into one of the analog inputs on the Arduino. Now it's just a matter of figuring out what level you want to see on the analog input (and for how 'long' the value should be read) before sending a DMX value.
-
The Arduino may be a bit under powered to do any reasonable amount of audio processing but you could use an Arduino with a MSGEQ7 chip. I have never used it but it apparently has 7 different filters and gives you a dc output for each band (they are multiplexed out a single pin). Lots of Arduino examples on the net. Might be something with DMX output.
-
One Arduino example is here:
https://learn.adafruit.com/piccolo/code (https://learn.adafruit.com/piccolo/code)
It works reasonably well but is in no way accurate or easy to tune.
I was planning on trying out the MSGEQ7 mentioned by packetbob, but I haven't yet.
https://www.sparkfun.com/products/10468 (https://www.sparkfun.com/products/10468)
-
https://www.youtube.com/watch?v=dHhh0W3Kd6Q (https://www.youtube.com/watch?v=dHhh0W3Kd6Q)