new audio project

Status
Not open for further replies.

philip.porhammer

Well-known member
i am looking to build a test fixtures for work with a Teency 3.2. I need to check the audio quality of two amps. I would like to generate a .5V RMS 1kHz tone and use the stereo code from the Audio Libs.
1. can I do this without a flash card.

2. the Audio design tool comes up with:#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

// GUItool: begin automatically generated code
AudioInputAnalogStereo adcs2; //xy=119,121
AudioOutputUSB usb1; //xy=339,118
AudioAnalyzeRMS rms3; //xy=360,161
AudioAnalyzeRMS rms4; //xy=383,196
AudioConnection patchCord1(adcs2, 0, rms3, 0);
AudioConnection patchCord2(adcs2, 1, rms4, 0);
// GUItool: end automatically generated code


3. the Pass/Fail output from the Teency will be a string of Serial RGB LEDS, so at this time I am only looking for an RMS measurement of each channel.
4. I am looking to do a one shot measurement and display the results.

how do I can I get an explanation of all the functions for the Audio.h lib?
 
how do I can I get an explanation of all the functions for the Audio.h lib?

I wrote a lengthy tutorial that tries to explain all the audio lib functions. It covers most of the audio library. More features have been added since it was written, but they work in similar ways.

https://www.pjrc.com/store/audio_tutorial_kit.html

Alysia & I made a walkthrough video of the whole thing, so you can see all the steps. Scroll down for the video.

That tutorial PDF is 31 densely packed pages and the video is 48 minutes (edited down from the 17 hours we spent shooting). Three weeks of solid full time work went into that tutorial & video. I hope you can see how impractical "an explanation of all the functions" would be for just a forum message!

About question #1, you can generate sine waves without a SD card. The library has oscillator objects you can use. See part 2-8 starting on page 20, or starting at 25:04 in the video.

About question #4, perhaps you could write code to turn on the oscillator, wait several milliseconds, then start reading those RMS objects. After a few readings, use a library like Adafruit_Neopixel or FastLED to change the LED colors depending on the result.

If you wanted to get really fancy, you could use a 1024 point FFT object. Maybe look at the number in the bins where you expect to see the waveform, and then in all the other bins where you expect to see little or no response. Normally FFT requires window shapes, but this is one of the very few applications where you can (probably) run without a window. Just choose your sine wave frequency to be *exactly* the frequency of one of the FFT bins. For more info about how to use the FFT analysis and what the windows do, look at part 3-2 starting on page 24 or at 34:56 in the video.
 
Normally FFT requires window shapes, but this is one of the very few applications where you can (probably) run without a window. Just choose your sine wave frequency to be *exactly* the frequency of one of the FFT bins.

Paul, you can drop "(probably)"
FFT assumes always exact periodic signals (better, circular continuous).
 
before I go to purchasing, I would like to know if one teency with your audio shield can generate a continuous 3KHz tone and then perform an RMS measurement on the output of the amplifier under test. the PPv is 1.3V. Or, do I need to use one as a audio signal generator and one as volt meter.
thanks
 
Status
Not open for further replies.
Back
Top