Minimum external interrupt voltage?

Hi, I'm using the Arduino for a fail save on two PPM receivers and I'm using interrupts 0 & 1 to read the PPM signal from both receivers. It is working pretty good, but I'm getting some jitter on the servos once or twice every second.

To find the cause of this I have disabled all servo outputs (MegaServo) and output just one channel to a digital pin directly from the interrupt callback. I am comparing the input signal and the output signal on my oscilloscope and see the input signal if perfectly clean, but the output signal is not all the time. On each jitter it passes a very long pulse.

My code seems OK because it does pass correct frames most of the time, so I am wondering if there might be another cause. The processor in the receiver has a 3.3V supply voltage and my Arduino uses 5V. The PPM signal from the receiver is also 3.3V and I wonder if this is enough. I was looking in the datasheet to check what the minimum required interrupt voltage is but can't find this information. Does anyone know more about this? I think it could be possible some interrupts are not detected because the PPM voltage is too low.

If this is not the case, any thoughts on other possible causes are very welcome.

Thanks in advance!

The minimum Vih on the normal digital pins is 3.0 Volts at a Vcc of 5 Volts.

To find the cause of this I have disabled all servo outputs (MegaServo) and output just one channel to a digital pin directly from the interrupt callback. I am comparing the input signal and the output signal on my oscilloscope and see the input signal if perfectly clean, but the output signal is not all the time. On each jitter it passes a very long pulse.

I dont quite get this could you post a picture or a clearer description?

You're probably on the right track with your diagnosis. If there's a long cable (and "long" can be only a few feet when you're dealing with 3.3V signals), you could be seeing just enough difference between "ground" on the two systems to make the "high" level iffy. Or it could be acting as an "antenna" and picking up some electrical noise from the environment. Also, the receiver's CPU may very well not be hitting the full 3.3V for "high" outputs.

There are several different ways to solve the problem, if it's just a matter of the "high" voltage being dicey: do a little googling for "3.3V level shifter", and you'll probably find examples circuits you can build without needing to mail-order parts. It can be done with transistors, opamps, voltage comparators, or specialized digital logic chips designed for the purpose.

Make sure you have nice fat connections to a central ground point: with servos (and other motors??) running, the current surges could be causing ground loops. The Arduino should have its own wire going to the battery pack ground, not daisy-chained through some other part of the system (especially not anything that sucks a lot of current, like a motor).

Ran

Sounds like a classic case of insufficient decoupling:-
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

Thanks for the response guys. I will add a transistor to the receiver's output to make sure it switches between 0 V and 5 V. The cables are very short and the power supply is very stable, so if this doesn't solve it the problem must be in the code I guess. I already did a test flight with the airplane just because I was curious if the jitter would be noticeable in flight (did a range check first). Turns out the jitter is not noticeable at all, but I'd rather make this work 100% reliable before I put it in my big airplane ;) I'll let you know how it works out with the transistor added.

and the power supply is very stable,

A system with the most stable supply in the world still needs decoupling.

did a range check first

Coward ;D

Did you check the power with servos wiggling and other "live" conditions? Even though I would expect more in the way of "random" failures if it were a decoupling problem, I agree with Mike in that it's a much-overlooked factor (I just think that, in this particular case, it should be the second thing to check, instead of the first).

Ran

Even though I would expect more in the way of "random" failures if it were a decoupling problem

No it is normally when there is a disturbance like:-

with servos wiggling and other "live" conditions

So that is exactly when I would expect to see lack of decoupling start to hit you.

I just did a test with a transistor that makes sure the pulse voltage switches between 0 V and 5 V. It did not make any difference.

About decoupling, I don't think I need any more decoupling than there already is. I'm just using the Arduino board and a receiver. The power supply can handle 3 Amps and the receiver is decoupled. The unwanted jitter don't just happen when a servo is connected. I have checked this with my oscilloscope. Even when there's nothing else connected to the board these unwanted pulses are produced. There is hardly any current flowing that could cause any instability. There is no wrinkle to be found in the supply voltage at all.