In recent project, I have to operate my relay based on falling edge of Square wave. Here, falling edge detect by using interrupt. So, whenever Arduino detect falling edge using interrupt, ISR function called and in ISR function I perform my relay's functionality. Means whenever ISR function called, relay turn on for some milliseconds and then turn off. But whenever I connect relay, it's not operate. Here, relay connected with pin 13, so Arduino attached led blinking but not with full brightness. I don't understand why it's happened. Give me some suggestions.

Now, I want to see my all readings on serial monitor, so for that, I used Serial.print() line. But, now one problem is appeared. Because of this line, my OUTPUT Pin 13 Waveform not synchronized with INPUT Pin 2 Waveform:

Below my code after adding Serial.print() in my code to display readings on serial monitor. You can see bunch of lines of Serial.print() at the end of the code :

My oscilloscope output. You can see no synchronization between that waveform. I don't know why this happens. Can I have to switch to ARDUINO MEGA because may be ARDUINO UNO processing speed not able to perform. Give some suggestion :

Basically, when the interrupt triggers you remember when it triggered and turn on the relay.

Then in your main loop, if the interrupt has been triggered, and 10 milliseconds have elapsed since the interrupt was triggered, then forget that the interrupt was triggered (so you can see the next one) then turn the relay off.

The key point is that you remember when the interrupt triggered, and count your time from that point onwards.

It sounds like for your project you want some form of solid state switching device, but what that device should be depends entirely on what it is you are actually controlling and what power / current / voltage it needs.
– Majenko♦Feb 14 '17 at 10:14

With your oscilloscope, compare the output of pin 13 (not the relay switching) with the square wave. You'll see how the relay is giving you false results.
– Majenko♦Feb 14 '17 at 10:23