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

Thread: Project viability

  1. #1
    Junior Member
    Join Date
    Sep 2017
    Posts
    2

    Project viability

    Hi,

    I would like to ask about the viability of a project. The requirements of the project are the followin:

    * sample an audio signal with a bandwith of 2 KHZ (so the sample frequency must be at least 8 KHZ or higher if possible)
    * play the audio signal acquired in real time to headphones and transmit it by uart to a bluetooth module
    * record the signal to an audio file (preferable) or a csv file.

    Can be used the TEENSY 3.2 and the TEENSY AUDIO BOARD for this project?
    Could you sugest me similar projects as guide ?

    Thanks in advanced,

    Andrés.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,709
    In Arduino, select Teensy from the Tools > Boards menu. You can install Teensyduino even if you don't yet have a Teensy. Arduino updates the Examples menu based on the selected board, so select Teensy 3.2 first.

    Then open File > Examples > Audio > Recorder.

    Hopefully that will give you most of what you need.

    You might also add a low-pass filter before the queue object, to limit the signal to only 2 kHz bandwidth. Then you could throw away 3 of every 4 samples, to end up with a slower data rate which could be send over serial.

  3. #3
    Junior Member
    Join Date
    Sep 2017
    Posts
    2

    Project viability

    Hi Paul, thanks for your answer.

    I would like to ask you: Why do you say "throw away 3 of every 4 samples" ? What is the highest speed achived by the uart of the teensy?

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,709
    You said you wanted a lower sample rate. The audio library gives 44.1 kHz sample rate. To get lower, you must first use a low pass filter (which the audio library provides), and then you can get access to the fast sample and simply discard the ones you don't want. Hopefully that makes sense?

  5. #5
    Senior Member
    Join Date
    Mar 2013
    Posts
    599
    Quote Originally Posted by Andres View Post
    Hi Paul, thanks for your answer.

    I would like to ask you: Why do you say "throw away 3 of every 4 samples" ? What is the highest speed achived by the uart of the teensy?
    I cant really say what the continuous data rate is but I run a Teensy 3.2 Serial at 6Mhz for a project over 20 feet of Cat5 using RS485 transceivers.

Posting Permissions

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