This may be kind of a picky question, but here goes. I hacked into my radio and soldered a wire to each side of the play/pause button. I've got two wires out the side that when you touch them together they play/pause it! (wow) I'm trying to wire it into an I/O-pin-controlled code, so that when pin (pick a number) is on HIGH it "presses" the button, by closing the circuit of the two wires. BUT here's the catch: it cannot add any voltage at all, i.e. plugging straight from pin to ground, NOR can it add considerable resistance. The buttons work because they all have different value resistors, so when the circuit is closed on one of them it can tell which one it is by the resistance. Therefore, it would be messed up if you add a resistor in the works. :-/ Can I just plug it into any old transistor to get it to work without resistors? Or how would I go about doing it? Thanks!
(I'm making a laser-tripwire triggered play/pause for when I enter/exit the room. A small delay will prevent a multi-reading in case I walk through it too slow.)
Considering these are probably powered from different sources, you should look into optoisolators and/or a relay.
On the 'tripwire' business, what happens if you enter then some time later another person enters? It's a tricky business to reliably tell if beam broken means someone is coming or going.
Thanks, I'll look into those options And it's just my bedroom where my arduino workshop is, so I'm usually going to be the only one coming and going, although I could figure out how to do two tripwires so it could tell what direction the person is going by which one is triggered first. Thanks for the ideas!
~Alex
I did essentially the same thing with a digital camera awhile back, only I was controlling the power button. I measured the voltage between between the two wires while the switch was open (to determine the polarity), and then used a transistor. If you use an NPN transistor, the emitter should be connected to both the negative lead from the switch and one of the Arduino's ground pins, the collector should be connected to the positive switch lead, and the base should be connected (through a resistor) to a digital output pin.
hmm, thanks blake, I'll try that too, because I haven't had much luck with transistors lately, it may be because I'm not grounding it as well as attaching it to negative. Thanks
I measured the voltage between between the two wires while the switch was open (to determine the polarity), and then used a transistor. If you use an NPN transistor, the emitter should be connected to both the negative lead from the switch and one of the Arduino's ground pins, the collector should be connected to the positive switch lead, and the base should be connected (through a resistor) to a digital output pin.
worked perfectly! now I'm able to walk in and out of the room and have it seamlessly pause/play the room using the laser tripwire and a 3 second delay to prevent multiple trips. Thanks for the help!
~Alex