source code for revised RTOS pilot - v 0.51

Here is the place for all your dsPic or autopilot questions.

Moderator: lukasz

source code for revised RTOS pilot - v 0.51

Postby TheBoD » Thu Dec 23, 2010 12:37 am

Tom, do you have the source code for the revised version of the RTOS pilot project that you uploaded in mid-November to apply a fix with reading servo values.

The hex file I am referring to was compiled on Nov 10th and is 229KBin size . I would like to move to the quadrocopter version of the file and I want to make the appropriate source code changes. When I use the RTOS hex file with the quadrocopter setting in the project folder it works fine except I have been unable to make the switch in the source to delete ahrs_kalman_3x2.c file and add ahrs_simple_quaternion.c in MpLab so I get no pitch and roll response on the bench test.

Hoping to get the first part my quadrocopter built over the New Year break but I would like to do some early bench testing of the control system first.

Many thanks.
TheBoD
 
Posts: 37
Joined: Mon Dec 07, 2009 8:45 pm

Re: source code for revised RTOS pilot - v 0.51

Postby Tom » Thu Dec 23, 2010 12:18 pm

It's on the google code SVN server.
Tomorrow my christmas vacation starts, and I'll put a new .zip file with the latest code online :-)

Why can't you swap ahrs_kalman with ahrs_quaternion? Do you use MpLab?
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: source code for revised RTOS pilot - v 0.51

Postby TheBoD » Thu Dec 23, 2010 8:59 pm

Tom, thanks for the feedback. I will wait for the zip files. I do use MPLAB but when I imported the new file you put out in mid November I only picked up the hex file and so could not see any source code.

Thanks again.
TheBoD
 
Posts: 37
Joined: Mon Dec 07, 2009 8:45 pm

Re: source code for revised RTOS pilot - v 0.51

Postby Tom » Tue Dec 28, 2010 11:37 am

Sorry for the delay.

The latest development source code can be found here: http://code.google.com/p/gluonpilot/downloads/list
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: source code for revised RTOS pilot - v 0.51

Postby Tom » Tue Dec 28, 2010 3:09 pm

Some debug output was still present. I replaced the file with a better version.
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: source code for revised RTOS pilot - v 0.51

Postby TheBoD » Sun Jan 02, 2011 4:39 am

Tom, thanks for the latest posting.

I have been doing some initial testing work for the quadrocopter. I have four servos connected to the outputs 1 - 4 in order to test what I should see as the controls are operated. In Manual mode the 4 servos respond OK in line with the throttle adjustments with small changes when I move the elevator, aileron or rudder sticks. When I switch to stabilised mode and move the Gluonpilot board around , to simulate the quadrocopter moving, I can see the pitch and roll horizon moving on the display tab but I don't see any corresponding movement in any of the servos to simulate the motors adjusting their speed to correct to hold the attitude stable.

I know I am in the quadrocopter mode as I have set up an output message in the control initialization code to confirm this. I have max / min pitch settings as 25 degrees but I am not sure what other settings I should have as the initial setup. Would appreciate any suggestions ? My initial bench tests will be with two motors mounted on a see-saw arrangement to confirm the control scheme is working.
TheBoD
 
Posts: 37
Joined: Mon Dec 07, 2009 8:45 pm

Re: source code for revised RTOS pilot - v 0.51

Postby Tom » Sun Jan 02, 2011 11:19 am

Did you enter some "P"-pid values in the gluonconfig?
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: source code for revised RTOS pilot - v 0.51

Postby TheBoD » Sun Jan 02, 2011 12:48 pm

Tom, thanks for your note. I did not realize I needed to enter 'P" values - would these be in the gluonconfig.c file and if so how do I determine these. Thanks
TheBoD
 
Posts: 37
Joined: Mon Dec 07, 2009 8:45 pm

Re: source code for revised RTOS pilot - v 0.51

Postby Tom » Sun Jan 02, 2011 1:24 pm

You'll need to do a lot of tests with the quadrocopter. It depends on it's size, weight, size of props, ...

My values are around:
Pitch:
P = 0.15
Roll:
P = 0.12
Heading:
P = 0, I = 0, D = 2.4
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: source code for revised RTOS pilot - v 0.51

Postby Mitch » Sun Jan 02, 2011 10:42 pm

Another caution here. The quadrocopter code implements turbopwm which is a high frequency pwm intended for the speed controls. The pwm frequency is too high for most servos. The servos may not function properly and may overheat.
User avatar
Mitch
 
Posts: 118
Joined: Sat Dec 05, 2009 1:59 pm
Location: Florida, USA

Next

Return to Firmware

Who is online

Users browsing this forum: No registered users and 6 guests

cron