How to configure single-wound flippers
Please ensure that you have established common ground between logic and coil power before turning on high voltage on your coils (especially on homebrew machines). Ignoring this might lock on your coils, overheat them, burn down your house or kill you. We are serious, floating grounds are dangerous. If you are not an electrical engineer read the guide about voltages and power.
In a nutshell: You need to connect your logic ground (5V/12V) and your high voltage ground (48V or 80V). A power entry or power filter board is a convenient solution to solve this (and more) issues.
Always turn all PSUs off when connecting power or you might fry all boards at once. This is generally a good idea but even more important when connecting more than one power supply to a board.
IF YOU DID NOT UNDERSTAND WHAT THIS WARNING MEANS STOP NOW AND TRY TO UNDERSTAND IT. OTHERWISE YOUR HARDWARE WILL LIKELY BURST INTO FLAMES AND YOU NEED TO WAIT A FEW DAYS FOR A REPLACEMENT OR EVEN WORSE IT MIGHT KILL YOU. IGNORING THIS IS THE MOST COMMON CAUSE FOR BROKEN DRIVER BOARDS.
This guide shows you how to configure single-wound flippers in MPF. If you don't know what "single-wound" flippers are, or whether you have them, take a look at the coil that your flipper uses. If it has two wires (or two tabs to connect two wires), then it's a single-wound coil and this guide is for you.
If it has three wires (or three tabs), then read the /hardware/numbers guide.
Read more about "dual wound" versus "single wound" coils in the Dual-Wound versus Single-Wound coils guide.
See coil hardware for more details about the current, resistance, number of windings and the strength of coils.
1. Add your flipper buttons
First, make sure you have entries in your machine config for your flipper buttons.
Here's an example
config.yaml with two switches added:
switches: s_left_flipper: number: 1 tags: left_flipper s_right_flipper: number: 2 tags: right_flipper
You can pick whatever names you want for your switches. We chose
Note that we configured this switches with numbers
2, but you
should use the actual switch numbers for your control system that the
flipper buttons are connected to. (See
How to configure "number:" settings for instructions for
each type of control system.)
We also added tags called
right_flipper. These are
optional, but recommended. The reason is that MPF includes a
combo switch feature which posts events when player switches are held in
combination. If you add these tags to your flipper switches, an event
called flipper_cancel will be posted when the player hits both flipper
buttons at the same time which you can use to cancel shows and other
things you want the player to be able to skip.
2. Add your flipper coils
Next you need to add entries for your flipper coils to your machine-wide
config. These will be added to a section called
coils: c_flipper_left: number: 0 allow_enable: true default_hold_power: 0.125 c_flipper_right: number: 1 allow_enable: true default_hold_power: 0.125
number: entries in your config will vary depending on your
actual hardware, and again, you can pick whatever names you want for
Also note that the coils have
allow_enable: true entries added. (In
MPF config files, values of "yes" and "true" are the same.) The
purpose of the
allow_enable: true setting is that as a safety
precaution, MPF does not allow you to enable (that is, to hold a coil in
its "on" position) unless you specifically add
allow_enable: true to
that coil's config.
Since flippers need to be held on (as long as the flipper button is
active), you need
allow_enable: true in the coil config for them.
Finally, notice that there's a
default_hold_power: 0.125 setting for
each coil. That is the power value (from 0-1) which controls how much
power is applied to the flipper when it's held on. A value of 0.125 is
12.5% power, a value of 2 is 25% which, a value of 0.375 is 37.5%, 0.5
is 50%, etc.
We just start with the lowest setting for now and you can increase it later if it's not enough.
3. Add your flipper entries
At this point you have your coils and switches defined, but you can't flip yet because you don't have any flippers defined. Now you might be thinking, "Wait, but didn't I just configure the coils and switches?" Yes, you did, but now you have to tell MPF that you want to create a flipper mechanism which links together the switch and the coils to become a "flipper".
You create your flipper mechanisms by adding a
flippers: section to
your machine config, and then specifying the switch and coils for each
flipper that you defined in Steps 1 and 2.
Here's what you would create based on the switches and coils we've defined so far:
#! switches: #! s_left_flipper: #! number: 1 #! tags: left_flipper #! s_right_flipper: #! number: 2 #! tags: right_flipper #! coils: #! c_flipper_left: #! number: 0 #! allow_enable: true #! default_hold_power: 0.125 #! c_flipper_right: #! number: 1 #! allow_enable: true #! default_hold_power: 0.125 flippers: left_flipper: main_coil: c_flipper_left activation_switch: s_left_flipper right_flipper: main_coil: c_flipper_right activation_switch: s_right_flipper
4. Enabling your flippers
By default, MPF only enables flippers when a game is in progress. So if this is a first-time config and you haven't configured your ball devices and start button and everything, you can't actually start a game yet, which means you can't test your flippers.
Fortunately we can get around that by configuring your flippers to just automatically enable themselves when MPF starts. To do this, add the following entry to each of your flippers in your config file:
So now the
flippers: section of your config file should look like
#! switches: #! s_left_flipper: #! number: 1 #! tags: left_flipper #! s_right_flipper: #! number: 2 #! tags: right_flipper #! coils: #! c_flipper_left: #! number: 0 #! allow_enable: true #! default_hold_power: 0.125 #! c_flipper_right: #! number: 1 #! allow_enable: true #! default_hold_power: 0.125 flippers: left_flipper: main_coil: c_flipper_left activation_switch: s_left_flipper enable_events: machine_reset_phase_3 right_flipper: main_coil: c_flipper_right activation_switch: s_right_flipper enable_events: machine_reset_phase_3
5. Configure your control system hardware
At this point your flipper configuration is technically complete, though there are two other important things you may have to do first:
If you're using physical hardware, you may need an additional section in your machine config for your control system. (For example, FAST Pinball and Open Pinball Project controllers require a one-time port configuration, etc.) See the control system documentation for details.
6. Adjust your flipper power
As a safety precaution, MPF uses very low (10ms) default pulse times for coils. In most cases, 10ms will not be enough power to physically move the flippers when you hit the button. (You might hear them click or buzz without actually seeing them move.)
Here's the complete config
Here's the complete machine config file (or sections of the machine config file) we created in this How To guide:
#config_version=5 switches: s_left_flipper: number: 1 tags: left_flipper s_right_flipper: number: 2 tags: right_flipper coils: c_flipper_left: number: 0 allow_enable: true default_hold_power: 0.125 c_flipper_right: number: 1 allow_enable: true default_hold_power: 0.125 flippers: left_flipper: main_coil: c_flipper_left activation_switch: s_left_flipper enable_events: machine_reset_phase_3 right_flipper: main_coil: c_flipper_right activation_switch: s_right_flipper enable_events: machine_reset_phase_3
Something missing or wrong? You can fix it!
This website is edited by people like you! Is something wrong or missing? Is something out of date, or can you explain it better?
Please help us! You can fix it yourself and be an official "open source" contributor!
It's easy! See our Beginner's guide to editing the docs.
Page navigation via the keyboard: < >
You can navigate this site via the keyboard. There are two modes:
General navigation, when search is not focused:
- F , S , / : open search dialog
- P , , : go to previous page
- N , . : go to next page
While using the search function:
- Down , Up : select next / previous result
- Esc , Tab : close search
- Enter : go to highlighted page in the results