Interrupt triggered, but no signal? False interrupt

Hi,

I’m having trouble with one om my imps. It gives false interrupt triggers. I’ve monitored the input with my oscilloscope but can’t see anything. Perhaps I’ve now set it up correctly.

Does anyone have any good suggestion for how I can resolve this?

Best regards, Hannes

Can you describe the input, and the board you’re using?

Very small transitions can cause triggers, it could be adding the scope adds enough capacitance that the edge causing the interrupt is smoothed out.

I have an imp connected to a old door-bell. The cable is roughly 2 meters. The same imp is also connected to a door-swith(magnetic contact) with 1 m cable. The magnetic contact works perfectly but the door-bell input gets triggered faulty.

One extremely strange thing is that for example it could be triggered when I turn on the lights in the basement(?!). I’ve connected my oscilloscope but can’t see anything.

I’m not sure what you mean with “adding the scope”.

The buttons are connected like this:
https://electricimp.com/docs/examples/digitalin-button/

@hannez82 Sounds like something causing just enough voltage on the line to trigger the input. You could try adding a stronger pull down resistor, or some kind of filter to keep out the unwanted triggers.

I take care of this in software for my security system, but that might not work for you. When the system boots, it checks all the sensors and sets them as open or closed. Then when there is a trigger, it reads the sensor and it knows what the original state was. So, if there is a trigger on a door and the system knows the door was closed, when it reads the sensor state, if it is still closed, then it was a false trigger.

Using an RC filter in hardware might be a better option. If you take a look at some of the reference design schematics that have buttons, you’ll see various examples of RC filters that “debounce” a button, either pulling it high or low. Those filters should keep your line noise from triggering the pin, if that is the problem.

The scope probe adds capacitance, which may be enough to remove enough of the spike.

Just putting a cap across the pin & ground is likely enough to deal with it. Something small, maybe 1nF. The “R” in the RC would be the imp pull-up if you were using DIGITAL_IN_PULLUP.