LibrePilot Forum

Users => Vehicles - Helicopters => Topic started by: jwgera on March 29, 2017, 05:06:21 am

Title: Documentation for Librepilot on a helicopter
Post by: jwgera on March 29, 2017, 05:06:21 am
I am very frustrated in trying to set up my helicopter with Librepilot and cc3d atom.  I have referred to documentation and other user's setups but still have not succeeded. Documentation is very lacking. I believe I could figure it out if I could understand what all the setup functions do in Librepilot.  For instance what is the Collective bar in Vehicle-Basic Settings- Collective bar for when collective pass through is checked? There are many functions with little or no explanation of what they are for and how to use them. Another example is understanding the relationship between the Configuration-Input channels and the Configuration - Output channels. Where is the collective in each and roll 1 and roll 2?   Another is the throttle and collective curves, is there only one set or are there more for different modes?

Is there some documentation somewhere that can explain exactly what each function in Librepilot does and how it related to similar functions? I feel if I understood what each function does, I could get this working.

Thank you in advance
John
Title: Re: Documentation for Librepilot on a helicopter
Post by: daveapplemotors on March 29, 2017, 02:35:00 pm
Hey John,
Welcome to LP.

Yes, heli setup is daunting without any wizard. We try to make up for a lack of documentation with this forum one question at a time. I am sorry I am not a coder. Otherwise I would fix it. The coders are all flying multirotors these days. I have set up 3 @ 250 helis to fly well with LP.

And there is a serious bug in the swash leveling routine that leaves servos paralyzed. "Jerry save" is a work around.

What kind of heli are you setting up? PM me if you like.

input -- what your TX sends
output -- what the servos and ESC can use

collective -- curve2source == -1 ,-.5 ,0 ,.5 , 1 --gets you full positive and negative pitch for IU1 and IU2. Normal (or sport) set in your TX.

One really good thing about LP is arming==Set arming to "throttle off and left rudder" for instance. And leave it there. It is safer on the bench and a good thing when you are out flying. "Always armed" is dangerous and "never armed" is useless. Another is the ability to use different flight modes for comparison. You can test 2 or 3 sets of PIDs while airborne. 
Title: Re: Documentation for Librepilot on a helicopter
Post by: Mateusz on March 29, 2017, 03:30:01 pm
Contributions to wiki are welcome :)
Title: Re: Documentation for Librepilot on a helicopter
Post by: jwgera on March 29, 2017, 07:32:26 pm
Thank you David for your reply.

I have looked through several of your posts with advice but I guess I am missing some things
that are obvious to others.

eg. my tx is a Spectrum dx6i.  Should I use the airplane or the heli model type? some control boards
seem to say use the airplane since all the setting will be in the control board. What do I use with the cc3d?

My helli is a 250 ccpm generic brand. I have removed the gyro and installed the cc3d atom per cc3d wiring instructions.
If I am to use the tx heli setup, how far do I go in a traditional tx setup and how much is done in Librepilot?

Thank you
John

Title: Re: Documentation for Librepilot on a helicopter
Post by: daveapplemotors on March 30, 2017, 01:46:58 pm
Use heli mode in TX. Setup LP with defaults in TX, NO expo, D/R, tail mix; be sure throttle and pitch curves are factory defaults. AND before you fly change to: normal pitch (45, 47, 50, 75, 100), and throttle (for normal, IU1 and IU2), EXpo and dual rates to your preferences, and I use tail mix, too.

I hope that helps a bit.
Title: Re: Documentation for Librepilot on a helicopter
Post by: karla on March 31, 2017, 03:56:53 am
Contributions to wiki are welcome :)

Does anyone know if someone is working on a next version Heli wiki?
Title: Re: Documentation for Librepilot on a helicopter
Post by: utoedter on March 31, 2017, 08:34:00 pm
I am very frustrated in trying to set up my helicopter with Librepilot and cc3d atom.  I have referred to documentation and other user's setups but still have not succeeded. Documentation is very lacking. I believe I could figure it out if I could understand what all the setup functions do in Librepilot.  For instance what is the Collective bar in Vehicle-Basic Settings- Collective bar for when collective pass through is checked? There are many functions with little or no explanation of what they are for and how to use them. Another example is understanding the relationship between the Configuration-Input channels and the Configuration - Output channels. Where is the collective in each and roll 1 and roll 2?   Another is the throttle and collective curves, is there only one set or are there more for different modes?

Is there some documentation somewhere that can explain exactly what each function in Librepilot does and how it related to similar functions? I feel if I understood what each function does, I could get this working.

Thank you in advance
John

Hey John,

I wrote a tutorial in german, but via google translate it shall be readable in english. Have a look here:

https://frickelnundmehr.wordpress.com/startseite/trex-clone-und-cc3d/

Happy flying

Title: Re: Documentation for Librepilot on a helicopter
Post by: jairbj on March 31, 2017, 10:37:09 pm
Hey John,
Welcome to LP.

Yes, heli setup is daunting without any wizard. We try to make up for a lack of documentation with this forum one question at a time. I am sorry I am not a coder. Otherwise I would fix it. The coders are all flying multirotors these days. I have set up 3 @ 250 helis to fly well with LP.

And there is a serious bug in the swash leveling routine that leaves servos paralyzed. "Jerry save" is a work around.

What kind of heli are you setting up? PM me if you like.

input -- what your TX sends
output -- what the servos and ESC can use

collective -- curve2source == -1 ,-.5 ,0 ,.5 , 1 --gets you full positive and negative pitch for IU1 and IU2. Normal (or sport) set in your TX.

One really good thing about LP is arming==Set arming to "throttle off and left rudder" for instance. And leave it there. It is safer on the bench and a good thing when you are out flying. "Always armed" is dangerous and "never armed" is useless. Another is the ability to use different flight modes for comparison. You can test 2 or 3 sets of PIDs while airborne.

Hi friend, could you share your PIDs? I'm paining to configure my walkera v200d03 with LP.

I'm also suffering for a strange yaw behavior. If I takeoff without change the yaw stick it maintains the yaw very well (axis lock on yaw) but if I pull the yaw stick to the right, when I release the yaw start to rotate to the opposite way until I land it.
Title: Re: Documentation for Librepilot on a helicopter
Post by: daveapplemotors on March 31, 2017, 11:46:25 pm
https://forum.librepilot.org/index.php?topic=557.0

Here is a link to where we post our UAV files . "Post your UAV files here".


PIDs are down buried in the StabilizationSettingsBanks -- you have 3 to play with. Usually Stab..Bank1 is the best flying. You will find many different settings

  <object name="StabilizationSettingsBank1" id="0xF03FDBA2">

            <field values="4,2.0999999,50" name="RollPI"/>
            <field values="5,2.5999999,50" name="PitchPI"/>
            <field values="3,1.39999998,50" name="YawPI"/>
Title: Re: Documentation for Librepilot on a helicopter
Post by: jwgera on April 01, 2017, 05:31:35 am
Ok, I am starting from the beginning and trying to incorporate what I have learned.
If the experts see something wrong --- let me know.


step 1   after installation of cc3d, receiver, esc, Blades off, etc

ESC setup:
brake:on
Battery type: lipo
CutoffType: cut off
Cutoff voltage : middle
Startmode:soft
Timeing mode : low
Governormode: on

step 2  Tx initial setup:
Spektrum dx6i transmitter set to:
New model: Helicopter
d/r expo 0&1: 100% inh
Travel adj : 100%
sub trim: 0
Gyro: inh
Throttle curve =default (all 1-> 100 except throttlehold=0)
Pitch curve = default   (all 1-> 100)
SwashMix 60,60,60
mix1=inh
mix2=inh
revo mix:0
reverse=no
swashtype:ccpm120
Throttle cut =inh
d/r combo=inh
bind tx to rx


Step 3    Librepilot setup:
connect to computer usb and mainport
Upgrade firmware (erase all setting)
select pwm
cancel wizard
lp:configuration-Vehicle - select helicopter
   basic settings:
   servow ch1, servox ch2, servoy ch3, tail ch4, engine ch5
   swashplate w=180 x=300 y=60
   collective Pss throught checked
lp:configuation-Attitude: level helicopter
lp:configuration-Input
   set channels 1,2,3,4,5,1
   Manual Calibration (move slowly)
   Reverse to match desired tx stick directions
lp:configuration-Ouput
   set min and max (narrower to allow collective travel and min and max)
   use slider bar to set mid points

TBCont

...More on next post....
Title: Re: Documentation for Librepilot on a helicopter
Post by: daveapplemotors on April 01, 2017, 01:36:56 pm
Hey John,

I am not sure if "swashtype:ccpm120" is the correct setting. On my DX6 (black) the swash type is "Normal".

Re GCS:

For fine settings like swash leveling and PIDs I do not use the GCS.
Instead I edit the UAV directly. It's faster, too. Near the top of this 10 page document is "Actuator Settings"--I spend a  lot of time here fiddling with servo limits and zero pitch. Just don't wreck a lipo spending too much time like I did once...

PIDs are down about two thirds of the way down the document under "StabilizationSettingsBank1" and 'bank2' and 'bank3'. Use all three banks. Switch back and forth for comparison.
Title: Re: Documentation for Librepilot on a helicopter
Post by: jwgera on April 01, 2017, 07:56:28 pm
David,

ref: "I am not sure if "swashtype:ccpm120" is the correct setting. On my DX6 (black) the swash type is "Normal".

This brings up my original question about what each tx and cc3d settings do. Which setting are used
and which are ignored. ie is swashplate type used from the tx or from cc3d)  Same question for all the other settings. Which ones count and which ones do we ignore.

I am wondering if the swash plate type matters in the tx since ccpm 120 is defined in LP-configuration-Vehicle-Basic settings.  According to http://www.rchelicopterfun.com/ccpm.html , It would matter in a conventional helicopter setup, but since the CC3D is doing the work, I suspect it is ignored.
Have you tried setting the tx to ccpm120 and discovered any difference?

What do you think?

John
Title: Re: Documentation for Librepilot on a helicopter
Post by: jwgera on April 01, 2017, 08:49:19 pm
Here is my updated and continuing post of my setup.

Setup:
install cc3d, ecs, receiver
********************
Spektrum dx6i transmitter set to:
New model: Helicopter
d/r expo 0&1: 100% inh
Travel adj : 100%
sub trim: 0
Gyro: inh
Throttle curve =default (all 1-> 100 except throttlehold=0)
Pitch curve = default   (all 1-> 100)
SwashMix 60,60,60
mix1=inh
mix2=inh
revo mix:0
reverse=no
swashtype:ccpm120 (I don't believe this is used)
Throttle cut =inh
d/r combo=inh
bind tx to rx
************************
ESC setup:
brake:on
Battery type: lipo
CutoffType: cut off
Cutoff voltage : middle
Startmode:soft
Timing mode : low
Governormode: on
************************
Librepilot setup
connect to computer usb and mainport
Upgrade firmware (erase all setting)
select pwm
cancel wizard
lp:configuration-Vehicle - select helicopter
   basic settings:
   SwashplateConfig:  ccpm 3 servo 120
   servow ch1, servox ch2, servoy ch3, tail ch4, engine ch5
   swashplate w=180 x=300 y=60
   collective Pass throught checked
    Collective, Pitch, Roll Slide bars all set at 50%  (not sure of their purpose)
lp:configuation-Attitude: level
lp:configuration-Input
   set channels 1,2,3,4,5,1
   Manual Calibration (move slowly)
   Reverse to match tx stick directions
lp:configuration-Ouput
   set min and max (narrower to allow collective travel at min and max)
   use slider bar to set mid points
lp:configuration-Vehicle-Swashplate Leveling
   Start  note: use notepad to create the values and paste whole humber in to avoid
                damaging the servos with out of range values while typing them in)
   Neutral Leveling: Change values till level at mid point of collective travel
   continue wizard and change leveling values for max and min positions.
   (select SwashplateConfig  "ccpm 3 servo 140", then "ccpm 3 servo 120" and save)

Test tx movements perform correct movements of swashplate and rudder.
Manually hold helicopter and rotate helicopter in each direction to varify that
the rudder and swashplate are moving in the direction to bring the helicopter back
to its original position.

tbc

Title: Re: Documentation for Librepilot on a helicopter
Post by: daveapplemotors on April 01, 2017, 09:20:58 pm
Wow. Am I reading that right? You got it so everything works? servos react the right directions when you rotate the heli?

Good luck on flying. Use conservative PIDs at first. I used low headspeeds to start with. But you gotta increase PIDs with headspeed so maybe it's better to start with target headspeed. Make sure it hovers neutrally to begin; set it perfectly mechanically.
Title: Re: Documentation for Librepilot on a helicopter
Post by: jwgera on April 02, 2017, 12:07:12 am
David,

Yes servos move in the right direction.  I just need to set "something" to get swashplate travels correct.

That is:  collective blade pitch -12 to +12,      cyclic blade pitch and blade roll  from  -7 to +7 degrees

Conventionally that would be set in the swash mix on the transmitter.  I don't know where to
set these in LP.

Oh I just think it dawned on me that perhaps it would be set in LP: Configuration-Vehicle- BasicSetting
on the Collective, pitch,roll slide bars.  Is that right?


John

Title: Re: Documentation for Librepilot on a helicopter
Post by: daveapplemotors on April 02, 2017, 02:11:58 am
Right now if you have servos moving is a good time to use only the UAV file. I think it is easier than the GCS for this fine tuning. You can make one small change without going through the whole swash leveling routine. "import" a modified UAV file on the "system" page.

Another reason not to use the swash leveling routine is the frightening speeds that it moves the servos. Glad you got them the right directions.   

Change a setting in Acutaltorsettings (near the top of the UAV)  Channels 1,2,and 3 work the swash. Change channel max on those to raise swash at the top. Change one to tilt it. Change all three channel min to lower it.
 
 <object name="ActuatorSettings" id="0xD2AD60A2">
            <field values="0,50,50,50,0,0" name="BankUpdateFreq"/>
            <field values="1895,1091,1852,1084,1996,1000,1000,1000,1000,1000,1000,1000" name="ChannelMax"/>
            <field values="1526,1420,1549,1522,1107,1000,1000,1000,1000,1000,1000,1000" name="ChannelNeutral"/>
            <field values="1186,1795,1217,1778,1103,1000,1000,1000,1000,1000,1000,1000" name="ChannelMin"/>
Title: Re: Documentation for Librepilot on a helicopter
Post by: jwgera on April 03, 2017, 12:42:26 am
I tried changing the Swash Type to see if it made a difference and it did.

After rethinking all this, I plan on starting again with the premise that everything is setup
and controlled by the tx and passed through the cc3d.  The purpose of the cc3d is to
keep the helicopter stable, Same as the gyro in the conventional setup but the cc3d stabilizes
pitch, roll, and yaw.  The tx is also needed for multiple pitch and throttle curves since cc3d has
only one set of curves.

However: My continued effort in the direction is on hold right now. Librepilot stopped working for my quad
and after attempting to reload Librepilot, I do not have a working system for both my quad and copter.

So till I get back to a working system, this heli setup effort is on hold.
Title: Re: Documentation for Librepilot on a helicopter
Post by: jwgera on April 11, 2017, 12:21:15 am
ok continuing on:

It seems to me that you can't set everything in the tx and use the fc for just stablilizing since it looks like there is no way to pass the fc swashplate configuration.  Therefore I am back to swash type 90 degrees in the tx with no swash mix and setting everything in the fc.

I was able to set the max, min, and neutral positions on the fc swashplate by using the Config-output page and then verifying the travel in the swashplate leveling routine. The collector slider bar was adjusted also, however I never did figure out what it is doing.  I got +- 12 degrees on the collector mostly by accident.

What is the purpose of the collector slider bar in config-vehicle-basicSettings?

I need to setup the roll and pitch cyclic to +- 7 degrees.   How is that done?

What is the purpose of the roll/pitch slider bars in config-vehicle-basicSettings?

I have tried moving them and I can not see any logic to how the change the collector and cyclic extents.

Has anyone figured this out?
Title: Re: Documentation for Librepilot on a helicopter
Post by: daveapplemotors on April 11, 2017, 03:27:12 pm
It sounds to me like you are doing pretty well with the setup.

The slider for collective controls the total collective. But I use the Stabilization / Advanced pages. I can set PIDs easily there.

Config / OUtput is a good way to set max. min. and neutral. I try to have neutral near 1522 for each servo. The swash leveling routine is limiting. I use System / Settings / Actuator Settings / [min.max and neutral to change and save via the red arrow at the top of the page. That way I don't go through the whole swash routine to change just one parameter.   

If you want to have good strong pitch (say 13 degrees) and have 7 degree aileron and elevator then use mild settings in Stabilization.

The roll / pitch sliders -- roll - pitch - yaw factors?  I don't know either. Probably some simplification for multirotor tuning.
Title: Re: Documentation for Librepilot on a helicopter
Post by: jwgera on April 12, 2017, 07:33:40 pm
David,
Thank you for your diligence in responding to questions on this forum.

"If you want to have good strong pitch (say 13 degrees) and have 7 degree aileron and elevator then use mild settings in Stabilization."    I don't see mild settings in Stabilization.

" But I use the Stabilization / Advanced pages. I can set PIDs easily there. "  I don't understand what PIDs have to do with setting pitch to 13 degrees and ali/ele to 7 degrees.

The slider for collective seems to  go from 0 (wide collector travel) to 50 (no collector travel) to 100(wide collector travel)
I still don't understand it. It seems like config-output values also define collector travel?

John

Title: Re: Documentation for Librepilot on a helicopter
Post by: karla on April 12, 2017, 11:15:42 pm
The slider for collective seems to  go from 0 (wide collector travel) to 50 (no collector travel) to 100(wide collector travel)
I still don't understand it. It seems like config-output values also define collector travel?

Hi John, the way I always understood this is that the Config output control the end points, the total range of the channel while the Collective slider in Vehicle, Heli, Basic setting control how much of that total range should be used. The 3 sliders Collective, Roll and Pitch control the mixing.
Its easier to figure it all out if you make some changes for example in the Pitch slider up and down and then look how the table at Vehicle, Heli, Advanced settings changes. That table is the net effect of all these GUI sliders.

I admire your perseverance :) Soon there!
Title: Re: Documentation for Librepilot on a helicopter
Post by: jwgera on April 13, 2017, 04:12:40 am
Thank you Karla,

That is the best explanation I have seen concerning these settings.

So I should use config-output to set the max/min swashplate travel
and slide the eli, roll 1, roll2 bars on config-output to a mid value.
verify the swashplate travel in config-vehicle-Swasplateleveling.

next move the Collector slidebar in config-vehicle-basicSettings to get +- 12 degrees on the collector
this will change the Curve2 values in config-vehicle-advancedSettings
It seems that I can get +-12 degrees with 41 41 41 or 77 77 77.  What do I want?

And get the +-7 degrees for roll with the pitch and roll sliders in config-vehicle-basicSettings
(what kind of values should I see in config-vehicle-advanceSettings?
I guess I am not sure what I am looking for.
There seems to be two places I can get 7 degrees.

John
Title: Re: Documentation for Librepilot on a helicopter
Post by: karla on April 14, 2017, 04:39:44 am
I think you are on to it now John

It seems that I can get +-12 degrees with 41 41 41 or 77 77 77. 
What do I want?
I suspect that in your transmitter you have a collective curve right now that is not linear from 0 to full?

You need that linear curve in you TX for collective as well as for throttle while you are setting the heli up. When that is completed you change it to back to the characteristic heli curves that will give you hover at around mid throttle stick. I always forget this when I do this routine.

The numbers in the Advanced setting table does not matter, but your achievement of +-12 degrees does.
(They are integers from 0 to 127 where 0% of the slider would result in the number 0, 100% would result in 127 and 50% in 63.)

And get the +-7 degrees for roll with the pitch and roll sliders in config-vehicle-basicSettings
what kind of values should I see in config-vehicle-advanceSettings?
Again, don't worry about that table, use the sliders if you like, when you have +- 7degrees of pitch respectively roll you are good to go!

btw I think Dave in the previous post just gave a tips that if you are setting any heli up with large collective (like you do), then you should have lower PIDs settings in general than if you had set it up with a smaller collective range. That make sense to me.
Title: Re: Documentation for Librepilot on a helicopter
Post by: jwgera on April 14, 2017, 06:03:18 am
Thanks to everyone.

Perhaps when I get it finished to my satisfaction I will post the proceedure for others,

John
Title: Re: Documentation for Librepilot on a helicopter
Post by: karla on April 14, 2017, 06:18:20 am
John, that would be really good.
We could update the Heli Wiki to make it easier for followers.
If you want to do it I promise to help you. But alone its too daunting a task. Maybe Dave would join and other Heli freaks as well...
/Karl
Title: Re: Documentation for Librepilot on a helicopter
Post by: daveapplemotors on April 14, 2017, 11:32:58 am
I am happy to help. I am glad you are here too, Karla. Setting up helis IS daunting by itself. An orderly procedure might help others immensely. 

I just got a small notebook and want to try the Android (bluetooth) connection again. 
Title: Re: Documentation for Librepilot on a helicopter
Post by: jwgera on April 15, 2017, 12:03:31 am
Dave,

FYI,   I have tried the android Librepilot beta.   I have modified the pids in the app and then gone to the pids using the pc interface and found they DID NOT change.

The app makes it look like they were changed when you upload and then download, but I would not trust it.

John
Title: Re: Documentation for Librepilot on a helicopter
Post by: jwgera on April 15, 2017, 05:36:49 am
ok here is my first draft.  Check it out and comment or indicate corrections of enhancements.



Setup:
Assemble Quadcopter
remove gyro if installed
Connect receiver to servos
********************
Spektrum dx6i transmitter setup:
New model: Helicopter
d/r expo 0 100% inh
    1 100% inh
Travel adj : 100%
   1 Throttle
   2 elevator
   3 aileron
   4 rudder
   5 Gear - used for fmode
   6 Flap - used as collector
sub trim: 0
Gyro: inh
Throttle curve =default (all 1 to 100 except throttlehold=0)
Pitch curve = default   (all 1 to 100)
SwashMix inh
mix1=inh
mix2=inh
revo mix:0
reverse=set directions as desired
swashtype:90
Throttle cut =inh
d/r combo=inh
bind tx to rx
center servos
turn off tx
*********************
mechanically Center swashplate
   After Servos were set at midpoint using tx
        Swashplate at mid point
   connect servo arms close to horizontal (Adjust control rod lengths if necessary)
**********************
disconnect servos from receiver
connect cc3d flight controller
************************
ESC setup:(use instructions beeps, or esc programmer) blades removed
brake:on
Battery type: lipo
CutoffType: cut off
Cutoff voltage : middle
Startmode:soft
Timing mode : low
Governormode: on
************************
Librepilot setup
connect to computer usb and mainport
Upgrade firmware (erase all setting)
select pwm or what applies to your setup
cancel wizard
lp:configuration-Vehicle
   select helicopter
lp:configuration-Vehicle - basic settings:
   SwashplateConfig:  ccpm 3 servo 120
   servow ch1, servox ch2, servoy ch3, tail ch4, engine ch5
   swashplate w=180 x=300 y=60
   collective Pass throught checked
    Collective, Pitch, Roll Slide bars all set at initally at 50%
level flight controller
   lp:configuation-Attitude: see https://librepilot.atlassian.net/wiki/display/LPDOC/CC+Attitude+Configuration

Turn on Tx and battery to Helicopter
lp:configuration-Input
   set channels 1,2,3,4,5,6
   Manual Calibration (move slowly)
lp:configuration-Ouput
   Check directions of all servos
   Reverse if needed so swashplate moves in desired directions

   Setting swashplate travel as collector
       (use lp:configuration-Ouput not lp:configuration-Vehicle-Swashplate Leveling)
   set min and max (narrower than values from lp:configuration-Input to allow cyclic travel at min and max)
   recommend -150 for each (eg if you have 950 - 1900  use 800 - 1750)
   use slider bar on Config-output to set mid points
   test min, mid and max using pitch gauge
        adjust values here for collector pitch control +- 12 Degrees
   increase/decrease min and max values to get +-12degrees
   adjust mid to get 0 degrees at half throttle

   Note: if a change is made on Config-vehicle (select ccpm3servo 140),
         then select ccpm3 servo 120
         Save    (bug in program is corrected with this process)

   To adjust for cyclic blade pitch of +-7 degrees:
   use the Pitch slidebar on config - vehicle-BasicSettings
   Start at 50% and increase for wider spread, decrease for smaller spread
   Note: Values above 90 and below 10 seem non linear.
   
   Repeat process with Roll slidebar for roll +- 7 degrees

*******************
Manually hold helicopter and rotate helicopter in each direction to varify that
the rudder and swashplate are moving in the direction to bring the helicopter back
to its original position.
*******************

Config-Input-ArmingSettings:  recommend set arming Yaw Right

*******************



Setting the throttle and pitch curves
   Set these up in the tx

  ???????  Is there anything needed so the fc will use these and
   not the curves in the fc ?????????????







*******************
Set PID Values:

Config-Stabilization-Advanced- Rate stabilization (inner loop)
Suggested initial values:
p= roll=0.002  Pitch=0.0045  Yaw= .005
i= 0, 0, 0
d= 0, 0, 0

Proceedure:
   1) increase values of p in roll until high frequency oscillation occurs then back off some
      Repeat for pitch (P Determines the amount of control by the human)

   2) Increase I until low frequency oscillation and then back off for pitch and roll
      If I is correct helicopter should stay in tilled position with the joystick
      (influences the percision of the angular position)

   3) D is a damening term which reduces over-correction caused by P





Title: Re: Documentation for Librepilot on a helicopter
Post by: TheOtherCliff on April 15, 2017, 11:06:18 am
Before connecting battery for the first time, maybe remove main gear or unmount main motor?  :)  With all the different setups and people out there, there may be a case where motor starts up at some point.  Don't electrically disconnect it so you can tell if it starts running, but running does not spin the blades.
Title: Re: Documentation for Librepilot on a helicopter
Post by: daveapplemotors on April 15, 2017, 12:44:37 pm
Good write-up.

Add that checking the servo direction for reaction is tricky for two reasons:
#1 the default yaw rate is 220, and the default flip/roll rate is also 220. Change these to a livelier 540 degrees per second and you will see movement from cyclics better.
#2 sometimes the movement is so fast that you can't be sure. To be sure I put my finger between the gear and the the lever to feel the servo. I can do that better than seeing.

Change these rates in Stabilization / Basic / Rate Yaw and Rate or Stabilization / Advanced / Rate mode response & Maximum rate limit.

And about Libre Pilot Beta: can you save only with ESC disarmed?
Title: Re: Documentation for Librepilot on a helicopter
Post by: TheOtherCliff on April 15, 2017, 04:31:25 pm
Yes, you can only save FC settings with FC disarmed.
Title: Re: Documentation for Librepilot on a helicopter
Post by: jwgera on April 15, 2017, 06:39:07 pm
Thank you guys for the feedback.  I incorporated them below.

You didn't respond on the section regarding using the tx throttle and pitch curves.
Is there anything needed so the fc will use these and not the curves in the fc?

As a side note on Android Librepilot, I did disarm but my values didn't get permanently stored
on the fc.  I think I may be having a connection problem. It did save on one of my attempts.
I will have to dig deeper to find the problem I am having there.

******************************
Revised version:

Setup:
Assemble Quadcopter
remove gyro if installed
Connect receiver to servos
Note: It is recommended that the motor is not attached mechanically to
      the helicopter during setup to avoid an unexpected rotor spin up
********************
Spektrum dx6i transmitter setup:
New model: Helicopter
d/r expo 0 100% inh
    1 100% inh
Travel adj : 100%
   1 Throttle
   2 elevator
   3 aileron
   4 rudder
   5 Gear - used for fmode
   6 Flap - used as collector
sub trim: 0
Gyro: inh
Throttle curve =default (all 1 to 100 except throttlehold=0)
Pitch curve = default   (all 1 to 100)
SwashMix inh
mix1=inh
mix2=inh
revo mix:0
reverse=set directions as desired
swashtype:90
Throttle cut =inh
d/r combo=inh
bind tx to rx
center servos
turn off tx
*********************
mechanically Center swashplate
   After Servos were set at midpoint using tx
        Swashplate at mid point
   connect servo arms close to horizontal (Adjust control rod lengths if necessary)
**********************
disconnect servos from receiver
connect cc3d flight controller
************************
ESC setup:(use instructions beeps, or esc programmer) blades removed
brake:on
Battery type: lipo
CutoffType: cut off
Cutoff voltage : middle
Startmode:soft
Timing mode : low
Governormode: on
************************
Librepilot setup
connect to computer usb and mainport
Upgrade firmware (erase all setting)
select pwm or what applies to your setup
cancel wizard
lp:configuration-Vehicle
   select helicopter
lp:configuration-Vehicle - basic settings:
   SwashplateConfig:  ccpm 3 servo 120
   servow ch1, servox ch2, servoy ch3, tail ch4, engine ch5
   swashplate w=180 x=300 y=60
   collective Pass throught checked
    Collective, Pitch, Roll Slide bars all set at initally at 50%
level flight controller
   lp:configuation-Attitude: see https://librepilot.atlassian.net/wiki/display/LPDOC/CC+Attitude+Configuration

Turn on Tx and battery to Helicopter
lp:configuration-Input
   set channels 1,2,3,4,5,6
   Manual Calibration (move slowly)
lp:configuration-Ouput
   Check directions of all servos
   Reverse if needed so swashplate moves in desired directions

   Setting swashplate travel as collector
       (use lp:configuration-Ouput not lp:configuration-Vehicle-Swashplate Leveling)
   set min and max (narrower than values from lp:configuration-Input to allow cyclic travel at min and max)
   recommend -150 for each (eg if you have 950 - 1900  use 800 - 1750)
   use slider bar on Config-output to set mid points
   test min, mid and max using pitch gauge
        adjust values here for collector pitch control +- 12 Degrees
   increase/decrease min and max values to get +-12degrees
   adjust mid to get 0 degrees at half throttle

   Note: if a change is made on Config-vehicle (select ccpm3servo 140),
         then select ccpm3 servo 120
         Save    (bug in program is corrected with this process)

   To adjust for cyclic blade pitch of +-7 degrees:
   use the Pitch slidebar on config - vehicle-BasicSettings
   Start at 50% and increase for wider spread, decrease for smaller spread
   Note: Values above 90 and below 10 seem non linear.
   
   Repeat process with Roll slidebar for roll +- 7 degrees

*******************
Manually hold helicopter and rotate helicopter in each direction to varify that
the rudder and swashplate are moving in the direction to bring the helicopter back
to its original position.
Note: This may be hard to detect if in Config-Stabilization-Basic-Responsiveness- Rate and RateYaw:
    #1 are set to the default 220.  Change these to a livelier 540 degrees per second and you will
       see movement from cyclics better.

    #2 sometimes the movement is so fast that you can't be sure. To be sure you can put
       your finger between the gear and the the lever to feel the servo. That can be
       better than seeing it move.

*******************

Config-Input-ArmingSettings:  recommend set arming Yaw Right

*******************


Setting the throttle and pitch curves
   Set these up in the tx

  ???????  Is there anything needed so the fc will use these and
   not the curves in the fc ?????????????


*******************


Mount the motor if it was removed during setup

*******************
Set PID Values:

Config-Stabilization-Advanced- Rate stabilization (inner loop)
Suggested initial values:
p= roll=0.002  Pitch=0.0045  Yaw= .005
i= 0, 0, 0
d= 0, 0, 0

Proceedure:
   1) increase values of p in roll until high frequency oscillation occurs then back off some
      Repeat for pitch (P Determines the amount of control by the human)

   2) Increase I until low frequency oscillation and then back off for pitch and roll
      If I is correct helicopter should stay in tilled position with the joystick
      (influences the percision of the angular position)

   3) D is a damening term which reduces over-correction caused by P




Title: Re: Documentation for Librepilot on a helicopter
Post by: karla on April 16, 2017, 02:54:19 am
Nice process description John.

Well the thing to make the curves from the TX go to the servos untampered with by the FC is handled by the text you already have in there:
collective Pass throught checked

You may consider to change the word collector to collective? you use that at several places...
The process seem logical when reading it, I think when really following it while setting a heli up would put it to the test.

@admin, if we like to change the wiki for heli, How do we go about that?

Best
/Karl
Title: Re: Documentation for Librepilot on a helicopter
Post by: jwgera on April 16, 2017, 06:11:14 am
Ok here it is with the latest updates.  I embellished the part where the throttle and pitch
curves are modified.  Check it out. I never actually tried the governor mode.

If this is good enough, what do we do now to share it with others?

Thanks,

John



Setup:
Assemble Quadcopter
remove gyro if installed
Connect receiver to servos
Note: It is recommended that the motor is not attached mechanically to
      the helicopter during setup to avoid an unexpected rotor spin up
********************
Spektrum dx6i transmitter setup:
New model: Helicopter
d/r expo 0 100% inh
    1 100% inh
Travel adj : 100%
   1 Throttle
   2 elevator
   3 aileron
   4 rudder
   5 Gear - used for fmode
   6 Flap - used as collective
sub trim: 0
Gyro: inh
Throttle curve =default (all 1 to 100 except throttlehold=0)
Pitch curve = default   (all 1 to 100)
SwashMix inh
mix1=inh
mix2=inh
revo mix:0
reverse=set directions as desired
swashtype:90
Throttle cut =inh
d/r combo=inh
bind tx to rx
center servos
turn off tx
*********************
mechanically Center swashplate
   After Servos were set at midpoint using tx
        Swashplate at mid point
   connect servo arms close to horizontal (Adjust control rod lengths if necessary)
**********************
disconnect servos from receiver
connect cc3d flight controller
************************
ESC setup:(use instructions beeps, or esc programmer) blades removed
brake:on
Battery type: lipo
CutoffType: cut off
Cutoff voltage : middle
Startmode:soft
Timing mode : low
Governormode: on
************************
Librepilot setup
connect to computer usb and mainport
Upgrade firmware (erase all setting)
select pwm or what applies to your setup
cancel wizard
lp:configuration-Vehicle
   select helicopter
lp:configuration-Vehicle - basic settings:
   SwashplateConfig:  ccpm 3 servo 120
   servow ch1, servox ch2, servoy ch3, tail ch4, engine ch5
   swashplate w=180 x=300 y=60
   collective Pass throught checked
    Collective, Pitch, Roll Slide bars all set at initally at 50%
level flight controller
   lp:configuation-Attitude: see https://librepilot.atlassian.net/wiki/display/LPDOC/CC+Attitude+Configuration

Turn on Tx and battery to Helicopter
lp:configuration-Input
   set channels 1,2,3,4,5,6
   Manual Calibration (move slowly)
lp:configuration-Ouput
   Check directions of all servos
   Reverse if needed so swashplate moves in desired directions

   Setting swashplate travel as collective
       (use lp:configuration-Ouput not lp:configuration-Vehicle-Swashplate Leveling)
   set min and max (narrower than values from lp:configuration-Input to allow cyclic travel at min and max)
   recommend -150 for each (eg if you have 950 - 1900  use 800 - 1750)
   use slider bar on Config-output to set mid points
   test min, mid and max using pitch gauge
        adjust values here for collective pitch control +- 12 Degrees
   increase/decrease min and max values to get +-12degrees
   adjust mid to get 0 degrees at half throttle

   Note: if a change is made on Config-vehicle (select ccpm3servo 140),
         then select ccpm3 servo 120
         Save    (bug in program is corrected with this process)

   To adjust for cyclic blade pitch of +-7 degrees:
   use the Pitch slidebar on config - vehicle-BasicSettings
   Start at 50% and increase for wider spread, decrease for smaller spread
   Note: Values above 90 and below 10 seem non linear.
   
   Repeat process with Roll slidebar for roll +- 7 degrees

*******************
Manually hold helicopter and rotate helicopter in each direction to varify that
the rudder and swashplate are moving in the direction to bring the helicopter back
to its original position.
Note: This may be hard to detect if in Config-Stabilization-Basic-Responsiveness- Rate and RateYaw:
    #1 are set to the default 220.  Change these to a livelier 540 degrees per second and you will
       see movement from cyclics better.

    #2 sometimes the movement is so fast that you can't be sure. To be sure you can put
       your finger between the gear and the the lever to feel the servo. That can be
       better than seeing it move.

*******************
Config-Input-ArmingSettings:  recommend set arming Yaw Right
*******************
Go to your tx and modify the throttle and pitch curves
Suggested curves:
   Throttle
   Normal mode:     0 40 70 90 100
   Idle Up (stunt): 100 90 80 90 100

   Pitch
   Normal mode:      48 49 50 75 100
   Idle Up (stunt):  0 25 50 75 100

Using Governor
   throttle curves:
      Normal mode:     0 40 70 75 75
      Idle Up (stunt): 75 75 75 75 75

See video:  https://www.youtube.com/watch?v=lCegXUbGzIk

*******************
Mount the motor if it was removed during setup
*******************
Set PID Values:
Config-Stabilization-Advanced- Rate stabilization (inner loop)
Suggested initial values:
p= roll=0.002  Pitch=0.0045  Yaw= .005
i= 0, 0, 0
d= 0, 0, 0

Proceedure:
   1) increase values of p in roll until high frequency oscillation occurs then back off some
      Repeat for pitch (P Determines the amount of control by the human)

   2) Increase I until low frequency oscillation and then back off for pitch and roll
      If I is correct helicopter should stay in tilled position with the joystick
      (influences the percision of the angular position)

   3) D is a damening term which reduces over-correction caused by P




Title: Re: Documentation for Librepilot on a helicopter
Post by: daveapplemotors on April 16, 2017, 12:29:44 pm
Looks like your work is pretty much ready to post to the Wiki and as another thread here--Like it is!

Good job!

Maybe a little clearer on the "Jerry Save":
 Note: if a change is made on Config-vehicle (select ccpm3servo 140), [ADD a save HERE]
         then select ccpm3 servo 120  [then another save HERE]       
             (bug in program is worked around with this process)
Else the servos freeze.
Title: Re: Documentation for Librepilot on a helicopter
Post by: jwgera on April 16, 2017, 10:33:30 pm
Thanks David,

I will incorporate that; however I have found that you don't need to save the 140, just selecting it and then selecting 120 and has always worked for me.

John


here it is with latest modifications. 



Setup:
Assemble Quadcopter
remove gyro if installed
Connect receiver to servos
Note: It is recommended that the motor is not attached mechanically to
      the helicopter during setup to avoid an unexpected rotor spin up
********************
Spektrum dx6i transmitter setup:
New model: Helicopter
d/r expo 0 100% inh
    1 100% inh
Travel adj : 100%
   1 Throttle
   2 elevator
   3 aileron
   4 rudder
   5 Gear - used for fmode
   6 Flap - used as collective
sub trim: 0
Gyro: inh
Throttle curve =default (all 1 to 100 except throttlehold=0)
Pitch curve = default   (all 1 to 100)
SwashMix inh
mix1=inh
mix2=inh
revo mix:0
reverse=set directions as desired
swashtype:90
Throttle cut =inh
d/r combo=inh
bind tx to rx
center servos
turn off tx
*********************
mechanically Center swashplate
   After Servos were set at midpoint using tx
        Swashplate at mid point
   connect servo arms close to horizontal (Adjust control rod lengths if necessary)
**********************
disconnect servos from receiver
connect cc3d flight controller
************************
ESC setup:(use instructions beeps, or esc programmer) blades removed
brake:on
Battery type: lipo
CutoffType: cut off
Cutoff voltage : middle
Startmode:soft
Timing mode : low
Governormode: on
************************
Librepilot setup
connect to computer usb and mainport
Upgrade firmware (erase all setting)
select pwm or what applies to your setup
cancel wizard
lp:configuration-Vehicle
   select helicopter
lp:configuration-Vehicle - basic settings:
   SwashplateConfig:  ccpm 3 servo 120
   servow ch1, servox ch2, servoy ch3, tail ch4, engine ch5
   swashplate w=180 x=300 y=60
   collective Pass throught checked
    Collective, Pitch, Roll Slide bars all set at initally at 50%
level flight controller
   lp:configuation-Attitude: see https://librepilot.atlassian.net/wiki/display/LPDOC/CC+Attitude+Configuration

Turn on Tx and battery to Helicopter
lp:configuration-Input
   set channels 1,2,3,4,5,6
   Manual Calibration (move slowly)
lp:configuration-Ouput
   Check directions of all servos
   Reverse if needed so swashplate moves in desired directions

   Setting swashplate travel as collective
       (use lp:configuration-Ouput not lp:configuration-Vehicle-Swashplate Leveling)
   set min and max (narrower than values from lp:configuration-Input to allow cyclic travel at min and max)
   recommend -150 for each (eg if you have 950 - 1900  use 800 - 1750)
   use slider bar on Config-output to set mid points
   test min, mid and max using pitch gauge
        adjust values here for collective pitch control +- 12 Degrees
   increase/decrease min and max values to get +-12degrees
   adjust mid to get 0 degrees at half throttle

   Note: if a change is made on Config-vehicle
              select ccpm3servo 140
         then select ccpm3 servo 120
         Save   
         A bug in LP program is worked around with this process
              otherwise the servos freeze will freeze and not respond.

   To adjust for cyclic blade pitch of +-7 degrees:
   use the Pitch slidebar on config - vehicle-BasicSettings
   Start at 50% and increase for wider spread, decrease for smaller spread
   Note: Values above 90 and below 10 seem non linear.
   
   Repeat process with Roll slidebar for roll +- 7 degrees

*******************
Manually hold helicopter and rotate helicopter in each direction to varify that
the rudder and swashplate are moving in the direction to bring the helicopter back
to its original position.
Note: This may be hard to detect if in Config-Stabilization-Basic-Responsiveness- Rate and RateYaw:
    #1 are set to the default 220.  Change these to a livelier 540 degrees per second and you will
       see movement from cyclics better.

    #2 sometimes the movement is so fast that you can't be sure. To be sure you can put
       your finger between the gear and the the lever to feel the servo. That can be
       better than seeing it move.

*******************
Config-Input-ArmingSettings:  recommend set arming Yaw Right
*******************
Go to your tx and modify the throttle and pitch curves
Suggested curves:
   Throttle
   Normal mode:     0 40 70 90 100
   Idle Up (stunt): 100 90 80 90 100

   Pitch
   Normal mode:      48 49 50 75 100
   Idle Up (stunt):  0 25 50 75 100

Using Governor
   throttle curves:
      Normal mode:     0 40 70 75 75
      Idle Up (stunt): 75 75 75 75 75

See video:  https://www.youtube.com/watch?v=lCegXUbGzIk

*******************
Mount the motor if it was removed during setup
*******************
Set PID Values:
Config-Stabilization-Advanced- Rate stabilization (inner loop)
Suggested initial values:
p= roll=0.002  Pitch=0.0045  Yaw= .005
i= 0, 0, 0
d= 0, 0, 0

Proceedure:
   1) increase values of p in roll until high frequency oscillation occurs then back off some
      Repeat for pitch (P Determines the amount of control by the human)

   2) Increase I until low frequency oscillation and then back off for pitch and roll
      If I is correct helicopter should stay in tilled position with the joystick
      (influences the percision of the angular position)

   3) D is a damening term which reduces over-correction caused by P




Title: Re: Documentation for Librepilot on a helicopter
Post by: karla on April 17, 2017, 04:48:26 am
Great John, that video was really informative.
Title: Re: Documentation for Librepilot on a helicopter
Post by: jwgera on April 17, 2017, 06:58:16 pm
If David and Karla are happy with this, (I think I am). We should put it out where it can help others.

I don't know how to do this. I consider this a three-some project and you
are both are free to publish this where ever it would help and make sense.

Thanks you both for all you contributions to this write-up. I hope it will be able to help others.

John
Title: Re: Documentation for Librepilot on a helicopter
Post by: daveapplemotors on April 18, 2017, 01:59:43 am
John,

You wrote well. Good on you, mate! You put it together as well as anyone. I hope you get to fly your 450 a lot. I flew both of my 250s today.

I read a some of the Wiki pages on submissions. It doesn't look too hard to upload properly. If I do that I want to credit you-- John (top billing!) and Karla. What names should I use for you two? Proper first and last names?

thanks,
Dave Dutton
Title: Re: Documentation for Librepilot on a helicopter
Post by: karla on April 18, 2017, 03:04:57 am
John and Dave, I am all fine with this. Good job!

Finally something coherent for Helis again.
Please go ahead and change the Wiki Dave, I think you and John did most of this so no worries.

Just a note, in next version of LP the Jerry Save bug is fixed. Its done already in the Next source, according to f5soh I think.

/Karl Alberts
Title: Re: Documentation for Librepilot on a helicopter
Post by: jwgera on April 18, 2017, 03:32:50 am
Go ahead Dave and publish it where ever you think is a good place.
John Gera
Title: Re: Documentation for Librepilot on a helicopter
Post by: madberty on May 30, 2017, 03:18:21 pm
Many thanks guys for your hard work.
I am struggling with mine.
I can get the servos to move when moving the fc but not with tx.  When doing tx calibration only the throttle moves I can never get a flicker from chan 6 collective.

Will persevere but any ideas would be helpful. I'm using a cc3d atom , dx8 and trying to launch a trex500 clone

Mark
Title: Re: Documentation for Librepilot on a helicopter
Post by: madberty on May 30, 2017, 06:04:14 pm
ive just tried following this and nothing makes sense!

Sorry guys, i am going to need an idiots guide to doing this :(
Title: Re: Documentation for Librepilot on a helicopter
Post by: karla on May 31, 2017, 02:38:14 am
check if you have set the correct Type in the input configuration table ex PWM (same as throttle since that works for you). It has to be set for each channel...
Title: Re: Documentation for Librepilot on a helicopter
Post by: madberty on June 20, 2017, 07:13:23 pm
Hi Karla, thanks for your reply.
Im afraid i gave up and got my Kbar to work.
Will try and have another crack one day when i get some more nerves ;)
Title: Re: Documentation for Librepilot on a helicopter
Post by: karla on June 21, 2017, 02:59:47 am
Giving up is sometimes the absolute best thing to do!  :)
Next time you can try this set up someone was kind enough to dig out and republish.
https://forum.librepilot.org/index.php?topic=3572.0 (https://forum.librepilot.org/index.php?topic=3572.0)
I used it to get my first heli airborne.