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

Thread: ** HOW TO**Audio lib tutorial without using an audio shield

  1. #1

    ** HOW TO**Audio lib tutorial without using an audio shield

    Hello everyone,

    I am a novice when it comes to micro controllers and electronics. I have a computer engineering background and studying HCI and design.

    I am currently working on a Teensy3.6 and trying to make a wearable device that would help people who are DHH.

    I was working on my project and it was brought to my attention that in order to work on audio I should go through audio lib tutorial.
    I have seen a part of the original video and went through the documents.
    Can they be one without an audio shield?
    what are the things I might need to know for my project?

    I am planning to use 4 microphones connected to a Teensy3.6 to collect data from the surrounding environment. This audio will then be processed and certain outliers in surrounding sound, lets call them sound events will be identifies and notified to the user. The user would be notified about the direction of the sound event.

  2. #2

  3. #3
    Senior Member KurtE's Avatar
    Join Date
    Jan 2014
    Others can answer this better than I can. But you can I believe do a lot of the examples using the DAC pins of the T3.6.

    There are examples up there that do this. You can see information about supported hardware up on the main audio library page:

    However to use the DAC you will need some form of amplification. An example board that does this is the propshield (
    I have done it with a different amplifier chip on some of my own boards.

  4. #4
    Quote Originally Posted by KurtE View Post
    However to use the DAC you will need some form of amplification.
    The DACs will drive earbuds without amplification. Probably best to AC couple. Amplified speakers (like for PC) also work.

  5. #5
    Senior Member defragster's Avatar
    Join Date
    Feb 2015
    Reading Chip's blog the first question to the posted link was similar and the reply was:
    ChipNovember 22, 2016 at 4:29 AM
    The audio board is needed to convert the microphone signal into a digital signal that can be processed by the Teensy 3.6 (this is the ADC portion of the audio board). Once the processing is completed, the audio board coverts the digital signal back to an analog signal that drives the headphones (this is the DAC portion of the audio board).

    The Teensy 3.6 does have its own ADCs and DACs, but they are much inferior to the ones on the audio board. So, in a strict sense, you do NOT need the audio board. But, to make it sound acceptable, you will want the audio board.


  6. #6
    Senior Member manitou's Avatar
    Join Date
    Jan 2013
    Quote Originally Posted by gfvalvo View Post
    The DACs will drive earbuds without amplification.
    Careful, teensy DAC is only rated at 1ma, so Paul does not recommend using DAC to directly drive earbuds. see

  7. #7
    That's kind of odd. In the thread Paul mentioned that he got "a tiny bit of audible output" when he connected earbuds to the DAC. When I did it, I got output that was clearly audible even with the buds out of my ears and sitting on the table.

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    The DAC pin isn't meant to directly drive headphones. Doing so is way outside its specs, but it seems to not actually damage Teensy doing this.

    When doing the tutorials, you can try to just put the dac object into your design, rather than the i2s one. Also delete the SGTL5000 object and any code which uses it, since you don't actually have that chip connected.

    Part 1 of the tutorial, before you start using the design tool, is all coded for i2s. Probably best to just watch part 1 in the video and skip immediately to part 2 for actually doing the tutorial.

    Several parts of the tutorial use the microphone input. To do those without the shield, you'll need to substitute a mic with amplifier and connect it to an ADC pin. Then use the adc object. Keep in mind the ADC object needs about a 1 Vp-p signal, so the tiny voltage directly from a mic won't work. You need an amplifier. Also pay attention to the documentation in the design tool for the adc object, especially the recommended circuit for 0.6Vdc bias. If things are working, use a DC voltmeter to check the ADC pin really is at 0.6V DC.

    There's a part in the tutorial about setting the mic gain. Obviously if you don't have the shield with software programmable mic gain, you'll have to do the same with adjusting the gain of whatever amplifier you're using on the mic to get it up to approx 1Vp-p signal level.

    If you read part 2, or watch the video, you'll see it's all about using the design tool to create different audio projects. It's meant to be a very flexible system. You can easily substitute the dac and adc object for the i2s one. But only put 1 of each adc or dac into your design. The design tool does not yet enforce legal combinations... it will allow you to put 2 copies of an object which uses the same physical hardware, which obviously can't work. Use common sense, read and pay close attention to the design tool's documentation for the objects you're actually using, and no matter what you do, when you get stuck and ask for help here, follow the Forum Rule. Don't just say "it's not working". Always show what you really did, which means complete code posted, and sometimes even a photo of how you connected stuff.

Posting Permissions

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