Mega 2560 and Ethernet Shield
I have the following in my sketch and a few days ago I started experiencing problems.
Hallway beams are connected to pins 19 and 20 ( interrupts 4 and 3 respectively ).
Interrupt 4 suddenly stopped working ( as it should operate ) after 2 days of erratic triggering.
I have disconnected the inputs from the hall beam relays to the pins and checked the voltage between ground and the pins :
pin 19 = 0v
pin 20 = 0.11v
The voltage coming from the beam relay contacts is 0.04v on each line
attachInterrupt(3, HallBeam1, FALLING); //pin 20 upper beam
attachInterrupt(4, HallBeam2, FALLING); //pin 19 lower beam
With the beam pins disconnected, if I connect my voltmeter between ground and pin 20, it triggers the interrupt. Does this mean that my voltmeter is dropping the voltage on pin 20 and triggering the interrupt ? Measuring the voltage has no effect on pin 19 and does not trigger the interrupt.
Under normal conditions, the voltage from the beam relay is 0v, and if triggered should rise to 4.8v and then drop back down, triggering the interrupt.
Is the pin 20 = 0.11v causing the problem ?
If I change the interrupts to 'RISING' would this not cause a similar problem if pin 20 floats down to 0v and then back up to 0.11v ?