How to detect input data through the audio jack?

前端 未结 4 1078
耶瑟儿~
耶瑟儿~ 2021-01-31 06:26

I know that some devices headphone ports (maybe all of them? any reference here would be good) have 3 channels, for stereo sound and microphone. So I was wondering if it\'s poss

4条回答
  •  梦毁少年i
    2021-01-31 07:04

    It's not clear if this will work without having the actual hardware in my hands, but... Don't plug the jack all the way into the socket. The tip of the jack should then connect to pin 2, left audio out, of this diagram: http://pinoutsguide.com/CellularPhones-P-W/samsung_galaxy_headset_pinout.shtml and the ring should connect to pin 3, microphone in. If you push the jack all the way in, the ground pin on the jack shorts out the microphone input and you won't detect anything - pictures at https://en.wikipedia.org/wiki/File:Photo-audiojacks.jpg show how the connections will mate.

    Play some audio out the Left channel, record it on the mic channel, and measure the amplitude. That may - if it's all wired up right - tell you the pedal position. If the far end of the potentiometer is connected to the ring of the jack, that's not going to work.

    That all sounds rather Heath Robinson. You could buy an inline 3-pin female jack socket and a 4-pin male jack plug and wire the two together to get whatever pinout you need. No electronics; just connectors and bits of wire! Or use a cable like this one: http://www.ebay.co.uk/itm/1mt-3-5mm-4-Pin-Jack-Male-Plug-4-Pole-Jack-female-Socket-Extension-Lead-Cable-/251172651017?pt=UK_Computing_Sound_Vision_Audio_Cables_Adapters&hash=item3a7b0e8009&_uhb=1 and a sharp knife and some stickytape.

    The other problem would come if the phone refuses to send audio to the jack when the jack isn't plugged fully home - there's an extra contact in the socket that detects that mechanically. But it would work if you made 3-pin to 4-pin adapter.

    Or, just cut the 3.5mm jack off your (shiny new) expression pedal. Replace it with the 4-pin connector off one of those broken phone headsets you have lying around.

提交回复
热议问题