Configuring PMDG 737 Parking Brake Lever Auto Release with a Servo in Mobiflight - MobiFlight/MobiFlight-Connector GitHub Wiki
The PMDG 737 parking brakes require the pilot to fully press the foot pedal brakes and pull the lever in order to engage the brakes. To disengage, the pilot just has to fully press one or both of the pedals and the hand lever is automatically released. A servo motor can be used to release the lever mechanism. This short tutorial objective is to only show how to configure Mobiflight to send the command to activate a servo motor and a short time later, rearm the servo to reset the lever operation.
We shall not cover in this tutorial how to connect a mini servo motor to an Arduino board other than to show the following self explanatory image. If necessary, please refer to other tutorials that explain this in more detail. No attempt is made to explain the mechanics of how the servo might be used to unlatch or disengage the parking brake lever. It is assumed the servo can immediately disengage the lever and then move back to rearm, leaving the lever disengaged.
BASIC APPROACH
The parking brake lever needs to be pulled with the pedal brakes fully engaged, in order to engage the parking brakes. This can be achieved easy enough by just configuring the standard event for Parking Brake on. However, the lever is not actually pushed to disengage the brakes, but rather the brake pedals must be fully depressed and the lever is automatically released. When this happens, the servo motor must unlatch momentarily the lever to allow it to disengage the parking brakes, but otherwise allow the parking brake lever to again engage the parking brakes, if the pilot so requires.
To achieve this, when the parking brakes are disengaged in the sim, that event will trigger the servo to move and unlatch the lever. After this is completed, a five second timer is setup to move the servo back to the original "Armed" position to reset it and be ready for the next operation.
PROCEDURE
This example uses RPN code in a Mobiflight output config to monitor the status of the parking brake lever, set up a timer and to set the Lvar that controls the servo position. The same effect can be achieved using the Mobiflight output driven input events, but will not be covered here.
STEP 1
Create an output config for the servo motor position control. A user-defined L: variable will be used: (L:myServo)
The servo min and max values are set to 0 and 100 respectively, but any range can be used.
STEP 2
Create another output config to store the RPN code to be run with every sim cycle.
The code to be input into the preset code window is the following:
(A:BRAKE PARKING POSITION, position) s0 (L:myLastPosition) != if{
l0 (>L:myLastPosition) l0 0 == if{
(L:myTimer) 0 == if{ 100 (>L:myServo)
(E:SIMULATION TIME, second) 5 + (>L:myTimer) } } }
(L:myServo) 100 == if{
(E:SIMULATION TIME,second) (L:myTimer) > if{
0 (>L:myServo) 0 (>L:myTimer) } }
NOTES ON THE CODE
- The A: variable BRAKE PARKING POSITION is monitored for any change in value. It takes values of either 0 (disengaged) or 1 (engaged).
- Only when the value changes from 1 to 0, the servo action is triggered.
- The servo position variable is set to 100 and the two second timer is setup.
- If the L:myServo variable has been set to 100, the time elapsed is monitored for the timer expiration.
- When the five seconds have passed, the servo is moved back and the timer variable is reset.
- All is ready for the next time.
That's it for this tutorial. A similar technique could be used in other controls that have this type of behavior, like for example the airliners turbine start switch auto-return function or the Auto-throttle engage switch auto-off.