Maker Pro
Maker Pro

How to Read Relay State using Digital Pin?

Hi everyone, I am having trouble reading a value here in my setup:

There are 2 arduino uno rev3 units:

SETUP:
*ARD2
- has a 12v Relay Card connected to it to control a warning light (on/off) if certain conditions are met (such as if a Condition is satisfied, ARD2 will send signal to Pin 7 then pass it to the relay card to activate the warning light).

*ARD1
- is located in another location, it needs to read the state of the Relay1 Only(in the Relay Card) , not the Pin 7 . ARD1 will use Digital Pin 8 (as input) to read the state of the Relay1 (if it is triggered or not, 0 or 1)

Problem is, I don't know where in the Relay Card will I connect the ARD1's Digital Pin 8 & a reference ground to do the reading, please help me with this . Can I use the Dry Contact Port of the Relay Card?

below is my setup diagram .
 

Attachments

  • dry.png
    dry.png
    365.3 KB · Views: 621

KrisBlueNZ

Sadly passed away in 2015
It sound like you want Arduino #1 to be galvanically isolated from all of the Arduino 2 circuitry and the warning light.

This would normally be done using an optocoupler or a relay. If the second relay on your board is not used, you can use that. Drive it from the same signal that the first relay is driven from. Connect wires to the NO and COM connections on the second relay and run them to the 0V rail and the digital input on the Arduino #1 board. Enable the internal weak pullup on that input so the input defaults to the high state.

When Arduino #2 activates its output, both relays will close. The first one will activate the warning light, and the second one will close the circuit between the digital input and the 0V rail at Arduino #1, so Arduino #1 will read a low state on that input.

If those cables are running a significant distance you may need surge protection for Arduino #1 to prevent damage to the device from voltage spikes and surges coupled into the wires.
 
Top