Sections

venerdì 7 ottobre 2011

Spoiler Automation

Hello there!
It finally seems that the Autospoiler modification of the real unit has finished givin a good result!
As you can see in the pictures, I replaced one of existing LVDTs with a spring loaded linear motion potentiometer.
I kept the rod end of the LVDT unit, bored it out, then I fitted the pot arm inside it and sealed with silicon (Liquid metal could be used too but silicon leaves flexibility of the arm to the rod end, plus the force during extension is made by the built in spring of the pot)




In the next picture you can see 2 wires coming out of the stock motor/generator: it features a DC motor operating at 28V and a generator with a built in brake.
What I did is remove the compression spring that keeps the generator brake rotating along the DC motor reducing the force needed by the DC motor to move the actuator.
I resoldered the wires at the ends of the DC motor and it spins pretty fast, and anyway close enough to the real speed.




Here is a video of the lever actuated by setting idle reverse and spinned back by increasing (via keyboard as the throttle levers are still not interfaced) the thrust out of idle.
When it moves from armed it stopped earlier cause of an initial error in programmation, it works fine now :)




Following here is the logic I made for the most correct operation possible according to the real unit manual.

Var 8999, name SpdBrkTOcfg_SW, Link IOCARD_SW, Device 10, Input 29, Type I
{
  CALL &AN_CONFIG
}
Var 9000, name SPDBRKrev_SW, Link IOCARD_SW, Device 10, Input 206, Type I // idle rev detection switch that raises the spoiler lever from the DOWN detent
{
  CALL &Spoiler_Logic
  CALL &Spoiler_Ctrl
}
Var 9001, name SpdBrkArm_SW, Link IOCARD_SW, Device 10, Input 31, Type I //spoiler arm detection switch
{
  CALL &Spoiler_Logic
  CALL &Spoiler_Ctrl
}
Var 9002, name SBrkAbrkDis_SW, Link IOCARD_SW, Device 10, Input 30, Type I

Var 9004, name Spoiler_Logic, Link SUBRUTINE
{
  C0 = &Eng1Lever < 500 // engine 1 lever close to idle
  C1 = &Eng2Lever < 500 // engine 2 lever close to idle
  IF C0 AND C1
  {
    IF &GNDFLTOffst = 1 // aircraft on ground
    {
      C0 = &SPDBRKrev_SW = 1
      C1 = &SpdBrkArm_SW = 1
      IF C0 OR C1
      {
        &SpoilRellogic = 0 // set relays for the DC motor polarity set to spin motor to DOWN if powered
        &SpoilerObj = 16384
      }
      ELSE
      {
        &SpoilRellogic = 1 // set relays for the DC motor polarity set to spin motor to UP if powered
        &SpoilerObj = 0
      }
    }
    ELSE
    {
      &SpoilRellogic = 1
      &SpoilerObj = 0
    }
  }
  ELSE
  {
    &SpoilRellogic = 1
    &SpoilerObj = 0
  }
}
Var 9005, name SpoilRellogic, Link SUBRUTINE
{
  &SpoilRel1 = CHANGEBIT 0 &SpoilRellogic
  &SpoilRel2 = CHANGEBIT 0 &SpoilRellogic
}
Var 9006, name Spoiler_Ctrl, Link SUBRUTINE
{
  C0 = &Bus_Left = 0 // Left BUS unpowered
  C1 = &LeftHydPress < 1500 // Left system HYD pressure below 1500 PSI
  IF C0 OR C1
  {
    &SpoilPWRrel = 0 // Spoiler power relay open
  }
  ELSE
  {
    IF &GNDFLTOffst = 0 // aircraft in flight condition
    {
      &SpoilPWRrel = 0 // Spoiler power relay open
    }
    ELSE
    {
      C0 = &SPDBRKrev_SW = 1
      C1 = &SpdBrkArm_SW = 1
      IF C0 OR C1
      {
        L0 = &SpoilerObj - &SpBrPosOffst
        L1 = 0   
        IF L0 <> 0
        {
          L1 = 1 
        }
        L0 = ABS L0
        L2 = L1
        IF &SpoilerObj = &SpBrPosOffst
        { 
          L2 = 0
        }
        &SpoilPWRrel = L2 
      }
      ELSE
      {
        &SpoilPWRrel = 0
      }
    }
  }
}
Var 9007, name SpoilerObj
{
  CALL &Spoiler_Ctrl
}
Var 9008, name SpoilPWRrel, Link USB_RELAYS, Device 12, Output 3 // Spoiler power relay
Var 9009, name SpoilRel1, Link USB_RELAYS, Device 12, Output 4 // 1st DC current polarity relay
Var 9010, name SpoilRel2, Link USB_RELAYS, Device 12, Output 5 // 2nd DC current polarity relay

Nessun commento:

Posta un commento