SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Mar 14, 2012, 09:00 AM
just gotta mess with it!
2Doggs's Avatar
North West Louisiana
Joined Nov 2009
4,848 Posts
Quote:
Originally Posted by leadfeather View Post
Here is the control logic for the ccpm mixing I've written into the code:

motor[0] = rcCommand[THROTTLE]; //Main motor
motor[1] = 1200 + YAW_DIRECTION * axisPID[YAW]; //Tail motor
motor[2] = MINCOMMAND ; //spare

servo[0] = constrain ((3000 -rcData[AUX1] - axisPID[ROLL] + axisPID[PITCH]),1020,2000); // pitch servo
servo[1] = constrain (( rcData[AUX1] - axisPID[ROLL] - axisPID[PITCH]),1020,2000); // aileron servo
servo[2] = constrain (( rcData[AUX1]*2 -1500 + axisPID[PITCH]*2),1020,2000); //elevator servo
servo[4] = rcData[AUX1]; //Spare

rcData[AUX1] is the collective pitch signal
axisPID[ROLL] is the stick command inclusive of the gyro correction.

There is no assymetry in "roll" in this part of the code.
[B]
Since it's so easy to hook up the servos directly to the RX, surely it would make sense to test it that way, just to rule out any odd behaviours from the TX.

Your control settings seem to show the same values for the three cyclic servos. Is there another section that defines their actions, say for aileron inputs, where there will be no elevator servo movement, and elevator inputs, where, with a 120 degree swash, the aileron servo movements will be 50% of the elevator servo movement?
2Doggs is online now Find More Posts by 2Doggs
RCG Plus Member
Latest blog entry: Nano Tech 1800mah 4S 25-50c
Reply With Quote
Sign up now
to remove ads between posts
Old Mar 14, 2012, 09:50 AM
Winging it >
leadfeather's Avatar
Joined May 2006
9,727 Posts
Quote:
Originally Posted by 2Doggs View Post
Since it's so easy to hook up the servos directly to the RX, surely it would make sense to test it that way, just to rule out any odd behaviours from the TX.

Your control settings seem to show the same values for the three cyclic servos. Is there another section that defines their actions, say for aileron inputs, where there will be no elevator servo movement, and elevator inputs, where, with a 120 degree swash, the aileron servo movements will be 50% of the elevator servo movement?
I'll try the servo into the Rx idea and the Hamburger's GUI idea and see what happens.

As far as I know, there is only the section that integrates the gyro input into the stick command. It would actually be more difficult to make the roll movement assymetric.

The control settings look similar for the three servos but they are different. Here are some details of how the code works.

the "3000 - " is used to reverse the direction of a servo
The sign (+ or -) in front of the rcData[AUX1] and axispid[ROLL] and axispid[PITCH] change the direction of the servo movement to the particular input.
The value for rcData[AUX1] is multiplied by 2 for the elevator (rear) servo to compensate for the geometry of the swash to prevent collective changes induced by cyclic changes.
leadfeather is online now Find More Posts by leadfeather
Last edited by leadfeather; Mar 14, 2012 at 11:35 AM.
Reply With Quote
Old Mar 14, 2012, 10:54 AM
just gotta mess with it!
2Doggs's Avatar
North West Louisiana
Joined Nov 2009
4,848 Posts
Quote:
Originally Posted by leadfeather View Post
I'll try the servo into the Rx idea and the Hamburger's GUI idea and see what happens.

As far as I know, there is only the section that integrates the gyro input into the stick command. It would actually be more difficult to make the roll movement assymetric.

The control settings look similar for the three servos but they are different. Here are some details of how the code works.

the "3000 - " is used to reverse the direction of a servo
The sign (+ or -) in front of the rcData[AUX1] and axispid[ROLL] and axispid[ROLL] change the direction of the servo movement to the particular input.
The value for rcData[AUX1] is multiplied by 2 for the elevator (rear) servo to compensate for the geometry of the swash to prevent collective changes induced by cyclic changes.
The code seems remarkably concise!

What does the code for the PID stuff look like, as a matter of interest?

Hope you sort out the servo travel anomaly!
2Doggs is online now Find More Posts by 2Doggs
RCG Plus Member
Latest blog entry: Nano Tech 1800mah 4S 25-50c
Reply With Quote
Old Mar 14, 2012, 01:55 PM
Winging it >
leadfeather's Avatar
Joined May 2006
9,727 Posts
Quote:
Originally Posted by 2Doggs View Post
The code seems remarkably concise!

What does the code for the PID stuff look like, as a matter of interest?

Hope you sort out the servo travel anomaly!
That part of the code is pretty concise, the entire program is pretty long, many hundreds of lines.

I did the gui test to try to determine where the roll asymmetry is. Looks like the asymmetry is in the code ...somewhere.

Below is a snapshot of the GUI (graphic user interface) for tuning the pids and selecting other options. The values shown are my latest for the Wii Chopper.
leadfeather is online now Find More Posts by leadfeather
Reply With Quote
Old Mar 14, 2012, 02:30 PM
just gotta mess with it!
2Doggs's Avatar
North West Louisiana
Joined Nov 2009
4,848 Posts
Thanks for posting the pic. The GUI looks a bit more intimidating than commercial FBL software, but then I would guess it gives you access to everything! Hope you track down the glitch!
2Doggs is online now Find More Posts by 2Doggs
RCG Plus Member
Latest blog entry: Nano Tech 1800mah 4S 25-50c
Reply With Quote
Old Mar 14, 2012, 05:29 PM
Winging it >
leadfeather's Avatar
Joined May 2006
9,727 Posts
Quote:
Originally Posted by 2Doggs View Post
Thanks for posting the pic. The GUI looks a bit more intimidating than commercial FBL software, but then I would guess it gives you access to everything! Hope you track down the glitch!
A lot of the stuff on the gui is for the multicopters and FPV stuff. Once I get everything figured out on my build, adapting to other helicopters should be pretty easy.

Same goes for the firmware. It looks long and complicated, but a lot of the code isn't needed for a non-fpv helicopter.
leadfeather is online now Find More Posts by leadfeather
Reply With Quote
Old Mar 27, 2012, 09:08 PM
Winging it >
leadfeather's Avatar
Joined May 2006
9,727 Posts
Well after a couple of weeks of fumbling with code myself (and getting nowhere), I finally got smart and asked cass3825 to get everything straightened out for me. Now; using the standard MultiWii 1.9 code with the Chopper added in; everything works as it should and I can select autolevel on or off, and also adjust the amount of autolevel from the Tx. Yahoo! Now I can get back to tuning and trimming this Wii Chopper.
leadfeather is online now Find More Posts by leadfeather
Last edited by leadfeather; Mar 27, 2012 at 09:39 PM.
Reply With Quote
Old Mar 28, 2012, 10:25 AM
just gotta mess with it!
2Doggs's Avatar
North West Louisiana
Joined Nov 2009
4,848 Posts
Investment (controller, that is)

So as this project is reaching maturity, with a lot of the bugs worked out, it begs the age old question always asked by onlookers when you're flying a heli - how much does it cost mister?

(at least I didn't ask the other question, "how high does it go?".....)
2Doggs is online now Find More Posts by 2Doggs
RCG Plus Member
Latest blog entry: Nano Tech 1800mah 4S 25-50c
Reply With Quote
Old Mar 28, 2012, 11:07 AM
Registered User
USA, TX, Austin
Joined Jul 2003
304 Posts
How far away can you fly it?
brucewillman is offline Find More Posts by brucewillman
Reply With Quote
Old Mar 28, 2012, 11:10 AM
Registered User
Gloucester Ma
Joined Dec 2002
1,038 Posts
Also

Can I try it no really, I can fly a Heli.
A Monell is offline Find More Posts by A Monell
Reply With Quote
Old Mar 28, 2012, 11:16 AM
Winging it >
leadfeather's Avatar
Joined May 2006
9,727 Posts
Quote:
Originally Posted by 2Doggs View Post
So as this project is reaching maturity, with a lot of the bugs worked out, it begs the age old question always asked by onlookers when you're flying a heli - how much does it cost mister?

(at least I didn't ask the other question, "how high does it go?".....)
The Crius lite flight control board is $42
You need a "break out board" to be able to connect the Crius fcb to your computer, about $20

Software is free.
leadfeather is online now Find More Posts by leadfeather
Reply With Quote
Old Mar 28, 2012, 11:19 AM
Winging it >
leadfeather's Avatar
Joined May 2006
9,727 Posts
2Doggs ... it goes really high

brucewillman ... it can fly really far

A Monell ... you probably can, next time your in Kansas.
leadfeather is online now Find More Posts by leadfeather
Reply With Quote
Old Mar 29, 2012, 10:37 AM
Registered User
Gloucester Ma
Joined Dec 2002
1,038 Posts
Software?

I have all the hardware so I was really asking if I could try it
Is the software with your heli modifications available?
The only difference is that I will be using a belt tail (pro/sport type)
A Monell is offline Find More Posts by A Monell
Reply With Quote
Old Mar 29, 2012, 08:04 PM
Winging it >
leadfeather's Avatar
Joined May 2006
9,727 Posts
Quote:
Originally Posted by A Monell View Post
I have all the hardware so I was really asking if I could try it
Is the software with your heli modifications available?
The only difference is that I will be using a belt tail (pro/sport type)
Ahhh OK I understand now. Yes I'm more than happy to share.

I was doing a little tuning this evening and I found one more little glitch in the code that needs fixing. When I flip the switch for autolevel mode, two of the swash servos change there trim positions...enough t make it unflyable in the second mode when trimmed in the first. Once I get that glitch fixed, the code will be ready for another "test pilot/guinea pig". There is a line in the code already for your tail servo.

Which flight control board do you have? Do you have multicopter or multiwii experience?
leadfeather is online now Find More Posts by leadfeather
Reply With Quote
Old Mar 30, 2012, 10:00 PM
Registered User
Gloucester Ma
Joined Dec 2002
1,038 Posts
Thanks for the heads up

Leadfeather, I have the same mini board as you. I have no experience with quads at all, or their programming. I have a little experience with the USB interface as i have an "Openaltimiter" for my Alula sal glider.
I am in the process of setting up a FBL HK450 pro with a ALZRC-3GYS. So the project with the Multi Wii is a way out. I do have a copter-x SE-v2 waiting and an ALZRC fbl head. That heli should have a bit more room than a pro.
I look forward to trying this out and will follow this thread regularly.
Thanks, Alex (BTW love your YAK I've built half a dozen for myself and friends)
A Monell is offline Find More Posts by A Monell
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion ALZRC 450 Pro Flybarless with 3GYS Flybarless Gyro Brubache Mini Helis 49 Feb 04, 2012 10:00 PM
Discussion "Mutated " NE Solo Pro : Flybarless Head Experiment and Mod "Z" for faster FFFs EQMOD Micro Helis 13 Mar 04, 2011 02:05 PM
Discussion Wii motion plus, Flybarless stabilazion for Heli. NighthawkF-117 DIY Electronics 7 Sep 10, 2010 12:29 PM
Video Flybarless T-Rex experiment mmormota Electric Heli Talk 0 Jan 22, 2007 09:26 AM