OPP support for flipper EOS?

202 views
Skip to first unread message

MOSFET

unread,
Jul 15, 2023, 5:04:25 PM7/15/23
to MPF Users
Hello!

Is there a way to configure OPP to support flipper end-of-stroke switches? As of the latest mpf dev branch commit 9f90c8b15, and OPP firmware 2.4.0.0, when trying to use flippers configured with EOS switches, mpf throws the exception AssertionError("Not implemented in OPP currently"):

2023-07-15 15:52:06,037 : INFO : EventManager : Event: ======'mode_base_starting'====== Args={'player': 1, 'ball': 1, 'balls_remaining': 0, 'is_extra_ball': False}
2023-07-15 15:52:06,041 : ERROR : asyncio : Exception in callback EventManager.process_event_queue()
handle: <Handle EventManager.process_event_queue()>
Traceback (most recent call last):
  File "/home/odroid/mpf/mpf/core/events.py", line 745, in _run_handlers
    result = handler.callback(**merged_kwargs)
  File "/home/odroid/mpf/mpf/devices/flipper.py", line 58, in event_enable
    self.enable()
  File "/home/odroid/mpf/mpf/devices/flipper.py", line 113, in enable
    self._enable_main_coil_eos_cutoff_rule()
  File "/home/odroid/mpf/mpf/devices/flipper.py", line 226, in _enable_main_coil_eos_cutoff_rule
    rule = self.machine.platform_controller.set_pulse_on_hit_and_release_and_disable_rule(
  File "/home/odroid/mpf/mpf/core/platform_controller.py", line 370, in set_pulse_on_hit_and_release_and_disable_rule
    platform.set_pulse_on_hit_and_release_and_disable_rule(
  File "/home/odroid/mpf/mpf/platforms/opp/opp.py", line 1034, in set_pulse_on_hit_and_release_and_disable_rule
    raise AssertionError("Not implemented in OPP currently")
AssertionError: Not implemented in OPP currently

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/home/odroid/mpf/mpf/core/events.py", line 836, in process_event_queue
    self._process_event(event=event[0],
  File "/home/odroid/mpf/mpf/core/events.py", line 798, in _process_event
    result = self._run_handlers(event, ev_type, kwargs)
  File "/home/odroid/mpf/mpf/core/events.py", line 747, in _run_handlers
    raise EventHandlerException(
mpf.core.events.EventHandlerException: Exception while processing RegisteredHandler(callback=<bound method Flipper.event_enable of <flipper.flipper_left>>, priority=2, kwargs={}, key=UUID('8fa5c6c4-6c14-4a0e-81fa-8094881989b0'), condition=None, blocking_facility=None) for event ball_started. Not implemented in OPP currently



My flipper configuration is:
flippers:
  flipper_left:
    main_coil: c_flipper_left_main
    hold_coil: c_flipper_left_hold
    activation_switch: s_flipper_left
    eos_switch: s_flipper_left_EOS
    use_eos: true
    label: Left Flipper
  flipper_right:
    main_coil: c_flipper_right_main
    hold_coil: c_flipper_right_hold
    activation_switch: s_flipper_right
    eos_switch: s_flipper_right_EOS
    use_eos: true
    label: Right Flipper


Thank you!

Todd Legere

unread,
Jul 16, 2023, 9:15:14 PM7/16/23
to MPF Users
You can see the entire code to running a williams machine with eos here

Here is my config/coils.yaml for williams flippers with end of stroke switch
# ---------------------------------------    
# Solenoid Bank C Auto fired coils 1-0-n
# ---------------------------------------
  c_flipper_left_main:
    number: 1-0-0
#    default_pulse_ms: 5
    default_pulse_ms: 1
    allow_enable: true
#    default_hold_power: 1.0
  c_flipper_right_main:
    number: 1-0-7
#    default_pulse_ms: 5
    default_pulse_ms: 1
    allow_enable: true
#    default_hold_power: 1.0


Here is my switches for end of stroke flippers

Here is my config/switches for flippers

# Williams System 4 has dual wound coil using EOS switch
  s_flipper_right:
    number: 1-0-1
    tags: player, high_score_right, right_flipper
    label:
  s_flipper_left:
    number: 1-0-2
    tags: player, high_score_left, left_flipper
    label:

MOS FET

unread,
Jul 16, 2023, 10:57:37 PM7/16/23
to mpf-...@googlegroups.com
Thank you, Todd! Is that with a power EOS switch directly connected with the flipper coil?

I have dual-wound coils, with the main coils set to pulse a certain duration, and with the EOS switches connected to my CobraPin direct switch inputs on the same OPP MCU as the flipper coils. I'm hoping to configure MPF/OPP to also turn off the main coils when the EOS is activated, using the configuration from MPF's Flipper end-of-stroke (EOS) switches page .

That way, pulse timing takes care of the flipper strength when hitting a ball, and when my kids chimp-flip, the EOS activation turns off the main coil when the flipper hits air.

--
You received this message because you are subscribed to a topic in the Google Groups "MPF Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mpf-users/vkI3cvBVtEo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mpf-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mpf-users/280bf37b-9690-4fe8-8358-e1459f7e3806n%40googlegroups.com.

OPP

unread,
Jul 18, 2023, 8:21:10 AM7/18/23
to MPF Users
I'll assume you know this, but just to be certain, if the dual wound coil EOS switch is removing power from from the main coil so only the hold coil is active, don't use it as an input to processor.  The voltage will be too high and will destroy the processor.  If it is a separate switch which is only being used to detect that the coil is in the active position, that can be fed into the processor.  On quick read of the above MPF manual page, I'm not sure what the OPP firmware would need to do to handle a flipper in the active position switch input.

Todd Legere

unread,
Jul 18, 2023, 8:36:16 AM7/18/23
to MPF Users
My William Phoenix table is using the original wiring set up for it's flippers. The flippers have an EOS switch and the flipper coil has three terminals. The hot wire feed the normal feed to the two poles on the coil and to the EOS switch.
This config has been in use on my table with my cobrapin board for a few years without incident.
Is there any risk to using this method, I'm not qualified to answer that question the author of OPP and cobrapin can weigh in on that.

MOSFET

unread,
Jul 23, 2023, 10:11:59 AM7/23/23
to MPF Users
Thank you both! My EOS is a separate switch which is only being used to detect that the coil is in the active position. The flippers are working when I set use_eos to false: the main coil is pulsed (MPF default_pulse_ms, OPP hardware rules with pulse for main coil and enable for hold coil, both triggered by flipper button switch inputs).

Upon digging further into mpf/devices/flipper.py , MPF supports the following flipper control schemes:
        Two coils, using EOS switch to indicate the end of the power stroke:
        Rule  Type     Coil  Switch  Action
        A.    Enable   Main  Button  active
        D.    Enable   Hold  Button  active
        E.    Disable  Main  EOS     active

        One coil, using EOS switch:
        Rule  Type     Coil  Switch  Action
        A.    Enable   Main  Button  active
        H.    PWM      Main  EOS     active

        Two coils, not using EOS switch:
        Rule  Type     Coil  Switch  Action
        B.    Pulse    Main  Button  active
        D.    Enable   Hold  Button  active

        One coil, not using EOS switch:
        Rule  Type       Coil  Switch  Action
        C.    Pulse/PWM  Main  button  active

        Use EOS switch for safety (for platforms that support multiple switch
        rules). Note that this rule is the letter "i", not a numeral 1.
        I. Enable power if button is active and EOS is not active

 

It appears that I would need to add another scheme to MPF:

        Two coils, pulsing main coil AND using EOS switch:
        Rule  Type     Coil  Switch  Action
        B.    Pulse    Main  Button  active
        D.    Enable   Hold  Button  active
        E.    Disable  Main  EOS     active    # <----- added this to "Two coils, not using EOS switch scheme"


OPP supports hardware rules to pulse a coil upon switch activation (normal setup). Does OPP also support hardware rules to stop pulsing a coil upon a different switch (EOS) activation? If not, how would you suggest I go about adding that?

Thank you!

MOSFET

unread,
Jul 28, 2023, 8:07:02 PM7/28/23
to MPF Users
Upon further reflection, I am considering replacing my flippers' normally-open EOS switches with normally-closed EOS switches and rewiring my flipper main coils to feed power through the EOS:
+48V ------ (fuse on CobraPin) --------- MainCoilLug+
MainCoilLug- --------- EOS ------------ CobraPin/OPP Solenoid Channel

By keeping my existing MPF/OPP configuration, I still can pulse the main coils at the desired pulse width, and the EOS switches will cut the coil drive earlier if the flipper is fully raised before the pulse ends.

Does this sound like a reasonable plan? Thank you!

Todd Legere

unread,
Aug 3, 2023, 6:24:55 AM8/3/23
to MPF Users
MOSFET

You will also so two other tables I have using a cobrapin controller there (Close Encounters of a Third kind and Hot Tip). All three are using EOS on my flippers.

I noticed you are using a higher main voltage of 48Vdc. I am using a much lower voltage for my tables.

MOSFET

unread,
Aug 5, 2023, 3:41:58 PM8/5/23
to MPF Users
Cool, thanks for linking the Pinside build thread! It was helpful to see the progression in flipper scheme. I'll plan to order the normally-closed EOS switches in my next Pinball Life order.

Thank you all for the help!

OPP

unread,
Aug 22, 2023, 7:45:52 PM8/22/23
to MPF Users
Remember also that the high power switches have significantly different contacts than low power switches.  Most switches you see have very small contacts that are some alloy of nickel.  High power EOSes used to have contacts made of a silver alloy.  I have no idea if this is still true today, but it was true back in the 80s.  The higher current needs a better contact to reduce the arcing, minimize the resistance, etc.
Reply all
Reply to author
Forward
0 new messages