Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Teensy Quad Assembly/Testing

  1. #1
    Junior Member
    Join Date
    Aug 2017
    Posts
    3

    Teensy Quad Assembly/Testing

    I am working on my Teensy Quad Audio Output project, and I have completed my build with two Teensy Audio Shields (sticking with Teensy 3.2 version for this first iteration). I followed the instructions at SparkFun, making a point to adhere to the corrected notes in the comments. And now I have a couple of questions.

    First, concerning the three pads that select the I2C on the shields. I notice that when I cut the trace between the center pad and the right pad, I can still get electrical continuity between those two pads. A continuity check comes back positive, even though I can clearly see through magnification that the connecting trace has been removed. Is this appropriate?

    Second, would there be any existing sketch, or any circuit test points and instructions, that might be useful to confirm that the assembly is properly built and prepared to work correctly before attempting to use it?

    (Obviously, I wouldn't be asking these questions if the assembly just worked right away. I found a missing bracket in the sample sketch I found online, but the more important thing is that I am getting an audio buzz out to my speakers simply by connecting, before I even try to do anything. This is an alarm that I have something crossed up and I need to track that down.)

    Please advise,

    Thanks,

    S

  2. #2
    Junior Member
    Join Date
    Aug 2017
    Posts
    3
    UPDATE: I did find the pass-through quad test sketch and have ordered some parts that I will add to make that happen. So maybe that will help me with the hardware testing of my assembly. I still would like to know why I have continuity between pads even after cutting the trace.

    Then, I do notice that there are some significant differences in the Teensy sketch code exported by the online Audio System Design Tool:
    // GUItool: begin automatically generated code
    AudioInputI2SQuad i2s_quad1; //xy=332,194
    AudioOutputI2SQuad i2s_quad2; //xy=571.0000076293945,195.00000381469727
    AudioConnection patchCord1(i2s_quad1, 0, i2s_quad2, 0);
    AudioConnection patchCord2(i2s_quad1, 1, i2s_quad2, 1);
    AudioConnection patchCord3(i2s_quad1, 2, i2s_quad2, 2);
    AudioConnection patchCord4(i2s_quad1, 3, i2s_quad2, 3);
    AudioControlSGTL5000 sgtl5000_1; //xy=343,298
    AudioControlSGTL5000 sgtl5000_2; //xy=560.0000076293945,297.0000047683716
    // GUItool: end automatically generated code


    And Paul Stoffregen's quad audio sample code I found here:
    AudioPlaySdWav playSdWav1;
    AudioPlaySdWav playSdWav2;
    AudioOutputI2SQuad audioOutput;
    AudioConnection patchCord1(playSdWav1, 0, audioOutput, 0);
    AudioConnection patchCord2(playSdWav1, 1, audioOutput, 1);
    AudioConnection patchCord3(playSdWav2, 0, audioOutput, 2);
    AudioConnection patchCord4(playSdWav2, 1, audioOutput, 3);
    AudioControlSGTL5000 sgtl5000_1;
    AudioControlSGTL5000 sgtl5000_2;


    Besides the difference in port numbering for the audio connections (0,1,2,3 versus 0,1,0,1), the call "AudioInputI2SQuad" in the exported code from the Design Tool results in the errors:
    'class AudioInputI2SQuad' has no member named 'isPlaying'
    and
    'class AudioInputI2SQuad' has no member named 'play'
    I thought that this might be because the audio library folder was not in the correct location on my laptop, but that turned out not to be the case.

    As it is, my status is that I can hear (through my headphones) the assembly 'click' as it reboots, and then faintly hear some white noise (with the volume level set to 0.8), but cannot actually play any WAV files that are on either SD card.

    Thanks to anyone who may be able to help,

    S

  3. #3
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    1,153
    In Paul’s example, the audio source is not a I2S input, but two wav player from SD objects, which have the play() and isPlaying() methods. Each of these has two outputs numbered respectively 0 and 1 which are connected to the 4 inputs (numbered from 0 to3) of the quad I2S output.

    Your sketch has no wav players as an audio source but a quad I2S input. Since this one plays alone as soon as I2S data arrives, it does not need a play method.

    In order to better understand the different audio library objects and the way how they are connected and how they interact together, you really should at least read the descriptions of these objects in the right sidebar of the audio design tool.

    You should not simply tinker something the together without understanding what happens behind the scenes. Reading some online documentation and going through the various example sketches systematically from the simplest to the more difficult until you understand everything is IMNSHFO the absolute minimum required.

  4. #4
    Junior Member
    Join Date
    Aug 2017
    Posts
    3
    Thank you for the info.

    For the record, the wall that I hit did prompt me to go back and make a bunch of purchases last night (some right here out of the PJRC store) so that I can recreate the Teensy Tutorial Labs from the Hackaday Supercon workshop back in 2015. I realized on my own that I should work my way up from a single Audio Shield and 2 channels and work with Teensy a lot more if I hope to achieve my ultimate end goal, which aligns precisely with your recommendation.

    Also, I do read the online documentation within the Design Tool AND I have done a lot of forensic work backtracking through a lot of old blog entries and quad tutorials to try and come up to speed (including getting some errors on the SparkFun tutorial corrected), but I do have my limits concerning comprehension as I do not have a degree in audio engineering. (Also, for my application I don't have use for many functions [Signal Processing, equalizer controls] so it does take time to filter through the documentation to get at what I am looking for, which is ongoing even as I post my questions here.)


    - S

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •