Author Topic: Getting Earphone out  (Read 2301 times)

0 Members and 2 Guests are viewing this topic.

Offline Diyaudio_enthusiastTopic starter

  • Contributor
  • Posts: 12
  • Country: lk
Getting Earphone out
« on: August 13, 2019, 04:51:43 pm »
Hi All,

I've made an arduino based audio spectrum analyzer & it requires audio input from a music player/laptop/phone earphone out.
I've tested this with earphone out from my audio player (yamaha mcr-b142) & it worked fine.Sadly when I connect earphone out to arduino, sound stops coming from speakers.But I want to listen to audio from music player while the signal goes to arduino. I understand this is the nature of the earphone out. So I tried to get output from speaker outs.
But the amplifier (Yda164) has differential outs & I'm confused about getting a single ended output from that.
What I want is to get a earphone out level signal from the music player.
Please assist me as I've spent so many hours to reach thus far.
Let me know If the information is unclear.
I've attached schematic of earphone out + music player micro controller pin description regarding earphone out.
I learned lot of things through this project
Thanks all
 

Offline LeoTech

  • Regular Contributor
  • *
  • Posts: 75
  • Country: dk
  • High School student with a passion for electronics
Re: Getting Earphone out
« Reply #1 on: August 15, 2019, 01:36:07 pm »
Hello,

The first problem would be to actually split the speaker output without affecting the speakers themselves. This could probably be done with a high input impedance buffer.
The buffer should preferably be a differential input type. That would solve two problems with one chip. The output would then be single ended, and if you were to do this for both channels, you would have a single ended output for the R and L channel.

After that you would need a second stage - op amp based - to match the impedance and voltage level of the headphone signal.

Just remember, that by adding all this extra circuitry you will also introduce a lot of noise and the frequency response. Try and keep the added noise minimal and a flat frequency response to not change the signal you want to measure. 

I hope it helps,

Leo
High School student with a passion and interest in electronics, both analog and digital!
 
The following users thanked this post: Diyaudio_enthusiast

Offline Diyaudio_enthusiastTopic starter

  • Contributor
  • Posts: 12
  • Country: lk
Re: Getting Earphone out
« Reply #2 on: August 17, 2019, 10:52:02 am »
Thanks leo

I think you are referring to this method



1st step - making differential output to single ended
2nd step - making single ended output into a dc signal that moves between 0-5v for arduino adc.

I've already found out a working solution for 2nd step. My concern is step 1
I've read about diff. to single ended conversion & thinking of using isolation transformer with resistors.
Found out an example for 75W speaker output connected to 8ohm. But I'm not able to find right values for my application. (15W into 6ohm speakers) . Please assist to find correct values if possible. Many Thanks


 

Offline LeoTech

  • Regular Contributor
  • *
  • Posts: 75
  • Country: dk
  • High School student with a passion for electronics
Re: Getting Earphone out
« Reply #3 on: August 19, 2019, 01:33:50 pm »
Thanks leo

I think you are referring to this method

You are welcome, and yes I was indeed referring to that principle, although the output isn't actually shown in the circuit diagram - I might question the source.

2nd step - making single ended output into a dc signal that moves between 0-5v for arduino adc.
This is incorrect, although you probably meant it correctly.
The output will be converted into single ended, but that doesn't mean that it is a dc signal. The signal is still an ac, but the reference point is now ground instead of 'floating' - insanely simplified.

As far as the transformer goes, I have no clue, unfortunately. :'(

I am hope somebody more experienced will join in,

Leo

PS: I will try and think about it again, but I know to little about differential signals to make a sound statement - no pun intended.
But if you have any other questions, I might be able to help.

High School student with a passion and interest in electronics, both analog and digital!
 
The following users thanked this post: Diyaudio_enthusiast

Offline Diyaudio_enthusiastTopic starter

  • Contributor
  • Posts: 12
  • Country: lk
Re: Getting Earphone out
« Reply #4 on: August 24, 2019, 10:31:35 am »
output of the circuit is pin 1 of IC U2:A
This is the source for this circuit

https://circuitdigest.com/electronic-circuits/instrumentation-amplifier-circuit-using-op-amp

I came up with a rough sketch of the circuit, I'm planning to build
Will build this, once the transformer arrived
Appreciate your help!

 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9201
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Getting Earphone out
« Reply #5 on: August 24, 2019, 01:56:42 pm »
Speaker to line level converters are common in car audio, keep in mind it might be necessary to remove the load resistor on some of them. (The ones designed to connect in parallel with existing speakers shouldn't need it.) Might be cheaper than buying transformers on their own.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 
The following users thanked this post: Diyaudio_enthusiast

Offline Audioguru again

  • Regular Contributor
  • *
  • Posts: 115
  • Country: ca
Re: Getting Earphone out
« Reply #6 on: August 24, 2019, 03:02:05 pm »
The LM358 opamps have inputs that are not biased so they will not work. LM358 opamps are never used for audio anyway because they produce crossover distortion and are noisy (hiss).
The Yda164 audio amplifier has bridged outputs which make the differential. Then simply use one speaker output wire with a series DC-blocking capacitor and a ground wire from the amplifier circuit to make your single-ended output from each channel. To feed headphones then it will need an attenuator made with two resistors for each earphone.
 
The following users thanked this post: Diyaudio_enthusiast

Offline Diyaudio_enthusiastTopic starter

  • Contributor
  • Posts: 12
  • Country: lk
Re: Getting Earphone out
« Reply #7 on: August 27, 2019, 10:52:10 am »
Speaker to line level converters are common in car audio, keep in mind it might be necessary to remove the load resistor on some of them. (The ones designed to connect in parallel with existing speakers shouldn't need it.) Might be cheaper than buying transformers on their own.

I've such converter bought from ebay (cheap one). Can this be used for differential signals? Also I assume transformers provide isolation from high input signals reaching arduino. Thanks
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9201
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Getting Earphone out
« Reply #8 on: August 27, 2019, 01:09:00 pm »
I've such converter bought from ebay (cheap one). Can this be used for differential signals? Also I assume transformers provide isolation from high input signals reaching arduino. Thanks
Differential drive is very common in modern audio equipment (removes need for negative rail) and the purpose of the transformer is to allow it to work with either single ended or differential input.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 
The following users thanked this post: Diyaudio_enthusiast

Offline Diyaudio_enthusiastTopic starter

  • Contributor
  • Posts: 12
  • Country: lk
Re: Getting Earphone out
« Reply #9 on: August 27, 2019, 01:39:31 pm »
The LM358 opamps have inputs that are not biased so they will not work. LM358 opamps are never used for audio anyway because they produce crossover distortion and are noisy (hiss).
The Yda164 audio amplifier has bridged outputs which make the differential. Then simply use one speaker output wire with a series DC-blocking capacitor and a ground wire from the amplifier circuit to make your single-ended output from each channel. To feed headphones then it will need an attenuator made with two resistors for each earphone.

I wont be using LM358. I'm planning to use MCP602 rail-to-rail opamp if I'm going through that path.
Idea is to use resistor + transformer combination instead of op-amps to protect arduino.
your idea regarding the rough schematic I attached in an earlier post?
Any risk of taking an output from speaker output in long-term?
Thank you.




 

Offline Diyaudio_enthusiastTopic starter

  • Contributor
  • Posts: 12
  • Country: lk
Re: Getting Earphone out
« Reply #10 on: August 31, 2019, 06:45:26 am »
I've such converter bought from ebay (cheap one). Can this be used for differential signals? Also I assume transformers provide isolation from high input signals reaching arduino. Thanks
Differential drive is very common in modern audio equipment (removes need for negative rail) and the purpose of the transformer is to allow it to work with either single ended or differential input.

I've made the circuit as per the above mentioned schematic (resistor attenuator  + audio transformer).
your views regarding that circuit? Will it be able to work long term without damaging arduino or amplifier?
Thank you.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9201
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Getting Earphone out
« Reply #11 on: August 31, 2019, 12:35:38 pm »
That should work, but you might need to play with the resistor values to get the desired signal level.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf