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

Thread: General unsage of the DACs on Teensy 3.5

  1. #1
    Junior Member
    Join Date
    Mar 2019
    Location
    Germany
    Posts
    8

    General unsage of the DACs on Teensy 3.5

    Hi @all,

    my first post and a generally understanding problems.

    My project:
    I want to create a "sample player" which play mp3 files from SD card and send it through the DACs to a 6.5mm jack plug.
    The interface should be 3 buttons (previous track, next track and play) and a rotary potentiometer (volume).
    live onstage the output from the jack plug should connected to mixer.

    My current state:
    I read following sites:
    https://github.com/FrankBoesing/Ardu...ensy-Codec-lib
    https://www.pjrc.com/teensy/gui/index.html
    I tried to combine both auto generated codes to get the chain "playSDmp3" > "amp" (2x --> stereo) > "dacs".

    My Q's:
    1. Is this generally possible to solder the DACs to a stereo jack plug?
    2. Can I use a XLR plug additionally (maybe with a separated circuit?) and can it powered with phantom power?
    3. Can I call the "volume" property on the "dacs"?
    4. Is it better to use a "mixer" instead of the "amps"?

    Many thanks for your help!

    Dinera

  2. #2
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,435
    - The dacs do not support "volume".
    - "amp" is the same as a mixer with one channel.
    - if you really want to use it on stage... I'd buy a audioshield.

  3. #3
    Junior Member
    Join Date
    Mar 2019
    Location
    Germany
    Posts
    8
    Hi Frank,

    thanks for your reply!

    I understand that it is best practice to use the audio board but is it possible to get a signal directly out of the Teensy? It's probable quite quiet. Anyway I will give it a try.
    Will this break out board work? https://www.pjrc.com/store/pt8211_kit.html

  4. #4
    Junior Member
    Join Date
    Mar 2019
    Posts
    12
    I have just been experimenting with the DACs myself the past few days. You can certainly get an audible signal straight out of them, but it won't be strong.

    If you add: "dacs1.analogReference(EXTERNAL);" it will boost it up to 3.3v IIRC.

    It was suggested to me in a post I made a few days ago that a separate amplifier stage should be employed to boost it more. I'm looking into whether an op-amp chip like TL071 is appropriate for this.

  5. #5
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,839
    PJRC sells the PROP shield that has an AMP onboard that works when fed from DAC - not sure if that gives an idea of what is needed? It does not allow for volume adjustment though - except HIGH/LOW when (IIRC?) - the analog reference is changed.

  6. #6
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,299
    A TL071 ist weak-chested and smells the 1980ies. Look into the DRV603 from TI.

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,539
    Quote Originally Posted by Dinera View Post
    1. Is this generally possible to solder the DACs to a stereo jack plug?
    Usually you would place at least a capacitor, to block the 0.6V DC bias.

    The built in DACs have fairly high impedance. Usually an opamp is best, so you get a stronger (lower impedance) output.

    An opamp and a series resistor between the opamp and cable, like 50 or 100 ohms, can also help protect Teensy in case the cable is accidentally plugged into other equipment that drives a strong signal onto the wire. Teensy's DAC pins are not meant to take any abuse. A strong opamp and series resistor lets the resistor sustain the difference in voltage and (hopefully safely) dissipate it as heat.


    2. Can I use a XLR plug additionally (maybe with a separated circuit?) and can it powered with phantom power?
    This would almost certainly need a special circuit, but the details depend on what type of gear is receiving the signal.

    Most gear using phantom power expects a very low voltage & often low impedance audio signal. Teensy's DAC pins give a higher voltage (1.2V peak-to-peak) and higher impedance. Most gear with XLR jacks also wants a balanced or differential signal, and Teensy's DAC is a signal ended signal, so again more work needed to convery.

    Usually phantom power is 48 volts and designed to delivery relatively low current, like a few mA. Teensy needs much lower voltage (5V at VIN or 3.3V for direct power) and much higher current (40 to 80 mA depending on the model and CPU speed), so again you'd need some sort of special power supply to convert. Switching power supplies are notorious for generating noise, which is probably the last thing you want coupled to a cable which connects to a very high gain amplifier meant for the tiny signal from a microphone. You would need very careful design in such a power supply, probably using a fixed frequency chip and one with a PWM-only control circuit that doesn't create sub-harmonics of its switching frequency. Nearly all modern switching power supply chips have special modes for efficiency at low power, which create broadband noise - which is definitely something you'd want to avoid.


    3. Can I call the "volume" property on the "dacs"?
    No, the build in DAC doesn't have volume control.


    4. Is it better to use a "mixer" instead of the "amps"?
    For a single signal, they are essentially the same. The "amp" was added to the audio library and design tool because many people felt inhibited from using the mixer, that it somehow seems wasteful to not use the other inputs just to control the level of a signal.



    Quote Originally Posted by kramer View Post
    If you add: "dacs1.analogReference(EXTERNAL);" it will boost it up to 3.3v IIRC.
    If you care about quality, the best approach is to stay with the 1.2Vp-p default and use an opamp if you need more voltage. The 1.2V range uses a stable internal reference voltage. The 3.3V range uses the 3.3V power as its reference. If there is noise on the 3.3V power line, it can couple into your audio signal. The stable 1.2V reference avoids that problem.


    I'm looking into whether an op-amp chip like TL071 is appropriate for this.
    Yes, using an opamp is usually a good way.

    If you do use an old style opamp like TL071, be careful with those 2 higher voltage supply rails. If you touch +15V or -15V to any pin on Teensy, even for a brief moment, you'll destroy the hardware.

  8. #8
    Junior Member
    Join Date
    Mar 2019
    Location
    Germany
    Posts
    8
    Quote Originally Posted by PaulStoffregen View Post
    This would almost certainly need a special circuit, but the details depend on what type of gear is receiving the signal.

    Most gear using phantom power expects a very low voltage & often low impedance audio signal. Teensy's DAC pins give a higher voltage (1.2V peak-to-peak) and higher impedance. Most gear with XLR jacks also wants a balanced or differential signal, and Teensy's DAC is a signal ended signal, so again more work needed to convery.
    I expected this and it is not an option for me.

    Quote Originally Posted by PaulStoffregen View Post
    If you care about quality, the best approach is to stay with the 1.2Vp-p default and use an opamp if you need more voltage. The 1.2V range uses a stable internal reference voltage. The 3.3V range uses the 3.3V power as its reference. If there is noise on the 3.3V power line, it can couple into your audio signal. The stable 1.2V reference avoids that problem.
    I want to power the Teensy with a rechargeable battery (18600 from an e-cigaret). My little electronic knowledge tells me there shouldn't be a noise, isn't it?


    Quote Originally Posted by PaulStoffregen View Post
    Yes, using an opamp is usually a good way.
    I will search for some information about the opamp.

    Thanks for your replies! Now I have to study the requriements for my project.

  9. #9
    Junior Member
    Join Date
    Mar 2019
    Location
    Germany
    Posts
    8
    Update:
    I've ordered the PROP shield. I guess this is the easiest way. After the research of the opamp I established that audio electronics is too difficult for me at the moment.
    Now I waiting for the delivery and give you a feedback after the installation.

    I've a further general question:
    I don't want to buy a rip-off so, is there a list of European (specially German) Resellers of the Teensy product lines? I didn't find an updated list in the forum.

  10. #10
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,435
    I have good experiences with exp-tech: https://www.exp-tech.de/pjrc/

  11. #11
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,435
    you need a sd-slot. don't use arduino sd slots -usually they are not compatible due to builtin levelshifters.
    and isn't the prop shield mono?

  12. #12
    Junior Member
    Join Date
    Mar 2019
    Location
    Germany
    Posts
    8
    Quote Originally Posted by Frank B View Post
    you need a sd-slot. don't use arduino sd slots -usually they are not compatible due to builtin levelshifters.
    and isn't the prop shield mono?
    But I can use the builtin if I have an seperated level shifter or doesn't it work anyway?

    Quote Originally Posted by Frank B View Post
    I have good experiences with exp-tech: https://www.exp-tech.de/pjrc/
    I've ordered there.

  13. #13
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,435
    Quote Originally Posted by Dinera View Post
    But I can use the builtin if I have an seperated level shifter or doesn't it work anyway?
    oh yes, i see you use the Teensy 3.5

Posting Permissions

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