cancel
Showing results for 
Search instead for 
Did you mean: 

External Interrupt triggers instantly

JBoli.1
Associate

Hello,

I am using a Nucleo-f401re Board and unfortunately I have serious troubles with External Interrupts.

I have two inductive sensors which are supplied by 24V. These sensors shall trigger an external Interrupt when the controller detects a rising edge. To reduce the 24V to apply the signal to the controller pin an easy voltage devider is used.

Now the Problem is, that the Interrupt is triggered ​all the time. No matter if I switch on the light or my soldering station. It even triggers when I touch the electrical contacts with a probe. What could be the problem and how can I solve this?

Thanks in advance!

Best regards,

Jonas ​

2 REPLIES 2
TDK
Guru

You could put an RC circuit on the input to prevent transient spikes from triggering it. Sounds like that's what's happening. You could also filter it in software but it'll take some coding.

If you feel a post has answered your question, please click "Accept as Solution".
JBoli.1
Associate

0693W000005AYPKQA4.jpgI thought of an capacitor as well. I have connected 100pF in parallel to the input pin against GND. But there is no improvement. Do I have to choose a different capacitance or is a resistor missing?