Need Help Using 3.5mm TRS Jack

Farmer

Diamond Member
Dec 23, 2003
3,334
2
81
So I'm trying to input data into my computer through the microphone in. As you all know, its a 3.5mm TRS 'stereo' jack. The pinout is like here. The circuit I am going for is very simple:here.

As you can see, there are actually three elements insulated from eachother, the tip, labeled here as 'Tx', the ring, labeled here as 'Rx', and the sleeve, labeled here as 'GND.'

Now, the stereo to L/R plugs like these give me access to the 'Tx' and 'Rx' portions, however, where can I find a wire for the ground?



I'd appreciate any help from anyone.
 

esun

Platinum Member
Nov 12, 2001
2,214
0
0
The ground should be the ring around the actual pin on the connector. I've never seen a ground connection separate from the plug. If you have a socket, that should allow you to solder a wire to the ground connection easily, but I'm not sure what the best solution would be otherwise.
 

bobsmith1492

Diamond Member
Feb 21, 2004
3,875
3
81
Originally posted by: esun
The ground should be the ring around the actual pin on the connector. I've never seen a ground connection separate from the plug. If you have a socket, that should allow you to solder a wire to the ground connection easily, but I'm not sure what the best solution would be otherwise.

Yeah, ground is the ring. I'd just chop the wire, though; then the ground (negative terminal) is the outer cable shielding while the signal is the center conductor. Solder that straight onto your phototransistor. Good luck getting any signal out of it into your computer... I'd recommend something like Figure 13.
 

Farmer

Diamond Member
Dec 23, 2003
3,334
2
81
Thanks guys. bobsmith, didn't realize it was just the outer portion of the L/R cable. I'll get some wire and cut it to see.

As for the circuit itself, I'm also not quite sure how big the response will be and if it will need amplification. I'll also be shielding the phototransistor so it won't be overwhelmed with light. I'll see when I build it.

I haven't really learned too much about phototransistors, I'm not an electrical engineer. Does anyone know how to characterize the response of the transistor itself? Like, if 'i' is incoming light intensity, is it linear with voltage (i ~ V) or linear with current (i ~ I)? Does it depend on other characteristics of the circuit (like capacitors V = Q/C, dV/dt = I/C, voltage has a dependence on current, etc).

 

CycloWizard

Lifer
Sep 10, 2001
12,348
1
81
Originally posted by: Farmer
Thanks guys. bobsmith, didn't realize it was just the outer portion of the L/R cable. I'll get some wire and cut it to see.

As for the circuit itself, I'm also not quite sure how big the response will be and if it will need amplification. I'll also be shielding the phototransistor so it won't be overwhelmed with light. I'll see when I build it.

I haven't really learned too much about phototransistors, I'm not an electrical engineer. Does anyone know how to characterize the response of the transistor itself? Like, if 'i' is incoming light intensity, is it linear with voltage (i ~ V) or linear with current (i ~ I)? Does it depend on other characteristics of the circuit (like capacitors V = Q/C, dV/dt = I/C, voltage has a dependence on current, etc).
Chances are you need to make a calibration curve or, at the very least, find one for the transistor you're using.
 

bobsmith1492

Diamond Member
Feb 21, 2004
3,875
3
81
Originally posted by: Farmer
Does anyone know how to characterize the response of the transistor itself? Like, if 'i' is incoming light intensity, is it linear with voltage (i ~ V) or linear with current (i ~ I)?

Per the link I posted, Figure 13, it would seem that light-to-output-current is fairly linear in a transimpedance amplifier setup (transimpedance = current to voltage).

Exactly how linear would depend on your phototransistor, extraneous light saturation levels, and bias current.
 

Paperdoc

Platinum Member
Aug 17, 2006
2,438
344
126
With the "Stereo Splitter" adapter you picture, the outer shell of BOTH the RCA-type connectors is connected to the Sleeve or Ground of the 3.5 mm mini-plug. Tip on the mini-plug will be the center of one RCA connector; Ring will be center of the other. Simple ohm-meter checks will show this without cutting into any wires.

If your aim is to connect a signal lead from phototransistor into the Mic In port, why go through an adapter? Simply take the lead from the phototransistor and solder onto it a 3.5 mm stereo plug (buy one from any electronics shop with a screw-off shell, made for solder-it-yourself assembly jobs) so that the Ground is to connector Sleeve, and Signal is to Tip. No connection to Ring at all.

I assume you will have a power supply and amplifier circuit between these two, anyway. A Mic In socket on an audio card expects signals conforming to specific ranges of electical signal, including the fact that the external signal provides a voltage and current that can flow thorugh the audio card input circuitry. If you simply connect a phototransistor alone, there is no supply voltage going in.
 

Leros

Lifer
Jul 11, 2004
21,867
7
81
I did something like this to transfer audio data via laser. My receiving circuit was a 3v battery in series with the photo resistor. It was a bit weak and could have used amplification, but the data came through perfectly.
 

Farmer

Diamond Member
Dec 23, 2003
3,334
2
81
Originally posted by: Paperdoc
With the "Stereo Splitter" adapter you picture, the outer shell of BOTH the RCA-type connectors is connected to the Sleeve or Ground of the 3.5 mm mini-plug. Tip on the mini-plug will be the center of one RCA connector; Ring will be center of the other. Simple ohm-meter checks will show this without cutting into any wires.

If your aim is to connect a signal lead from phototransistor into the Mic In port, why go through an adapter? Simply take the lead from the phototransistor and solder onto it a 3.5 mm stereo plug (buy one from any electronics shop with a screw-off shell, made for solder-it-yourself assembly jobs) so that the Ground is to connector Sleeve, and Signal is to Tip. No connection to Ring at all.

I assume you will have a power supply and amplifier circuit between these two, anyway. A Mic In socket on an audio card expects signals conforming to specific ranges of electical signal, including the fact that the external signal provides a voltage and current that can flow thorugh the audio card input circuitry. If you simply connect a phototransistor alone, there is no supply voltage going in.

True, but the thing is I have to plug the plug into my computer, and I can't ensure that, when plugged in, the circuit remains what I want it to be if I solder directly onto the connector, unless I misunderstood you. I.e., the different connections might mix.

I believe the voltage is supplied from within the sound board. I.e., there is something in the circuit path on the board that gives a potential jump. If not, I'll put a battery.
 

Rubycon

Madame President
Aug 10, 2005
17,768
485
126
Most pc audio card mic inputs are designed for electret mics which require a bias voltage. This may not work very well with your intended idea.
 

Paperdoc

Platinum Member
Aug 17, 2006
2,438
344
126
[/quote]
True, but the thing is I have to plug the plug into my computer, and I can't ensure that, when plugged in, the circuit remains what I want it to be if I solder directly onto the connector, unless I misunderstood you. I.e., the different connections might mix.[/quote]

I assumed you would connect a small coaxial cable, like a microphone cable, from the phototransistor mounted somewhere to the computer, and the connector would be soldered onto the cable end at the computer. Now, if you connect cable shield to connector outer sleeve, and cable center to connector tip (and NOTHING) to connector ring), here's what happens as you plug it into the sound board socket.
1. Tip contacts socket ground, no other connections made - no problem.
2. Tip and ring contact socket ground - still no problem.
3. All three plug parts contact socket ground - still no problem.
4. Tip contacts socket "ring", but plug ring and sleeve still contacting socket ground. This is VERY much like the final connection you want to be using, except that the signal from the plug tip is on the wrong stereo channel. You see, in most sound card sockets, the outer (sleeve) contact is BOTH signal return and Ground, because the card's circuits connect chassis ground to signal ground. The Ring and Tip contacts are just the two signals from the two separate stereo channels (they share the common signal return / ground).
5. Tip, Ring and Sleeve of the plug all contact the correct pieces in the socket and normal operation is established.

If you reverse this as it is unplugged, you'll see that there are no problems during that operation, either.

The worst-case condition is stages 2 and 3 above when two or three things all are connected to ground. IF your external circuit output (e.g., an amplifier) would be damaged by having its output signal shorted to ground, then this is a problem, and you do need to find an alternative connector system (such as the RCA connector you showed) that makes it less likely for such a short circuit to happen. But if that's not the case, and you are worried only about what voltages are applied to your external circuit from sources in the socket, I don't think you have a problem.
 

NeoPTLD

Platinum Member
Nov 23, 2001
2,544
2
81
The original circuit is operating the transistor in open collector, so you need a voltage source.

Why not try using a solar panel off the calculator instead, which is self-powering, so you don't have to worry about providing a power source?