DFT for as specific frequency

Discussion in 'The Projects Forum' started by selfbg, Nov 13, 2012.

  1. selfbg

    Thread Starter Member

    Jun 11, 2010
    23
    0
    Hello to everyone,

    I'm making very simple project to fade LED using PWM. I want to control the LED according to audio signal and I want to use specific frequency (about 100Hz). I don't want to use band-pass filter, but software implementation of DFT. I have these questions?

    How many samples do i need and for what period?
    Can you refer me to some example of calculation?
     
  2. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    According to Nyquist's Theorem, you'll need to sample at at least twice the highest expected frequency, though it's best to sample in the 8-10 times that rate.

    Here is the Wikipedia article which does a good explanation of the process...
     
  3. selfbg

    Thread Starter Member

    Jun 11, 2010
    23
    0
    Ok... So my audio is 22kHz, but I want to use the 100Hz... so I need to do samples at least 200Hz or 44kHz?
     
  4. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    If you are having a signal whose spectrum is up to 22kHz, you'll need to sample at least at 44kHz. Though if your signal is only up to 100Hz, then 200 Hz is your minimum...
     
Loading...