Hacking retail devices

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.

"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."

Yes. Or use the signal to drive an NPN transistor, and let collector pull an input pin (with internal pullup resistor enabled) to ground.

"But what do I do about "ground"?"

Connect Battery- to Arduino ground.

Thanks! I've been searching all day trying to figure out what happens when you connect two circuits like this. I gather that these are called "floating" or "isolated" circuits. Do you happen to know of a reference that explains what happens when you connect the grounds of two circuits together?

I gather that these are called "floating" or "isolated" circuits

No, in fact they are exactly the opposite they become coupled, not isolated.

what happens when you connect the grounds of two circuits together?

Nothing happens, they just shair a common referance point. It allows what you want to do to work by providing a path for the current to flow round.