Candyjet
Posts: 56
Joined: Sun Jan 10, 2016 3:45 pm

Use iPhone sound to trigger Pi

Fri Jan 29, 2016 9:18 pm

I want to use the headphone output of an iPhone as a trigger to be recognised by the Pi, (which will then carry out a defined action), i.e., similar to a button push, but using the sound output of the phone, instead of a physical button.

I have a few questions.

Is the sound from an iPhone likely to be loud enough to be recognised by the Pi? If so, which pins should I be using?

If not, would one of the Audio cards, eg Wolfson, do the trick? I can see that they are capable of recording sound, but I don't want that, I want to use the sound input as a trigger.

Thanks

CJ

forklift
Posts: 8
Joined: Sat Jan 30, 2016 4:33 am

Re: Use iPhone sound to trigger Pi

Sat Jan 30, 2016 5:54 am

you could always use something like a PAC-Audio LOC module to trigger 12v on to then power the Pi, but then that would be a decent delay as the pi would then need to boot up and if enough signal were lost then so would go the power

Candyjet
Posts: 56
Joined: Sun Jan 10, 2016 3:45 pm

Re: Use iPhone sound to trigger Pi

Sat Jan 30, 2016 1:38 pm

Thanks forklift, but that's not quite what I'm after. I want to use a series of sound outputs, separated by silence, to produce a corresponding series of outputs from the Pi. Would a small amplifier module, if such a thing exists, do the trick?

ghans
Posts: 7867
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Use iPhone sound to trigger Pi

Sat Jan 30, 2016 7:17 pm

Do you want to use air or a sound cable as medium ?

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2029
Joined: Thu Jul 11, 2013 2:37 pm

Re: Use iPhone sound to trigger Pi

Sat Jan 30, 2016 7:24 pm

DTMF

Multimon

Plug the iPhone headphone output into a USB sound card connected to the Pi to receive the audio generated on the iPhone.

DTMF is the noise you hear when you press numbers on a telephone keypad - mobile or landline.
Rockets are loud.
https://astro-pi.org

Candyjet
Posts: 56
Joined: Sun Jan 10, 2016 3:45 pm

Re: Use iPhone sound to trigger Pi

Sat Jan 30, 2016 8:11 pm

Thanks jdb.

I was planning on using a sound from the left channel of the iPhone headphones to trigger one Pi action, and from the right side to trigger another using the GPIO.

Is this possible, assuming I have enough brain cells?

ghans
Posts: 7867
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Use iPhone sound to trigger Pi

Sat Jan 30, 2016 8:55 pm

Do you have any programming experience , especially for the
iPhone ?


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Candyjet
Posts: 56
Joined: Sun Jan 10, 2016 3:45 pm

Re: Use iPhone sound to trigger Pi

Sat Jan 30, 2016 10:17 pm

I've got the sounds from the iphone all sorted, thanks.

Have also got individual parts of Python written, it just needs gathering into a whole single entity, so I'm happy with the programming aspect, just this last bit of hardware needs putting in place.

ghans
Posts: 7867
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Use iPhone sound to trigger Pi

Sun Jan 31, 2016 10:35 am

Sounds good.
You will need an USB sound card.


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Candyjet
Posts: 56
Joined: Sun Jan 10, 2016 3:45 pm

Re: Use iPhone sound to trigger Pi

Sun Jan 31, 2016 11:10 am

Thanks. And to be sure, it will allow an in audio signal to be used to trigger a GPIO output?

ghans
Posts: 7867
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Use iPhone sound to trigger Pi

Sun Jan 31, 2016 11:16 am

Well , you have to program it that way.
You need to analyze the audio on the Pi and invent a
protocol for GPIO control commands. A softmodem
might be part of the solution.


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Return to “Beginners”