When I'm working in my woodshop, I often wear headphones to help deal with the machinery noise. I'll listen to music on them. But when the spousal unit has an urgent task that requires my immediate attention, she has to come downstairs, pick up a 2x4 and whack me in the back of the head to get my attention.
So I thought, wouldn't it be nice to build something with my Arduino that would allow me to listen to music and also have an FRS radio that the wife could use to summon my presence? The music would play by default and when a signal is detected on the FRS headphone-out line, the music would cut out and the clarion calls of my bride would fill my ears.
Seems simple enough, right? Hook both the music and FRS headphone outputs to relays and write the software to turn them on and off as needed, correct?
But I understand that even headphone output can be out of the range of the Arduino's sensor pins, right? So what's the best approach to ensure the incoming is within the detectable range? I was thinking of combining the suggestions in the playground of the optoisolator on the input side and the relay control on the output. Am I threatening to come up with the correct answer here?
My head hurts from all the Google searches on this that I've done in the past two days. Add that to all the 2x4 hits I've taken from her.
even headphone output can be out of the range of the Arduino's sensor pins, right
Why do you need the audio to go through the Arduino? All you need is to break the connection from your player to the headphones. You can do that simply with a relay controlled from an output pin.
I am not sure what a FSR is but assuming it is another audio signal then couple it into the input pin with a capacitor and put two diodes on the inputs as well (one cathode and one anode) then put the remaining cathode to +5 and anode to ground. In that way any excessive voltage is clipped to the supply rails and everything is safe.
Sounds like you need an audio mixer to combine the FRS and music signals.
I hope that the machinery noise is being blocked by protective gear and not merely drowned out by your headphones, otherwise you're doing untold damage to your hearing and you wife will need that two-by all day every day before too long...
My mom always flicked the lights off and on to get dad's attention when the saw was running.
-j
(Mike, in the US FRS = Family Radio Service, little low-power unlicensed 70cm 2 way radios)
And Grumpy Mike's suggestion of a pair of diodes. The diode pair is the most promising because it seems the most simple.
Again, the goal would be to run both audio sources through separate relays. By default, music relay would be closed so music would play through the headphones. When the FRS radio receives a transmission, the Arduino would detect that on one of its input pins. If would then open the music relay and close the FRS relay. I want to provide protection on the Arduino input so it doesn't get a voltage that exceeds its range of 0-5 v.
I have one more question. I have been looking for something that would explain why one would want to use clamping diodes instead of a voltage divider, but I can't find a pros and cons discussion. That's probably because I haven't hit upon the correct words to type into the internet search engine.
Would you explain the reasons why one would choose one over the other?