Electronics > Beginners

best practices in detecting relay contacts status

(1/1)

Sultanpepper123:
Currently i'm experimenting with 12VDC energy meters latching relays and at least for me the feature of detecting status of contacts ( required by some clients ) which is built in as in the diagram below is quite interesting. Now i need to interface it to a microcontroller safely. At the top of my head i may think of using an optocoupler but my understanding is i need to isolate the grounds ? thus making the design a bit pain in the kneck, is this the only feasible method or are there other approaches ?. enter image description here

TL;DR pins 4 and 5 switch on / off depeding on status of relay, how do i sense/ measure status of the latch with those pins?

GerryR:
If the 4,5 contacts are isolated, why not tie one contact to a pull-up resistor and feed the other to a micro input.  If the micro inputs are already pulled up, then tie one contact to the micro common and the other to the micro input of you choice.  The change of state tells what position the relay is in.  :-//

Sultanpepper123:

--- Quote from: GerryR on October 22, 2019, 08:50:34 pm ---If the 4,5 contacts are isolated, why not tie one contact to a pull-up resistor and feed the other to a micro input.  If the micro inputs are already pulled up, then tie one contact to the micro common and the other to the micro input of you choice.  The change of state tells what position the relay is in.  :-//

--- End quote ---

Thanks for the suggestion, looks simple enough. What made me worry at first whether there was any EMI or transients i should worry about.

mikerj:

--- Quote from: Sultanpepper123 on October 22, 2019, 09:01:46 pm ---
--- Quote from: GerryR on October 22, 2019, 08:50:34 pm ---If the 4,5 contacts are isolated, why not tie one contact to a pull-up resistor and feed the other to a micro input.  If the micro inputs are already pulled up, then tie one contact to the micro common and the other to the micro input of you choice.  The change of state tells what position the relay is in.  :-//

--- End quote ---

Thanks for the suggestion, looks simple enough. What made me worry at first whether there was any EMI or transients i should worry about.

--- End quote ---

Not from the isolated contacts themselves.  Avoid routing the connections between the contacts and the microcontroller close to, and parallel with the switched side of the relay coil.

Sultanpepper123:

--- Quote from: mikerj on October 22, 2019, 09:20:53 pm ---
--- Quote from: Sultanpepper123 on October 22, 2019, 09:01:46 pm ---
--- Quote from: GerryR on October 22, 2019, 08:50:34 pm ---If the 4,5 contacts are isolated, why not tie one contact to a pull-up resistor and feed the other to a micro input.  If the micro inputs are already pulled up, then tie one contact to the micro common and the other to the micro input of you choice.  The change of state tells what position the relay is in.  :-//

--- End quote ---

Thanks for the suggestion, looks simple enough. What made me worry at first whether there was any EMI or transients i should worry about.

--- End quote ---

Not from the isolated contacts themselves.  Avoid routing the connections between the contacts and the microcontroller close to, and parallel with the switched side of the relay coil.

--- End quote ---

Really appreciate the help and sharing your thoughts.  :-+


--- Quote from: GerryR on October 22, 2019, 08:50:34 pm ---If the 4,5 contacts are isolated, why not tie one contact to a pull-up resistor and feed the other to a micro input.  If the micro inputs are already pulled up, then tie one contact to the micro common and the other to the micro input of you choice.  The change of state tells what position the relay is in.  :-//

--- End quote ---

Again thank you sir for the help .  :-+

Navigation

[0] Message Index

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod