Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Fwd: 4th output channel on UDB v2
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
William Premerlani  
View profile  
 More options Mar 3 2011, 9:17 pm
From: William Premerlani <wpremerl...@gmail.com>
Date: Thu, 3 Mar 2011 21:17:15 -0500
Local: Thurs, Mar 3 2011 9:17 pm
Subject: Fwd: 4th output channel on UDB v2

Hi Gert,

I am forwarding your note to the heli group, and to John McClelland and
Gerry Chapman. John has stabilized a heli using the UDB and some code that
he wrote. Similarly, Gerry has stabilized a quad. I think they can help you
better than I can. (John and Gerry: read the attachments to see what is
going on.)

I looked at your code, and have the following comments and suggestions:

1. Your code is based on the roll-pitch-yaw demo in the download section of
the UDB website. That demo is rather old. It does not support the UDBV3,
only V1 and V2. For the most up to date firmware, it would be good to use
the Tortoise repository. What you have is ok for V2, but it will not work
for V3, it was written before V3 came out.

2. I notice that you include acceleration in the roll control. I am rather
sure that John and Gerry were able to stabilize without an acceleration
term. They used rmat and gyro signals only.

3. I notice that you are mixing floats and integers. That is ok in general,
but the casting rules of the C language may produce unexpected results in
some places.

Best regards,
Bill Premerlani

  LAPCAD_VTOL_20110228.pdf
500K Download

  rmat.c
19K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "4th output channel on UDB v2" by John McClelland
John McClelland  
View profile  
 More options Mar 3 2011, 9:39 pm
From: "John McClelland" <mcclelland.j...@gmail.com>
Date: Thu, 3 Mar 2011 19:39:06 -0700
Local: Thurs, Mar 3 2011 9:39 pm
Subject: Re: 4th output channel on UDB v2

HI Gert

Just a quick look at what you are trying to do....

I think your issue is how to control 4 servos for your VTOL and having trouble.

Rather than try to go through all your code, I suggest you take a look at our Quad code.  It is controling 4 ESC/motors using the extra channel approach.

As Bill says, you don't want to use PDCX, you want to use pwOut[XXX]... where XXX is defined in options.h.

You can pick up the Quad code at:

http://code.google.com/p/matrixpilotheli/wiki/QuadContent

and download the Quad firmware.   Take a look at servoMix.c  and you will find some code that looks like:

//Left Motor Output

// temp = pwIn[THROTTLE_INPUT_CHANNEL] + aileron + YawIn + roll_control ;

temp =Throttle + aileron +

REVERSE_IF_NEEDED(RUDDER_CHANNEL_REVERSED,YawIn) +

REVERSE_IF_NEEDED(AILERON_CHANNEL_REVERSED,roll_control) ;

pwOut[LEFT_MOTOR_OUTPUT_CHANNEL] = pulsesat( temp ) ;

//Front Motor Output

// temp = pwIn[THROTTLE_INPUT_CHANNEL] + elevator - YawIn + pitch_control ;

temp =Throttle + elevator -

REVERSE_IF_NEEDED(RUDDER_CHANNEL_REVERSED,YawIn) +

REVERSE_IF_NEEDED(ELEVATOR_CHANNEL_REVERSED,pitch_control) ;

pwOut[FRONT_MOTOR_OUTPUT_CHANNEL] = pulsesat( temp ) ;

//Rear Motor Output

// temp = pwIn[THROTTLE_INPUT_CHANNEL] - elevator - YawIn - pitch_control ;

temp =Throttle - elevator -

REVERSE_IF_NEEDED(RUDDER_CHANNEL_REVERSED,YawIn) -

REVERSE_IF_NEEDED(ELEVATOR_CHANNEL_REVERSED,pitch_control) ;

pwOut[REAR_MOTOR_OUTPUT_CHANNEL] = pulsesat( temp ) ;

//Right Motor Output

// temp = pwIn[THROTTLE_INPUT_CHANNEL] - aileron + YawIn - roll_control ;

temp =Throttle - aileron +

REVERSE_IF_NEEDED(RUDDER_CHANNEL_REVERSED,YawIn) -

REVERSE_IF_NEEDED(AILERON_CHANNEL_REVERSED,roll_control) ;

pwOut[RIGHT_MOTOR_OUTPUT_CHANNEL] = pulsesat( temp ) ;

It will be a little different because we have made some changes to support altitutude control...but the logic is the same...load up the pwOut's.

If you look in the options.h file in the download you will see how each channel is define for input and output.

This code will run on any UDB, just get the option.h board types set properly.

Hope this helps

John


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jlchapman  
View profile  
 More options Mar 3 2011, 11:52 pm
From: jlchapman <raptor9...@msn.com>
Date: Thu, 3 Mar 2011 20:52:56 -0800 (PST)
Local: Thurs, Mar 3 2011 11:52 pm
Subject: Re: 4th output channel on UDB v2
Gert,

Here is the link for the extra channel you need:
http://code.google.com/p/gentlenav/wiki/ConnectingExtraChannels

Jerry

On Mar 3, 7:39 pm, "John McClelland" <mcclelland.j...@gmail.com>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »