TRSS Breakout

hello guys, i'm having some doubts and some problems, first i wanted to do this breakout to be able to read the signal input on an arduino eg: how am i going to use the input trrs i wanted to put a song to play on my cell phone for example, and read this signal input on the arduino. in my project the tip input is connected to the A0 input, but it is oscillating without even me connecting the cable, I would like to know how to act on that point, what they recommend, or how to do it

hello guys, i’m having some doubts and some problems, first i wanted to do this breakout to be able to read the signal input on an arduino eg: how am i going to use the input trrs i wanted to put a song to play on my cell phone for example, and read this signal input on the arduino. in my project the tip input is connected to the A0 input, but it is oscillating without even me connecting the cable, I would like to know how to act on that point, what they recommend, or how to do it

You don't provide much information, like the sketch and a wiring diagram. Off the top of my head, I would point out that A0 measures 0V to Vcc (depending on the board), and you are sending it an AC signal, likely at 1V P-P.

But without more details, I am just guessing.

There are a couple of considerations -

The Arduino input shouldn't be "floating". It should be pulled-up, pulled-down, or in the case of audio it should normally be biased at about 2.5V so the audio signal can swing positive and negative around the bias.

Audio signals are AC (they go positive and negative). The Arduino can't read the negative half of the waveform and it can actually be damaged by negative voltages.

There is a bias circuit at the bottom of [u]this post[/u].

With the bias and silence (or no connection) should read about 512. You can subtract-out the bias in software if you wish.

in my project the tip input is connected to the A0 input,

Don't forget to connect the grounds.

and read this signal input on the arduino.

You may know this already but since you are sampling a wave your readings will "look random", even with a constant tone. But, you will get bigger deviations from the bias with louder sounds.

I've merged/deleted your cross-posts @WendelTytan.

Cross-posting is against the rules of the forum. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend 15 minutes (or more) writing a detailed answer on this topic, without knowing that someone else already did the same in the other topic.

Repeated cross-posting will result in a suspension from the forum.

In the future, please take some time to pick the forum board that best suits the topic of your question and then only post once to that forum board. This is basic forum etiquette, as explained in the sticky "How to use this forum - please read." post you will find at the top of every forum board. It contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

@pert

sorry, I didn’t know that in many forums it would be considered duplicate, my sincere apologies

SteveMann:
You don’t provide much information

xD my bad, in the attachment I will leave the demonstration of how I set up the scheme

DVDdoug:
The Arduino input shouldn’t be “floating”. It should be pulled-up, pulled-down, or in the case of audio it should normally be biased at about 2.5V so the audio signal can swing positive and negative around the bias.

huuummm… I wanted to use the oscillation exactly to be able to create some loops in the program

DVDdoug:
Audio signals are AC (they go positive and negative). The Arduino can’t read the negative half of the waveform and it can actually be damaged by negative voltages.

oh…

DVDdoug:
There is a bias circuit at the bottom of [u]this post[/u].

I had seen your scheme, but I had searched the internet and found this one with the diode, and talking to my electricity teacher “don’t blame her, she is not an expert in creating xD projects” we came to the conclusion that maybe, the diode it would be the safest to assemble, that’s what I as a layman thought, but even so, I don’t see any changes in the entrance beyond the noise that the entrance gives

of course, I have the pieces you used in the “since I bought it at the time thinking about yours too” scheme to see, I was just frustrated and abstracted, and I was thinking about other problems

DVDdoug:
You may know this already but since you are sampling a wave your readings will “look random”, even with a constant tone. But, you will get bigger deviations from the bias with louder sounds.

yes, so i thought i had some other problem besides imput

Screenshot_12.png

There is a way to use a diode. Take a look at the 2nd schematic [u]here[/u].

D3 is for excess positive voltage so you can leave that one out.

Resistor R1 should be between 1K & 10K for audio signals. (With a line-level signal use 10K. 1K is fine with headphone signal.)

If the input floats-up with no signal, put a resistor to ground on the input (the output of your phone). Almost any resistor value is OK (1K -100K). Again, 10K or more if you have a line-level signal.)

Ideally, the diode should be a Schottky diode. There are already "small" protection diodes inside the ATmega chip. Schottky diodes have lower forward voltage than standard silicon diodes so that insures that all of the current goes through the external Schottky. Or if R1 is 10K Ohms, the internal diode alone would be OK. and you could just skip the external diode.

That circuit will "kill" the negative half of the signal. That's fine if you just need amplitude because the negative & positive halves are virtually identical. But it distorts the signal into the Arduino so you can't use FFT or any kind of frequency analysis, etc.

There is actually an advantage to the protection diode method (compared to the bias method). If the signal voltage is low, you can switch to the optional 1.1V analog reference for more sensitivity and more resolution.

The very big problem here is that you have not said what you want to do with this audio signal once it is in the Arduino.

Knowing that we could tell you what sort of interface you need and whether this is practical.

The pinout for a TRRS connector from a phone is NOT normally sleeve=ground as you might think.

You need to read up on the various standards, modern phones are usually CTIA

https://en.wikipedia.org/wiki/Phone_connector_(audio)#PDAs_and_mobile_phones

You can get CTIA -> TRS adaptor cables if you're not interest in the microphone signal.

OK, let's see.

modulo-trrs-35mm-jack-breakout-para-plug-p2.jpg

Grumpy_Mike: The very big problem here is that you have not said what you want to do with this audio signal once it is in the Arduino.

Knowing that we could tell you what sort of interface you need and whether this is practical.

the idea of my project is to take the input to make a variation on a led strip (at the moment it's just a rgb led) for example: if the input is 100, the led will light up: (106.90,205). if the input is 120, the led will light up: (72,61,139). if the input is 150, the led will light up: (25,25,112).

the idea would be to technically transform the music into colors based on the scale and loop that I created oscillating in real time or with the shortest delay possible

DVDdoug: There is a way to use a diode. Take a look at the 2nd schematic here.

D3 is for excess positive voltage so you can leave that one out.

Resistor R1 should be between 1K & 10K for audio signals. (With a line-level signal use 10K. 1K is fine with headphone signal.)

I will mount it here later to test, interesting :)

DVDdoug: Ideally, the diode should be a Schottky diode. There are already "small" protection diodes inside the ATmega chip. Schottky diodes have lower forward voltage than standard silicon diodes so that insures that all of the current goes through the external Schottky. Or if R1 is 10K Ohms, the internal diode alone would be OK. and you could just skip the external diode.

I didn’t take into account that the Arduino itself would have protection systems, my bad. Schottky diode, I don't have :s, I will have to order if it is extremely necessary :s

DVDdoug: That circuit will "kill" the negative half of the signal

killing half the negative wave, it was one of my setbacks while I was thinking about the project, but even so I tried to do it with the diode see the diagram without caring about it because I wanted to see some result first, then I thought of another possibility, but at this point, it seems that if I assemble correctly it will have to be like this

MarkT: The pinout for a TRRS connector from a phone is NOT normally sleeve=ground as you might think.

You need to read up on the various standards, modern phones are usually CTIA

https://en.wikipedia.org/wiki/Phone_connector_(audio)#PDAs_and_mobile_phones

You can get CTIA -> TRS adaptor cables if you're not interest in the microphone signal.

my phone and my pc are: motorola / lenovo, so i used the omtp pattern, because there it is saying that it is the motorola pattern, and on the website i bought the part, so i did as i had seen, now i don't know kkkk i have to use the standard as android then?

//

it's already the second time that i write this post, so if there are mistakes it's because i hurried xD

the idea of my project is to take the input to make a variation on a led strip (at the moment it's just a rgb led) for example: if the input is 100, the led will light up:

So you are saying the colours follow the amplitude of the input. Then in that case the circuit in reply #5 would be a good start, providing you correctly place the 100K resistor, which should be across the capacitor not totally disconnected from anything else in the circuit. What you have there is called an envelope follower.

I understand, I think it’s according to the image I’m sending, confirm me if that’s right.

if it is, i still have the same problems since there is noise, but okay, but if it wasn’t that i’m not seeing anything at the entrance :c

Screenshot_15.png

Yes that is better. However the 100K resistor seems to have changed to a 220R resistor.

i still have the same problems since there is noise,

This is normally caused by the ground not making contact in the circuit. The arrangement of solderless bread board is notorious for things not actually having the wiring you think you have.

This is especially true of the connections to any break out board.

Hi, Welcome to the forum.

Have you googled;

arduino music light show

There are numerous examples of what you want to do.

Tom... :)

Grumpy_Mike:
Yes that is better. However the 100K resistor seems to have changed to a 220R resistor.
This is normally caused by the ground not making contact in the circuit. The arrangement of solderless bread board is notorious for things not actually having the wiring you think you have.

This is especially true of the connections to any break out board.

kkk I didn’t even notice, sorry, but in the project there is a 100k one, as follows the photo

the problem of quiet noise I can solve through some extrapolating code, in fact it decreased a lot with the recommended assembled system, but … the problem is that I don’t see anything at the entrance, as if I wasn’t receiving a phone signal through from p2

TomGeorge:
Hi,
Welcome to the forum.

Have you googled;

arduino music light show

There are numerous examples of what you want to do.

Tom… :slight_smile:

I didn’t search with those exact words, but I’ll take a look as well as I’ve been given

don't see anything at the entrance

What are you looking at, the entrance is not a proper word in this context. What are you using to look at it?

Grumpy_Mike: What are you looking at, the entrance is not a proper word in this context. What are you using to look at it?

the serial monitor of the arduino ide

That is not an entrance if anything it is an exit.

I don’t think you are getting any signal into your analogue input, measure on the input pin of the Arduino with an oscilloscope to see. But then I don’t suppose you have one.

Hi,
I notice on your proto board that you do not have jumpers on your red and blue power bus lines.
The gap indicates that there is a break in the bus.


protobreak.jpg
Have you a DMM to check your circuit voltages.

Tom..... :slight_smile:

protobreak.jpg