0

i need to detect the pressing of 220v push button using any 5v micro-controller.what i do to get 5v signal to use relay of 220v coil..

here is a sketch show you what i mean

enter image description here

should i modify the circuit ?

what is the suitable value of R1?

thank you

sar
  • 1
  • 1

1 Answers1

0

You may want to consider debouncing the signal to the MCU with a capacitor in parallel with the resistor. I would simply recommend a 10K resistor and then experiment to figure out a good cap value to go with it. Debouncing can also be performed by software in some cases.

Otherwise, depending on what you plan to do with the signal from the relay, the MCU may experience multiple rising or falling edges even though the relay has only been "turned on" once.

You may find this thread on choosing pull resistors and this thread on debouncing buttons helpful.

  • Thank you .. does the minimum load for contact affect on choosing the value of resistor? As I see in data sheet of the relay on contact characterstic the minimum load 1mA – sar Jul 01 '18 at 17:10
  • I need to read the signal as external interrupt and do something when switch opened – sar Jul 01 '18 at 17:26
  • Sounds like you should debounce. Ohm's law will help you answer your first question, you will have some maximum allowable resistance defined by the minimum current you gave. –  Jul 01 '18 at 23:11