Author Options:

Can anyone tell me how to make a device that will play a song from an iPod whenever someone gets close to it? Answered

I am an art student looking to make a project that will "scream" in fear (play a pre-recorded sound) every time someone gets close to it. So far all I have is a proximity sensor. I sent an email to my teacher and he suggested having the track play as a loop and then using a transistor and a relay to switch the signal through a modified audio cable. I haven't been taught how to do any of this and my teacher is not responding to my emails and I am running out of time. Please help!


The forums are retiring in 2021 and are now closed for new topics and comments.

9 years ago

How important is it that the track starts at the beginning every time someone comes near? If it doesn't matter you can play the track on loop and build the proximity sensor into the speaker cable as a switch. When the some one trips the sensor it closes the switch and the speaker plays the sound until the senor doesn't detect anyone and it opens again, breaking the connection between the ipod and the speaker.

Without knowing what kind of prox sensor you have I can't really get to specific but you could probably use an Arduino to read the sensors input and control a relay in the audio cable.

Another option would be to ditch the ipod and get, or build, an mp3 shield for the arduino. In this case you wouldn't need a switch or relay on the speaker since the arduino can directly control when the sound plays.