HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Apr 05, 2011, 06:53 AM
RTFM // copter damaged
warthox's Avatar
Joined Aug 2009
1,690 Posts
Quote:
Originally Posted by jerano View Post
AFAIK, you can't - [A8] is not an interupt port and can thus not be used as a ppm input port...

Ref. http://www.arduino.cc/en/Reference/AttachInterrupt

someone correct me if I'm wrong...
/a
thank u for the link.

so it looks like the pins 2,3,18,19,20,21 can be used as an interrupt input on the mega.

2 and 3 are used for esc outputs.
19 is also in use.

so where are the pins 18,20 and 21 on the flyduino? are they passed out somewhere?
paul, can u help?

edit:

i think i found them.

18 - tx
19 - rx
20 - sda
21 - scl

not good
warthox is online now Find More Posts by warthox
Last edited by warthox; Apr 05, 2011 at 07:04 AM.
Reply With Quote
Sign up now
to remove ads between posts
Old Apr 05, 2011, 07:29 AM
Registered User
Joined Feb 2011
198 Posts
Quote:
Originally Posted by warthox View Post
thank u for the link.
so it looks like the pins 2,3,18,19,20,21 can be used as an interrupt input on the mega.
2 and 3 are used for esc outputs.
19 is also in use.
well, yeah, pin 19 is the PPM input pin as defined for MEGA in the MultiWii code?!
but does not seem to be available on the board itself - bummer!

"#define PPM_PIN_INTERRUPT attachInterrupt(4, rxInt, RISING); //PIN 19"

/a
jerano is offline Find More Posts by jerano
Last edited by jerano; Apr 05, 2011 at 08:03 AM. Reason: bummer!
Reply With Quote
Old Apr 05, 2011, 07:45 AM
RTFM // copter damaged
warthox's Avatar
Joined Aug 2009
1,690 Posts
what about shifting pin2 and pin3 to pin 3 and pin4.
and than use pin 2 as ppm sum input?

changing this:
#define PPM_PIN_INTERRUPT attachInterrupt(4, rxInt, RISING); //PIN 19
#define MOTOR_ORDER 3,5,6,2,7,8 //for a quad+: rear,right,left,front //+ for y6: 7:under right 8:under left



to this:

#define PPM_PIN_INTERRUPT attachInterrupt(0, rxInt, RISING); //PIN 2
#define MOTOR_ORDER 4,5,6,3,7,8 //for a quad+: rear,right,left,front //+ for y6: 7:under right 8:under left



is there any reason why pin4 is not used?
warthox is online now Find More Posts by warthox
Reply With Quote
Old Apr 05, 2011, 08:06 AM
Registered User
Joined Feb 2011
198 Posts
Quote:
Originally Posted by warthox View Post
what about shifting pin2 and pin3 to pin 3 and pin4.
and than use pin 2 as ppm sum input?

is there any reason why pin4 is not used?
No idea - maybe the devs have a good explanation for that one!?

/a - damn this weather, I want some warm calm days, not cold windy ones!
jerano is offline Find More Posts by jerano
Reply With Quote
Old Apr 05, 2011, 08:31 AM
Registered User
Goofy23's Avatar
Hamburg, Germany
Joined Jan 2011
1,074 Posts
Can we do it this way?
there are lots of PCINT still free.
http://www.arduino.cc/playground/Main/PcInt
Goofy23 is offline Find More Posts by Goofy23
Reply With Quote
Old Apr 05, 2011, 08:41 AM
Registered User
mgros's Avatar
España, Aragón, Zaragoza
Joined Dec 2006
184 Posts
Quote:
Originally Posted by Goofy23 View Post
Can we do it this way?
there are lots of PCINT still free.
http://www.arduino.cc/playground/Main/PcInt
Yes, we can use it,we read standar RX using PCINT in pins 8,9,10,11,12,13.

I my opinion we can use it, but it's necessary an important change in code. Probably Alex can do it.
mgros is offline Find More Posts by mgros
Reply With Quote
Old Apr 05, 2011, 08:54 AM
RTFM // copter damaged
warthox's Avatar
Joined Aug 2009
1,690 Posts
i tested to shift pin 2+3 to 3+4 and set pin2 as ppm sum input.
now i can see the rx channels in the gui but no real signal on pin4.
the motor just beeps.

than i shifted pin 2 to pin 9 and again pin2 as ppm sum input.
i can see the rx channels in the gui and all motors seems to be ok.

but when i now try to arm the copter the motors just twitch once and thats it. nothing more happen.
the same happened with pin 2+3 shifted to pin3+4.

any ideas?

there is also one other strange thing. i can activate and deactivate the baro and mag but not the acc. the acc is always active. doesnt react on aux1 or aux2.
warthox is online now Find More Posts by warthox
Reply With Quote
Old Apr 05, 2011, 08:55 AM
Registered User
Goofy23's Avatar
Hamburg, Germany
Joined Jan 2011
1,074 Posts
Thanks Mariano,
for the PCINT, i found this method is mentioned on the aeroquad page
http://code.google.com/p/aeroquad/so...cint.pde?r=431
and this
http://books.google.de/books?id=iwzo...0pcint&f=false
pls see page 346, it isnt that comlicated it seems


But it may be easier to change the Motor pinout acordingly a free Pin2 for PPM use?
There are plenty of PWM outs free, still enogh for at least a octo and 3 servos.
Goofy23 is offline Find More Posts by Goofy23
Last edited by Goofy23; Apr 05, 2011 at 09:14 AM.
Reply With Quote
Old Apr 05, 2011, 09:09 AM
Registered User
berkely's Avatar
Belgium, Flemish Region, coast
Joined Nov 2009
219 Posts
Heavy work in progress!

I had to figure out a new way to include all set-ups & prop directions in one diagram. I hope it's understandable/readable.
I've added camera roll & pich inputs on the receiver side because they are in the ppm-stream available as well. Need confirmation on this.

Edit, see my blog for the latest drawing.

Quote:
Originally Posted by jerano View Post
pin 19 is the PPM input pin as defined for MEGA in the MultiWii code?!
but does not seem to be available on the board itself - bummer!
I'm glad I'm not the only one who could not find it. When this pin is changed/available, then I'll update the Mega drawings as well.
Now if we could just manage all the pins, but I think we need Alex his confirmation on this one since it's a bit code changing.

What we call IP (In Progress)

regards
B.
berkely is offline Find More Posts by berkely
Last edited by berkely; Apr 07, 2011 at 07:26 AM. Reason: Removed old drawing, linked the latest one.
Reply With Quote
Old Apr 05, 2011, 09:24 AM
Registered User
Goofy23's Avatar
Hamburg, Germany
Joined Jan 2011
1,074 Posts
As always
GREAT WORK
It may make sense to add a note about D37
its not set high in the 1prebis7, but this will be only a very small change.
ATM the IMU needs a bridge from 5V to Enable Pin to work.
I thought the PWM 44-46 should be great for servo use, hardware and software PWM avaiable on it.
The A Pins are not needed for the stabilisation i think, as 3 Servos are plenty.
Goofy23 is offline Find More Posts by Goofy23
Reply With Quote
Old Apr 05, 2011, 12:38 PM
RTFM // copter damaged
warthox's Avatar
Joined Aug 2009
1,690 Posts
allright guys, it works.

the problem was this f**king failsafe function. i set the failsafe time high so this function should never get active. and that was the reasen why the motors just twitched once and why the acc was not switchable.

now i used the default value for the failsafe time and shifted pin2 to pin9 and set pin2 as ppm sum input.
i made a testflight with the default settings and everything works now

this failsafe function has cost me one day but im happy that it works now and that the ppm sum rx works on pin2.

thats how it looks now:

#define PPM_PIN_INTERRUPT attachInterrupt(0, rxInt, RISING); //PIN 2
#define MOTOR_ORDER 3,5,6,9,7,8 //for a quad+: rear,right,left,front //+ for y6: 7:under right 8:under left
warthox is online now Find More Posts by warthox
Reply With Quote
Old Apr 05, 2011, 02:04 PM
Registered User
mgros's Avatar
España, Aragón, Zaragoza
Joined Dec 2006
184 Posts
Quote:
Originally Posted by warthox View Post
allright guys, it works.

the problem was this f**king failsafe function. i set the failsafe time high so this function should never get active. and that was the reasen why the motors just twitched once and why the acc was not switchable.

now i used the default value for the failsafe time and shifted pin2 to pin9 and set pin2 as ppm sum input.
i made a testflight with the default settings and everything works now

this failsafe function has cost me one day but im happy that it works now and that the ppm sum rx works on pin2.

thats how it looks now:

#define PPM_PIN_INTERRUPT attachInterrupt(0, rxInt, RISING); //PIN 2
#define MOTOR_ORDER 3,5,6,9,7,8 //for a quad+: rear,right,left,front //+ for y6: 7:under right 8:under left
Very good and very clever solution warthox, you get 10 points
mgros is offline Find More Posts by mgros
Reply With Quote
Old Apr 06, 2011, 09:46 AM
Registered User
berkely's Avatar
Belgium, Flemish Region, coast
Joined Nov 2009
219 Posts
Quote:
Originally Posted by Goofy23 View Post
As always
GREAT WORK
It may make sense to add a note about D37
its not set high in the 1prebis7, but this will be only a very small change.
ATM the IMU needs a bridge from 5V to Enable Pin to work.
I thought the PWM 44-46 should be great for servo use, hardware and software PWM avaiable on it.
The A Pins are not needed for the stabilisation i think, as 3 Servos are plenty.
Thanks, done & done.

Edit, see my blog for the latest drawing.

The pinout for the Hexa-X is not conform Alex his post.
It seems that the Hexa + is not turned 90degrees like I did on my Hexa but only 45. I still need to confirm this.
berkely is offline Find More Posts by berkely
Last edited by berkely; Apr 07, 2011 at 07:25 AM. Reason: Removed old drawing, linked new one.
Reply With Quote
Old Apr 06, 2011, 12:43 PM
RTFM // copter damaged
warthox's Avatar
Joined Aug 2009
1,690 Posts
here are some pics of my new mini hexa with the flyduino + ff imu.
first testflight was succesful. everything works.
video should be on after weekend.



motor out on pin2 was shifted to pin9. ppm sum signal is now on pin2.








heres the bridge for 5V bec and ppm sum vcc.



ckeck check



more on http://warthox.bplaced.net
warthox is online now Find More Posts by warthox
Reply With Quote
Old Apr 06, 2011, 01:30 PM
OS Sponsor
kinderkram's Avatar
Germany, NRW, Dusseldorf
Joined Jun 2010
5,131 Posts
Beautiful setup!

These beauties will have a great future.
Can't wait til postman delivers mine!

Everything is waiting here...

@ warthox: when will I see the moves I've been asking for months ago?
I always hear: "Pfff, easy! Hey, no problem!" - but seen none so far...

Muss man denn hier alles selber machen???
kinderkram is offline Find More Posts by kinderkram
RCG Plus Member
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
New Product Please let me introduce myself jimaquo Dock Talk 7 Oct 27, 2010 02:27 AM
Let me introduce the DEMON!!!! (Transparent covering and eliptical wing!!!) modest-master Sport Planes 7 Aug 25, 2002 11:46 PM
Let me introduce Angelis 280/400, Benjamin, Zombi (ARFs) modest-master Parkflyers 17 Mar 14, 2002 01:20 PM
Let me introduce the "NIKE" modest-master Electric Sailplanes 3 Mar 07, 2002 05:20 AM