I have been working on an awesome LED controller and hope to use it for a light show this Christmas!
I am getting better and better at filtering out the data and getting values exactly where I want them but I keep running into issues with my audio data circuit which utilizes the MSGEQ7 to send analog data back to the arduino for analysis.
On its own, the MSGEQ7 should produce some noise, that's just how it works, usually a filter value of 60-100 will resolve this nicely(default values range from 0 to 1023). However, when I plug my external psu into the LEDs(I use N-Channel MOSFETS - the logic level IRL540s to be exact), that filter no longer filters the data sufficiently.
The values require a way more extensive filter, ranging from 400 to 500 to even get close to the values without an external psu plugged in.
So the things I have done to help resolve the data issues:
Added a dimming curve - helps reduce flickering
Added filter values per frequency band - individually filtering each band to get the desired result
Added amplifying values - amplify each frequency band individually, this is added to the value AFTER the filter has been applied and only if that frequency band reaches the minimum required value
Added minimum value for amplifying values to be added - per frequency band minimum value AFTER filtering in order for amplification to take effect
These options and additions have considerably improved the accuracy and condition of the synchronization with music, however the grounding issue still poses many issues as this results in missed beats, ques and lyric synchronization. It's mostly the top 2-3 frequency bands that are affected, bands 2 through 7 are affected but the top 2 to 3 bands seem to have the most interference.
A 12v to 5v stepdown module to power the MSGEQ7 vs the arduino 5v power from the USB connection(measuring 4.89v via multimeter) - Currently on order, waiting for delivery from amazon
A second arduino to feed the MSGEQ7 data into the arduino mega's second serial port?
Does anyone have any other pointers for getting this resolved?
Circuit diagram: Screenshot - 2a04a632bcefe09e736d015a26424284 - Gyazo
Arduino Code: http://pastebin.com/jekYb0Qu
NOTE: The analog data can be found in the function updateMusics() in the Controller class(Lines 234 to 262).