# Output Port Options

The "option" icons next to each port let you select special handling for the port. Click on an option icon to toggle its status. Note that some options are only available with certain types of ports, so you won't necessarily see all of the option icons listed next to every port.

## Noisy Port

Set this option for ports that you're using to control noise-making devices, such as solenoids and motors.

Each port marked with this flag will be deactivated when Night Mode is engaged. These ports will operate only in "Day Mode", when Night Mode is off.

If you're using the Night mode feature, you should first go through your devices and figure out the port you're going to connect each device to. Then, set the "Noisy" flag for each noise-making device. When you turn on Night Mode, these devices will be disabled, allowing you to play more quietly.

If you're not using the Night Mode feature, you can ignore this option.

## Gamma

If this option is set, the controller applies "gamma correction" to the port. This adjusts the intensity level of the port on a curved scale so that it better matches the way the human eye perceives brightness.

Gamma correction is best for ports connected to lighting devices like lamps and LEDs. When used with lights, gamma correction makes "fading" effects look more linear to the eye, and improves RGB color mixing accuracy. You generally shouldn't use gamma correction with other device types, such as solenoids and motors.

The gamma correction option is only available for ports with PWM capability, because it only affects intermediate intensity levels between fully off and fully on. Gamma correction isn't an option on digital-only ports, such as Digital GPIO ports, 74HC595 outputs, and chime board outputs, since these ports can't vary their intensities.

To keep things simple, the controller uses a fixed gamma of 2.8.

## Active Low

This option reverses the voltage levels for ON and OFF for a GPIO output port.

By default, ports are "active high", meaning that the output controller sets the port's GPIO pin to "high" (3.3V) when the software port is ON, and sets it to "low" (0V) when the software port is OFF.

Setting this option reverses those voltages. An "active low" port's GPIO pin is "low" (0V) when the software port is ON, and "high" (3.3V) when the software port is OFF.

Don't use this option with the MOSFET "booster circuit" described in the Build Guide. That circuit is designed for the default Active High triggering.

Do use this option if you're using some other type of booster circuit that requires active-low triggering. This is fairly common among third-party "relay boards" designed for Arduino projects, for example. If you have a relay board that instructs you to connect the control input to "Ground" or "GND" or 0V to trigger it, it's an active-low design and you should select this option.

Note that this option only works with GPIO ports. The Expansion Board ports and the external output chips (TLC5940 and 74HC595) have different designs that can't use this feature. In the case of the expansion boards, it's moot anyway because those boards have their own booster circuits built in.

## Flipper Logic

This option sets special timing and power properties for the port, to protect certain types of coils and solenoids from overheating. When Flipper Logic is enabled on a port, the controller simulates the way a real pinball machine flipper coil works. Whenever the PC software turns the port on, the controller gives the port full power briefly, then reduces power to a lower level. The lower level is maintained as long as the PC software leaves the port on. The point is to get the full mechanical effect from the device when it's first actuated, by giving it full power initially, but then protect the device from overheating by quickly reducing power to a sustainable level.

This option is mutually exclusive with Chime Logic (see below). Chime Logic will be automatically disabled if you enable Flipper Logic.

There's no need to use this option with devices that are designed for long-term activation, such as contactors. This option is designed for devices that would overheat if left on for long periods at full power.

When you click the Flipper Logic icon, a popup box will appear to let you enter two additional parameters:

- Initial time: the time limit for the initial burst of full power. This can range from a minimum of 50ms (1/20 of a second) to 800ms (0.8 seconds), in 50ms increments. Each time the PC software activates the port, the port gets 100% power until this time expires. (Of course, this is only a maximum, not a minimum: if the PC turns the port off in a shorter time, the port simply turns off immediately.)
- Hold power: the reduced power level given to the port after the initial time expires. This is a percentage of full power, in approximately 7% increments.

  The power reduction is accomplished using PWM (pulse width modulation), so you can only set a fractional power level for a port that's PWM-capable. For a digital port, the hold power is fixed at 0% and can't be changed, since a digital port is incapable of power levels other than fully ON or fully OFF.

The point of this feature is to expand your range of choices for devices to simulate flippers in your virtual cab. Traditionally, cab builders have been limited to devices like contactors that are able to withstand long periods of activation. The Flipper Logic option makes it feasible to use more types of devices, since it can greatly reduce the heat load on a device that's left on for a long period.

The right settings depend on the individual device, so you'll have to experiment. The goal is to find the minimum power setting where the device stays mechanically activated - that is, where the plunger or lever stays in the "on" position. For most devices, you should be able to use the minimum full-power time of 50ms, so you should only have to find the right hold power level. Start at the lowest hold power level. Program the KL25Z with the new settings, then go to the output tester and activate the port. If it stays mechanically activated for a few seconds, you've found the right hold power, so turn off the port and continue with the next step below. If not, go back to the settings page and try the next higher hold power level, and repeat until you find a working level.

There's one more step: you need to verify that the selected hold power setting is safe for the device. Go to the output tester and turn on the port again. Carefully monitor the device to make sure it doesn't get hot to the touch. Warm is okay, but you should be able to touch it without getting burned. If the device doesn't get hot after about two minutes, it should be fine indefinitely. That's long enough for the device to reach thermal equilibrium, where it's shedding heat as fast as it's generating it, in which case it shouldn't overheat no matter how long you leave it on.

If the device does start getting hot within the first couple of minutes, turn it off immediately to prevent damage. The device probably isn't suitable for use as a flipper simulator in this case, even with the Flipper Logic option.

0% hold power: If you set the hold power to 0%, the controller will simply turn the port off entirely after the initial time expires. This simulates the Pinscape "chime board", which has hardware timers that turn off the ports if they're left on for more than a couple of seconds. This isn't suitable for flippers, since it would generate an "off" feedback effect prematurely, before the player releases the flipper buttons. But it is perfectly fine for many other types of devices, especially replay knockers and chimes, since the software should never energize these devices for more than a split second in the first place. It's probably also appropriate for devices simulating bumpers and slingshots.

Note that the PC software can still control the intensity of the effect. During the initial "full power" period, the controller will actually pass through whatever intensity level the PC software specifies. DOF uses reduced power levels for software noises from solenoids in some cases, and this will still work properly with a Flipper Logic port, since the Pinscape unit will use the DOF intensity level during the initial "full power" period. During the hold period, the PC can also vary the power, but only below the limit given by the hold power setting. Any higher power that the PC tries to set during the hold period will be capped at the hold power. It would be unusual for PC software to do this with a solenoid, since it wouldn't normally create any sort of noticeable effect, but the Pinscape software supports it just in case there's some need for it.

## Chime Logic

This option lets you set minimum and maximum ON time intervals for the port.

This option is mutually exclusive with Flipper Logic (see above). Flipper Logic will be automatically disabled if you enable Chime Logic.

The Chime Logic options let you set fairly precise timing intervals, especially for very short intervals from single milliseconds to tens of milliseconds. PC-side software isn't capable of the the same degree of timing precision that the controller can offer, since the PC software has to deal with several layers of Windows software and USB hardware that interpose a certain amount of fuzziness in the timing.

Setting a minimum time can be useful for mechanical devices that require a certain minimum amount of time before their effects reach full strength. For example, some contactors won't make a satisfying enough "clunk" sound unless they're activated for at least 10 or 20 milliseconds at a time.

The maximum time can be useful for devices like chimes that depend on very rapid ON/OFF cycling. It can also be used to protect coils against overheating, doing the same job in software that the Pinscape "Chime Boards" do in hardware via their time limiter circuits. The maximum time setting is similar to the Flipper Logic full power time, but it comes with a trade-off. On the upside, it offers finer gradations of time at the short end of the scale, from single milliseconds to tens of milliseconds. On the downside, Chime Logic can only turn off the port power entirely when the maximum is reached, whereas Flipper Logic can leave the port on at reduced power when used with a PWM port.

To activate Chime Logic, click the chime icon next in the port row for the desired port. When you click the icon, a popup box will appear to let you enter the minimum and maximum time values. The minimum time can be set to a range of values from 0ms to 800ms. The maximum time has a similar range of selections, and can also be set to "infinity" for no time limit at all.

If you set a maximum time that's less than the minimum time, the minimum time takes precedence. The effect therefore is that the port will always be on for exactly the minimum time.