Notifications
Clear all

Raspberry Pi 4/5, Using FFT to create a Color Organ

4 Posts
2 Users
1 Reactions
45 Views
(@fvasquez1776)
Member
Joined: 2 weeks ago
Posts: 12
Topic starter  

Just starting this topic, so I can get this project off to a start.  I like knowing the hardware and software to do things, and the code that I have seen on FFT... well to be frank (and yes that I am)... my understanding on how the code and what it does is rather shady.  Perhaps we can also help people off down the line. 


   
Quote
(@fvasquez1776)
Member
Joined: 2 weeks ago
Posts: 12
Topic starter  

So, there are great resources on the Teensy website, and Adafruit... that i'll use to get started.  I'll post what i am doing and yea, i may be doing things a bit 'wrong' from time to time.  But that is why I am posting this, to get ideas, and help (and give help too =D).  If anyone have done this before, and have great code, please, please, please share!!!  Thanks!!!


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1784
 

Hi @fvasquez1776,

  An FFT is a well-known algorithm, but I, and probably many others, have never actually implemented it, on a processor, so you may not get much immediate advice, but if you get stuck, then perhaps someone can make a suggestion, if you clearly explain your story, to that point.

-----------

However, just in case this is a new area for you, I offer the following comment, with apologies if you are already familiar with the message.

I haven't read the resources you mention, but perhaps the most common mistake people make when converting an analogue signal to digital, (long before passing it through an FFT or other system), is they forget to ensure that the highest frequency components of the analogue input signal is not well below that of twice the sampling frequency.

Failing to do this, is unlikely to produce any magic smoke from the electronics, but I can't be so sure about your blood pressure, if and when, the results look (very) wrong.

If this message is a surprise to you, then I recommend you start looking up references like:

https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem

Then, make sure you have appropriate filtering in the analogue input circuit.

----------

I hope this isn't too much of a nasty shock, so far. Good luck with your project. I suspect there will be some readers who will be interested to know how you get on, though whether they will make their presence visible, is another matter. If you get confused by a specific point, try asking about it - there maybe someone who can help.

Best wishes, Dave


   
ReplyQuote
(@fvasquez1776)
Member
Joined: 2 weeks ago
Posts: 12
Topic starter  

Dave,

     @Davee any input is good input!!!... Yep, the Nyquist Frequency, I prefer at least 4 times the frequency, since at twice the frequency measurements are not accurate.  Back a few years ago, I designed a sample-hold circuit that fed into an A/D converter... so that experience made me quite aware of it.  Yes, please anything that comes into mind... of what to watch out for I definitely will appreciate it!!!

Best,

Frank


   
DaveE reacted
ReplyQuote