A microcontroller in another circuit I want to monitor controls a relay.
I had thought of using a current switch to detect when the switch had been made, but because it's got a cord and doesn't expose enough of the active wire inside, I won't be able to.
However what might work is the other side of the relay, I can connect to the signal side of the relay, and that would work - however, slightly lost on how to interface the relay to the Arduino ?
Connect both grounds together, use a digital input and if it's on, that is it?
Will that cause any problems with the relay coil if connected from the active side to the relay, and the ground being common ?
Connect both grounds together, use a digital input and if it's on, that is it?
It could be.
Will that cause any problems with the relay coil if connected from the active side to the relay, and the ground being common ?
No problem with the relay but it could be a problem for the monitoring arduino.
Is your relay 5V? Has it got a reverse polarity flyback diode across it?
If yes to both questions then it is safe to connect it directly to the arduino.
If not then you will have to buffer the input into your arduino through a transistor, potential divider, or opto isolator.
Grumpy_Mike:
No problem with the relay but it could be a problem for the monitoring arduino.
Is your relay 5V? Has it got a reverse polarity flyback diode across it?
I'll check for that diode, wouldn't have thought of that, I'd need to pick up the output from the MCU to the relay from before the diode (at the existing MCU possibly).
It almost certainly will be at or less than 5V - PIC MCU controls it.