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

Thread: Usb output to a speaker

  1. #1

    Usb output to a speaker

    hello,
    I wonder what happened if i connect a speaker to a Teensy set with audio setting from the arduino IDE?
    Thank you

  2. #2
    Senior Member
    Join Date
    Apr 2013
    Posts
    1,938
    If you want to connect a USB audio out device to a Teensy programed as USB Audio, no. Both devices need a USB host to function. Teensy 3.6 can be a USB host but don't believe there is an Audio driver for it.

  3. #3
    Senior Member Davidelvig's Avatar
    Join Date
    Aug 2015
    Location
    Wisconsin
    Posts
    334
    Teensy can create audio outputs in a number of ways.
    - USB Audio... set using the IDE for the USB type setting... but this would only be to a USB host, as GremlinWrsngler notes. USB speakers are peripherals, not hosts. Teensy, in this case, is also a peripheral.
    - Audio Shield (additional board from PJRC) through its headphone jack or line-out pins
    - DAC pin on the Teensy (I've not done this one)
    The Audio Library encapsulates all of these.

    Can you say more about the speaker type(s) you're thinking of, and what inputs they have?
    Last edited by Davidelvig; 08-13-2017 at 05:47 AM.

  4. #4
    Member
    Join Date
    Jan 2017
    Location
    Pella, Iowa, USA
    Posts
    87
    Quote Originally Posted by Ced_Sylvain_&_cie View Post
    hello,
    I wonder what happened if i connect a speaker to a Teensy set with audio setting from the arduino IDE?
    Thank you
    With an amplifier between the Teensy pin and the speaker, correct?!? I can recommend the Audio Adapter board, using the Line Out pins to an audio amplifier.

  5. #5
    Ok, I've read the paper.
    I tried to make the DAC option. That work fine. Something to know is that output have an DC offset- it's written on the GUI audio interface- an 10F capacitor is recommanded. There is also an indication about the output voltage. As it's a low value, it's possible to connect a lm386 amplifier.
    just remember to protect the teensy against Vcc Aop (red wires, black wires or diods) and put the 10 microF behind the DAC output.

  6. #6
    Quote Originally Posted by Davidelvig View Post
    Can you say more about the speaker type(s) you're thinking of, and what inputs they have?


    The speakers I mean have an usb connection and jack.
    their usb connection are peripherals as sayed Davidelvig so they only work linked with computers or a tab.
    I can intend to make a loopback between player and recorder but I prefer audio jack directly plugged in the speaker.

    Thank you for answering to my question, I am grateful
    Last edited by Ced_Sylvain_&_cie; 08-14-2017 at 04:30 PM.

  7. #7
    Senior Member
    Join Date
    Dec 2014
    Posts
    311
    You cannot connect a speaker directly to the teensy; the speaker draws too much current. You need an amplifier between the Teensy and the speaker.
    For example: http://amzn.to/2vUztfA
    You can then run a sketch that says "audio out" and uses the USB data input to feed to the DAC, and it will seem to your computer as if it is a "sound card" that you can choose to play music or whatever out through.
    I've done it, it works.

Posting Permissions

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