What you want to do is run an fft. This will ourput a real and imaginary component. You will want to get the magnitide of this be taking the square of the sum of squares. This is assuming that you already have the data in digital format. I forget why, but you get a mirroring effect, and because of this, you can cut out the last half of your data when you go to display it. you can also use a moving window buffer to process your data from, or just a fixed rate type buffer. This would be once the buffer got full, you then do the fft. Fft's are very computationally expensive, so you cannot do them that fast. You kight be looking at 1-10Hz depending on number of points. Oh and you want your buffer to be as big as the number of points your fft is, or if smaller you will want to zero pad it.
That falling dot is just the peek of the fft in that bin. You just jave it fall at some programmed interval, and reset once that value has been exceeded.
All this that I passed onto you is somewhat theoretical. I was looking to use this method for my rf project when I realized that I could not perform the calculation fast enough.
A Fast Fourier Transform (FFT) is certainly one option, but -- as you say -- it is computationally expensive -- espectially if all you have to play with is a 16MHz Arduino Mega with only 8KB of SRAM (sad face).
Happily, there are other alternatives (said Max (a) mysteriously and (b) as if he knew what he was talking about LOL).
Wait for Part 2 of this mini-series when all will (probably not) be revealed :-)
@Max...being an old-school guy (Read: old fart) I would use a bunch of LM3915 dot/bar display drivers. You'd then have to get a bunch of narrow band or notch filters, one for each frequency. This would wind up being a considerable number of IC's, though you might me able to mux some of it....... so Aeroengineer's idea of FFTs is probably the better way to go (and that way you could probably work an FPGA into it as well....)
Just roll it out already!!! ;) I was going to say, the other way would be to do a series of bandpass filters in software. Because you are not looking for anything too sophisitcated, the filters do not need to have very high Q, and they could blead all over one another. Or you could go with a Cortex M4 part and be done with it. You know you want to! I think that there is a Cortex M4 part that is Arduino compatible.
I thought that comment at EE Live! was good -- the one about you being a mechanical engineer who was doing electronics, while at the same time you are an aerospace engineer who is building submarines LOL
Yeah, I kind of have my hands into a lot. You were also very complimentary of my skills. I still have a long way to go. Tonight, I will be setting up a function to enable my Gyro/Accelerometer for my receiver project.
What got me here is the link in the emailed newsletter from ubmtechelectronics.com. It was promising me "Max's MADASS Display, Part 1". Following the link, I've found "Max's BADASS Display, Part 1", instead. I feel slightly cheated but very much intrigued!
I need to know, @Max, do you have both MADASS and BADASS displays? Have the design specifications changed? Are you playing the old MADASS/BADASS switcheroo on us? Or, shock horror, have you been censored?! :-o
A lab partner of mine and I built one of these things in 1978. It was about 24 X 36 inches. The bulb spacing was about 0.75 inch and the front to back spacing was about an inch. We connected it to a 5 channel color organ and had a blast playing with it. We got some interesting effects by move the top or bottom closer to the back. Give it a shot. Good luck, Kim
Hi Rick ...interesting... I was planning on writing Part 2 today, but I finished my Infinity Mitrror last night, so I'm going to post a blog and video on that sometime today, and I'll do Part 2 of the BADASS display tomorrow -- then maybe you and I can chaton the phone (when are you next going to be back here in Huntspatch?)
@Max: when are you next going to be back here in Huntspatch?
Actually, I was in Madison last Wednesday to tour STI Electronics (VERY interesting place!), but word of my trip must have been leaked in advance because I saw that you slipped off to the Left Coast just before I passed through.
I'm looking forward to seeing the Prognistication engine, the BADASS display, and the Infinity Mirror (and other heretofore unknown wonderful stuff) soon!
I actually saw that same vertical boombox with LED spectrum at the San Jose airport when I was leaving EE Live and I'm shocked it was $200! (Though, I am not shocked that the punk working there was too self absorbed to even make eye contact with you. Haha. Just so you know, I'm 27 and I still find that incredibly rude.) I'm glad to see someone move so swiftly from an idea to a project. It seems to take forever before my projects get any traction. But I'm eager to see what hardware will be involved in whatever project you settle on. My guess is 128 RGB LEDs, 2 Arduino Uno's, and 12 motorized potentiometers with aged-bronze dials.
How about doing a stereo design, but have each channel emanate from the far vertical sides towards the middle? You could also have the color start become more intense or brighten as it nears the middle. Low frequencies at the bottom and high frequencies at the top. You could generally correlate the sound spectrum with the breadth of the light spectrum - deep read to yellow, green, blue and purple for the highest audio frequencies with graduations bridging the gaps.
@pmcw: How about doing a stereo design, but have each channel emanate from the far vertical sides towards the middle?
Funnily enough I have been thinking about going stereo. There are several ways to do this-- for example:
Having low frequencies on the left transitioning to high-frequencies on the right -- then having the left-channel on the bottom growing up (with intensity/volume) toward the middle and the right channel on the top growing down.
Or we coudl keep the low-frequency-left to high-frequency-right, buthave the left channel start in the horizontal middle growing down and th eright channel start in th ehorizontal middl egrowing up.
The great thing about having a bunch of LEDs and a microcontroller is that you can experiment with lots of different display styles.