daveapplemotors

  • *
  • 245
  • Helis rule
Re: Documentation for Librepilot on a helicopter
« Reply #15 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"/>
Happy Landings!

jwgera

  • *
  • 24
Re: Documentation for Librepilot on a helicopter
« Reply #16 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.

jwgera

  • *
  • 24
Re: Documentation for Librepilot on a helicopter
« Reply #17 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?
« Last Edit: April 11, 2017, 12:54:49 am by jwgera »

daveapplemotors

  • *
  • 245
  • Helis rule
Re: Documentation for Librepilot on a helicopter
« Reply #18 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.
Happy Landings!

jwgera

  • *
  • 24
Re: Documentation for Librepilot on a helicopter
« Reply #19 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


karla

  • ***
  • 210
Re: Documentation for Librepilot on a helicopter
« Reply #20 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!

jwgera

  • *
  • 24
Re: Documentation for Librepilot on a helicopter
« Reply #21 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
« Last Edit: April 13, 2017, 04:45:30 am by jwgera »

karla

  • ***
  • 210
Re: Documentation for Librepilot on a helicopter
« Reply #22 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.

jwgera

  • *
  • 24
Re: Documentation for Librepilot on a helicopter
« Reply #23 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

karla

  • ***
  • 210
Re: Documentation for Librepilot on a helicopter
« Reply #24 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

daveapplemotors

  • *
  • 245
  • Helis rule
Re: Documentation for Librepilot on a helicopter
« Reply #25 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. 
Happy Landings!

jwgera

  • *
  • 24
Re: Documentation for Librepilot on a helicopter
« Reply #26 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

jwgera

  • *
  • 24
Re: Documentation for Librepilot on a helicopter
« Reply #27 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






Re: Documentation for Librepilot on a helicopter
« Reply #28 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.

daveapplemotors

  • *
  • 245
  • Helis rule
Re: Documentation for Librepilot on a helicopter
« Reply #29 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?
Happy Landings!