Skip to content

MPF config file reference: FAST Pinball expansion boards

MPF 0.57 Configuration Reference for FAST Pinball Hardware

This page is parrt of the reference material for users of the Mission Pinball Framework and FAST Pinball hardware. If you're new to MPF and FAST, read the MPF + FAST overview first. If you are a programmer writing your own software, see our Developer's Reference Guide.

Note that this guide only applies to MPF 0.57. If you're using MPF 0.56 or older, then the FAST Pinball configuration section of the Mission Pinball website has everything you need.

This guide shows you all the settings for the fast: exp: section of your MPF config file which is used to configure MPF to work with FAST Pinball Expansion Boards.

Expansion Boards are used for LEDs and servos. Similar to the net: portion of your MPF config which holds settings for your I/O boards, the fast: exp: section holds settings for your expansion boards, and then individual LEDs and servos are configured to use the boards they're connected too.

Minimal config example:

FAST Expansion Board MPF 0.57 config
# config_version=6

hardware:
    platform: fast

fast:
  net:
    controller: neuron
    io_loop:
      [Other settings not shown here]
  exp: # (1)!
    boards:  # (2)!
      neuron:
        model: FP-EXP-2000 # (3)!
      playfield:
        model: FP-EXP-0071
      topper:
        model: FP-EXP-0081
  1. The exp: section is where you configure your expansion boards, and should be at the same indent level as the net: section.
  2. The boards: section is where you list all the expansion boards you have connected to your FAST controller. In this example we have three boards, which we are calling neuron, playfield, and topper. Like your I/O boards or any MPF device, you can name your boards whatever you want here. The name you choose will be used by device numbers later.
  3. The Neuron technically has an expansion board built in, with the model FP-EXP-2000, so you need to add that to your expansion board list in order for MPF to be able to use it.

Full config example:

FAST Expansion Board MPF 0.57 config
# config_version=6

hardware:
    platform: fast

fast:
  [Net not shown]
  exp:
    boards:
      neuron:
        model: FP-EXP-2000
      playfield:
        model: FP-EXP-0071
        led_fade_time: 100ms
      topper:
        model: FP-EXP-0081
        led_fade_time: 50ms
    port: auto
    baud: 921600
    debug: False

exp: required settings

The following settings are required in your fast: exp: section when using any expansion boards with MPF.

boards:

This consists of a series of sub-entries, one for each expansion board. This is similar to other device lists in MPF, like lights: or coils: where you give a device a name, and then under that name you have settings for that specific device. In this case the device you're naming is the expansion board itself.

model:

The model number of this FAST expansion board, which you can find printed on the board or in the product documentation. Note that the final number(s) after the dash is the "hardware revision" number and does not matter to the software or MPF. So you can leave it off, or include it, your call. For example, FP-EXP-0081-2 is the same as FP-EXP-0081 and can be entered as either.

Valid entries include:

  • FP-EXP-2000 (Built-in expansion board on the Neuron)
  • FP-EXP-0071
  • FP-EXP-0081
  • FP-EXP-0091

address:

This is used to specify a non-standard address for this expansion board. This is only needed if you have 2 (or more) of the same model expansion board. In that case, you use the solder jumpers on one of your boards to change its address. Details for how to do this are in the expansion board programming guide.

For example, if you have two FP-EXP-0081 boards, you can use the solder jumpers to change the address of the second one to 85, which you would then include in your config like this:

Two instances of the same model expansion board
fast:
  exp:
    boards:
      neuron:
        model: FP-EXP-2000
      playfield:
        model: FP-EXP-0081
      topper:
        model: FP-EXP-0081
        address: 85

led_hz:

Controls how fast MPF sends LED updates to the expansion board. The default is 30hz (or 30fps). FAST expansion boards update their LEDs every 32ms, which means the fastest speed is 31.25 (1000 / 32). You can set this to a lower number if you have a lot of LEDs and want to reduce the amount of data MPF sends to the board. (Making this number lower works well when paired with the led_fade_time: setting below, as you can get smooth fades even if you're only updating your LEDs 8 or 16 times per second.)

This is a board-specific setting, so different expansion boards can have different rates.

led_fade_time:

Specifies the fade time for all LEDs on this expansion board, from 0-8191ms. This fade is handled in the board firmware, not by MPF. Setting a longer fade time (something like 96 or 128ms) will make your LEDs look more like incandescent lamps, and can be a nice effect. (Maybe this is something you want to expose via the operator settings?)

This setting has nothing to do with MPF's software fades. Since it applies to all LEDs on all ports on that expansion board, if you have some LEDs you want to fade, and others not, you'll need to set led_fade_time: to 0 and then use MPF to control the fades. (Whether you use MPF for fades or the board firmware doesn't really matter. They can both easily update hundreds of LEDs at 30fps. MPF does have the advantage of being able to do more complex fades, and to use custom gamma, and also being able to fade LEDs on different ports at different rates.) But setting a hardware fade here is also quick and easy.

If you do use this setting, we suggest you pick a multiple of 32 since that's the board's update rate. So 32, 64, 96, 128, etc. are all good choices. Picking something in between will just internally round up to the next multiple.

This is a board-specific setting, so different expansion boards can have different rates.

breakouts: (not used yet)

This is used to configure breakout boards which are attached to expansion boards with breakout headers. (Currently just the Neuron's built in expansion board and the FP-EXP-0091.)

Breakout boards have not be released to the public yet, so we will add documentation later. Support is already included in MPF for FAST breakouts.

led_ports: (not used yet)

Allows you to configure the types of LEDs (WS2812 or APA-102) for each LED port. This support is not yet released, so we will add documentation later.

N or > jump the next page, P or < for previous, search with S or ?