I have a question about using my Arduino UNO to log events from external devices.
Specifically, I have a retail IR door chime that makes a ringing noise when the IR sensor detects motion. I want to take out the buzzer and pipe this signal into my Arduino so I can log the times that the sensor tripped.
My problem is that I'm running the Arduino off my USB and the motion detector runs off a 9v battery. It seems like it would be easy enough to just remove the buzzer from the doorchime and put a voltage divider in it's place. I'd rig that divider so that it put out +5v for a digital "1" and send that to one of my Arduino input pins.
But what do I do about "ground"? I'm not sure if the "ground" in the battery circuit is the same as the ground coming from the USB bus to the Arduino. Is it safe to tie the ground from the Arduino to the negative terminal of the battery to make a "common" ground? I've seen that done in examples where the Arduino is being used to drive motors or lamps with on a separate voltage source. But that method always has the Arduino output going though a transistor. I was not sure if putting signals back into the Arduio worked the same way.