Search results

  1. A

    [ASK] Compute THD and SNR thru teensy 3.2 board only

    Hi defragster, Thank you for your comment. 1)For the freq bin comment, I forgot to amend it accordingly. (will update it soon) 2) For THD, I just figured the fundamental till 6th harmonic. Fundamental is around bin 22~ 25, that'w why I skip bin 2~21. 2nd harmonic is around bin 45~48, so in...
  2. A

    [ASK] Compute THD and SNR thru teensy 3.2 board only

    Hi Paul, It is fine for me. It can used for public domain. Thank you and best regards Alan Soong
  3. A

    [ASK] Compute THD and SNR thru teensy 3.2 board only

    Audio Function Test source code (With Freq, SPL, THD and SNR) Hi all, I'm managed to complete the audio Functional test with functions of freq, SPL, THD and SNR calculation. I uploaded the source code here so that anyone of you able to use it when needed and also welcome to verify my source...
  4. A

    [ASK] Compute THD and SNR thru teensy 3.2 board only

    Hi Bob, Thanks for your verification. I have tried on checking the over driving problem and there is no such issue. In that case, mean my THD software code is correct and applicable? Thank you and best regards Alan Soong
  5. A

    [ASK] Compute THD and SNR thru teensy 3.2 board only

    Hi Bob, Please see below SPL.ino and also serial output result.PNG for your reference. Thank you and best regards Alan Soong
  6. A

    [ASK] Compute THD and SNR thru teensy 3.2 board only

    Hi Bob, Is that mean the magnitude = (1/512)* pow(v[i],2) comes out RMS voltage and it is after square root as indicate in the fft1024.cpp as below? uint32_t tmp = *((uint32_t *)buffer + i); // real & imag uint32_t magsq = multiply_16tx16t_add_16bx16b(tmp, tmp); output[i] =...
  7. A

    [ASK] Compute THD and SNR thru teensy 3.2 board only

    Hi Bob, Thank you for your input. I have added the sqrt to the code and i just take up to 5th harmonic result to calculate the THD. Unfortunately the result still negative. From Audio Analyzer, the THD% is about 3% From my teensy board, the THD% is about 20%. It is quite big difference...
  8. A

    [ASK] Compute THD and SNR thru teensy 3.2 board only

    Hi all, I have make some code for the THD calculation as below. When I compare the THD% result by using audio analyzer and it is incorrect, can anyone expert help to check whether my code have any issue? void THD1() { //get the current time; Starttime = millis(); while((millis() -...
  9. A

    [ASK] Compute THD and SNR thru teensy 3.2 board only

    Hi Paul, Thank you for your support and suggestion. For my freq measurement, I'm using pulse count with interrupt method to measure. Please see below my code for the freq and amp detection. // period of pulse accumulation and serial output, milliseconds #define MainPeriod 128 #define...
  10. A

    [ASK] Compute THD and SNR thru teensy 3.2 board only

    Hi all, Currently, I'm using Teensy 3.2 to develop some simple tester to measure freq and Amp(RMS) for speaker and microphone DUT. And I already completed and verified the code fro the freq and amp. Now, I wish to have additional functional test with teensy 3.2 on THD and SNR computation. Do...
  11. A

    [ask]Need to Detect 1kHz tone peak amplitude by just using teensy 3.2 board?

    Hi all, i am newbie on teensy board. Currently, I am using teensy 3.2 to generate 1kHz tone and also able to read back the 1kz freq by connecting a mems mic. But in the mean time, I wish to capture the peak amplitude of the tone together with the freq. Do anyone have ideas how to capture the...
Back
Top