RC Delta Wing, Thrust Vectoring, and Differentials Thrust Mixing

I would appreciate your help. I purchased a few Arduino Unos, but don’t think they will do what I am attempting. I want to take standard PWM servo outputs for aileron, elevator, rudder, throttle, and mode from a FrSky X8R reciever, perform deltawing mixing, Thrust Vectoring mixing, and differential thrust mixing.

I found this article,

I need 5 servo inputs (would like ability for one more) and 6 outputs. I think his code can be adapted, but the Uno, if I understand correctly, only has 2 interrupts so it can’t even run this program.

My plan is to get it working as a straight pass through, and then use this:

to perform the mixing.

The size, weight, and durability of the arduino are also important. Which one should I use? Any guidance on any aspect of my project will be appreciated.

One last thing. I am currently performing the mixing in the radio, and it is working very well. My goal is to be able to add flight stabilization with the FrSky S6R receiver, or something like the Eagletree Guardian. The problem is that in deltawing mode, there is no rudder control.

JamieFL:
I need 5 servo inputs (would like ability for one more) and 6 outputs. I think his code can be adapted, but the Uno, if I understand correctly, only has 2 interrupts so it can't even run this program.

There are two hardware interrupts on the UNO, but any pin on the board can be used to generate the pin-change interrupt. The only caveat is that each port of pins share one common interrupt vector. So your interrupt would have to check the port on the first line to see which pin exactly fired the interrupt. And you have to be super duper fast in the interrupt so you can free it up in case another pin fires it shortly thereafter.

Look here: Gammon Forum : Electronics : Microprocessors : Interrupts. There's a LOT on that page, but the bit about the pin change interrupts is just short of being halfway down the page.

Delta_G:
The only caveat is that each port of pins share one common interrupt vector... And you have to be super duper fast in the interrupt so you can free it up in case another pin fires it shortly thereafter.

Thanks for the real quick reply. This is a real fast and acrobatic plane. Can using common interests be made fast enough to be very reliable?

JamieFL:
Thanks for the real quick reply. This is a real fast and acrobatic plane. Can using common interests be made fast enough to be very reliable?

If you’re clever with the code. Maybe use all three ports on a 328P so as to keep as few together as possible to minimize the possibility of conflict. Read and make sure, or maybe someone can correct me, but I think that when a second pin changes during your interrupt it ques up another one to run right behind it. Or at least I think there’s a way to make that happen. Maybe you have to clear the interrupt flag early in the ISR. So at least the change still gets caught and as long as you write a really quick handler you won’t be off by more than a microsecond or two on the timing.

Really, if you think about it, as long as you clear the interrupt flag first line, and read the port on the second line do a compare and get out, then the only time you could possibly miss an interrupt would be if the second one fired during entry to the ISR or while you were resetting the flag. But if that happens you'll see it on the next line when you read the port so it would be easy to catch.