Hello everyone,
thank you very much for reading and looking at this post!
I'm working on a new project and outputting to my teensy 3.2's DAC, which is working great! The project is mostly outputting filtered noise, so It's not really critical that the quality is super good or that the signal is stereo (I can send it to L/R later on if need be I suspect.
I'm now at the phase of my project where I'm starting to think about how this output is going to be used. I have some knowledge here, enough to get myself into trouble, but not enough to really know fully what's going on.
I'm planning on having 2 outputs for my device which can be selected via a switch – headphones/line-out & a small speaker.
I'll address these independently below as they are really 2 distinct issues.
Headphones/Line-out:
Currently I've tried 3 things.
1. First is driving the headphones (and line-out to bluetooth speaker) straight off the DAC, this works, but from some other threads I've read that this is a bad idea because it is overloading the DAC pin and could cause issues with the hardware
which lead me to:
2. The CMOY headphone amp (Schematic) Which I'm currently running with 1/2 of a LME49720 from +9/-9 V. I assume I could run the other 1/2 from the same DAC input to make a duplication of the signal for stereo output.
This works, and is extremely loud (the schematic's gain is set at 11 with R3 = 1KΩ & R4 = 10KΩ ....) I reduced this down so R3 & R4 = 1KΩ giving a gain of 2 which is much more reasonable.
So my first question is – Is this a reasonable solution? or am I missing something here?
I'd rather not move to a split power supply from the USB's +5v if I don't have to, but if I do I can use a regulator to make it work...
3. I also had a LM4808 lying around from a past project so I thought I'd give that a go
It was behaving really unexpectedly. when I tried to set the gain using the Rf and Ri thing seemed totally backwards and ultimately, just running them both with jumpers 0Ω ended up giving the best results, although it sounded a bit off and was still pretty quiet. I'm really confused as to why the gain resistors here would cause such a issue. Using low Ω's seemed to work the best, but when I tried what I used in a previous project Rf @ 100KΩ and Ri @ 10KΩ for gain of 10, I was met with silence!
I'm suspecting that this could be because the input voltage is rated for -0.3V to VDD+0.3V which if the DAC is running 1.33V peak to peak, means that the bottom 1/2 of the signal is effectively getting chopped off. Is that right? I'm really not sure about this.
In summary, Are either of options 2 or 3 worth continuing or better than the other or should I be looking elsewhere entirely?
Do I need to be doing something between the DAC and either of these options to further tame the signal for the specific chip's application?
Is there a standard or resource that I could be pointed towards on the proper way to do this!?
Small Speaker!
For running speakers I've tried one thing and have a second option on the way to try hopefully tonight:
1. I've been running this PAM8302A module from Adafruit directly from the DAC pins, from what I can tell this works fine. Although, admittedly, the speakers are tiny and it's hard to really tell what's going on.
Are there any issues with this approach I should be considering?
2. For a little more power I've got a PAM8406 module & PAM8610 Module incoming.
I'm hoping the 8406 is powerful enough and again +5v so it could theoretically run off USB power which would be ideal, but not necessarily a deal breaker. I'm assuming that these are going to be basically the same as the 8302, so I'm mostly just wondering if there are any issues with the DAC -> Module approach.
Thank you very much for looking and thinking about this with me! I've included below a diagram of what I imagine the output stage would look like and would appreciate any and all feedback.
thank you very much for reading and looking at this post!
I'm working on a new project and outputting to my teensy 3.2's DAC, which is working great! The project is mostly outputting filtered noise, so It's not really critical that the quality is super good or that the signal is stereo (I can send it to L/R later on if need be I suspect.
I'm now at the phase of my project where I'm starting to think about how this output is going to be used. I have some knowledge here, enough to get myself into trouble, but not enough to really know fully what's going on.
I'm planning on having 2 outputs for my device which can be selected via a switch – headphones/line-out & a small speaker.
I'll address these independently below as they are really 2 distinct issues.
Headphones/Line-out:
Currently I've tried 3 things.
1. First is driving the headphones (and line-out to bluetooth speaker) straight off the DAC, this works, but from some other threads I've read that this is a bad idea because it is overloading the DAC pin and could cause issues with the hardware
which lead me to:
2. The CMOY headphone amp (Schematic) Which I'm currently running with 1/2 of a LME49720 from +9/-9 V. I assume I could run the other 1/2 from the same DAC input to make a duplication of the signal for stereo output.
This works, and is extremely loud (the schematic's gain is set at 11 with R3 = 1KΩ & R4 = 10KΩ ....) I reduced this down so R3 & R4 = 1KΩ giving a gain of 2 which is much more reasonable.
So my first question is – Is this a reasonable solution? or am I missing something here?
I'd rather not move to a split power supply from the USB's +5v if I don't have to, but if I do I can use a regulator to make it work...
3. I also had a LM4808 lying around from a past project so I thought I'd give that a go
It was behaving really unexpectedly. when I tried to set the gain using the Rf and Ri thing seemed totally backwards and ultimately, just running them both with jumpers 0Ω ended up giving the best results, although it sounded a bit off and was still pretty quiet. I'm really confused as to why the gain resistors here would cause such a issue. Using low Ω's seemed to work the best, but when I tried what I used in a previous project Rf @ 100KΩ and Ri @ 10KΩ for gain of 10, I was met with silence!
I'm suspecting that this could be because the input voltage is rated for -0.3V to VDD+0.3V which if the DAC is running 1.33V peak to peak, means that the bottom 1/2 of the signal is effectively getting chopped off. Is that right? I'm really not sure about this.
In summary, Are either of options 2 or 3 worth continuing or better than the other or should I be looking elsewhere entirely?
Do I need to be doing something between the DAC and either of these options to further tame the signal for the specific chip's application?
Is there a standard or resource that I could be pointed towards on the proper way to do this!?
Small Speaker!
For running speakers I've tried one thing and have a second option on the way to try hopefully tonight:
1. I've been running this PAM8302A module from Adafruit directly from the DAC pins, from what I can tell this works fine. Although, admittedly, the speakers are tiny and it's hard to really tell what's going on.
Are there any issues with this approach I should be considering?
2. For a little more power I've got a PAM8406 module & PAM8610 Module incoming.
I'm hoping the 8406 is powerful enough and again +5v so it could theoretically run off USB power which would be ideal, but not necessarily a deal breaker. I'm assuming that these are going to be basically the same as the 8302, so I'm mostly just wondering if there are any issues with the DAC -> Module approach.
Thank you very much for looking and thinking about this with me! I've included below a diagram of what I imagine the output stage would look like and would appreciate any and all feedback.