Author Topic: Coils ticking when switch rules have been applied & the machine is powered down?  (Read 1268 times)

Brian Madden

  • Wizard
  • *****
  • Posts: 498
  • Mission Pinball
    • View Profile
    • Mission Pinball
Okay here's a weird issue that Gabe and I are hoping someone can shed some light on.

We have our Big Shot machine which we're getting ready for expo. It's got a P-ROC and a couple of PD-16s and PD-8x8s. About a week ago we noticed a "tick" sound when we shut the machine off.. almost like some coil was enabled and then became disabled. It was quiet though, and we kind of forgot about it.

We sort of noticed it here and there over the past few days, and tonight we dug into it and here's what we found:

If we have hardware switch rules enabled and we power off the machine, each of the coils that have a switch rule applied move a little bit... Like a little "blip". (In Big Shot this is two two single-wound flippers, two slingshots, and a pop bumper.)

We have 100% confirmed that this only happens for coils that have hardware switch rules currently active. If we turn on our machine and don't start a game and then turn it off, it does not happen.

If we turn on our machine and start a game, even if we never plunge the ball or hit a flipper, it *does* happen.

If we play a game (which of course has active rules) and then have our rules deactivate (via tilt, game over, etc.), then this does *not* happen.

So it's only happening when the hardware switch rules are active?!?

Our next thought was that maybe this was something that happened to all our coils but that we just noticed it on the playfield coils like these. But we found that if we comment out the code to disable the hardware switch rules for a particular coil, then this little blip on power down does *not* happen. We commented out the flippers and it still happened on the pop bumper, we commented out the pop bumper and it still happened on the flippers, etc.

From what we can tell, it appears that the coils are not energized while the machine is on, but that they advance towards their active states when the machine loses power. (In other words it's like they're off and then they blip on when we cut power to the machine, as opposed to them being on, maybe in some super weak hold, and then turning off when power is cut.)

The really weird thing again is that this only happens for the specific coils that have hardware switch rules applied. It's happening to our single-wound flipper coils (which have pulse-patter rules) as well as the pop bumper and slingshots (which have pulse rules), and again we can make this go away instantly by just commenting out the line that configures the hardware switch rules for a particular coil. So I really think it's not a grounding or electrical issue since if it was I don't think we'd be able to reproduce it consistently like we can now. (Just for experimentation we also tried isolating our logic and high power grounds, but that didn't help.)

So then I started wondering if maybe somehow I was applying some weird switch rule like a 0x00000001 schedule mask or something, so I enabled logging to look at the actual rules we're writing to the P-ROC. Here's an example of an enable rule for one of our single-wound flippers (which is why is has the outputDriveTime as well as patterEnable and patter settings: (This is our log file dump but all the data and fields are there so you get the idea.)

switch: 18, event_type: closed_nondebounced, rule: {'reloadActive': False, 'notifyHost': False}, final_driver: [{'polarity': 1, 'futureEnable': 0, 'timeslots': 0, 'patterEnable': 1, 'driverNum': 184, 'patterOnTime': 1, 'patterOffTime': 1, 'state': 1, 'outputDriveTime': 50, 'waitForFirstTimeSlot': 0}], drive now: False

And here's one for one for the pop bumper:

switch: 35, event_type: closed_nondebounced,rule: {'reloadActive': True, 'notifyHost': False}, final_driver: [{'polarity': 1, 'futureEnable': 0, 'timeslots': 0, 'patterEnable': 0, 'driverNum': 169, 'patterOnTime': 0, 'patterOffTime': 0, 'state': 1, 'outputDriveTime': 18, 'waitForFirstTimeSlot': 0}], drive now: False

At this point we're totally stumped. Does the P-ROC in some way do something that would allow some kind of voltage collapse spike to the coils when it's powered down or anything? BTW we have firmware 1.20. We thought about updating that but the documentation said to only do that if it's absolutely necessary.

If this is truly a voltage spike on power down versus our coils being on (weakly) all the time and blipping when they get turned off, then I think we can safely ignore it. (And this is our assumption since if we start and play a game and then let it end it, we don't get the blip. If we tilt and disable flippers, we don't get the blip. It's only where we physically power the machine down while hardware switch rules are enabled.

So... any ideas?
Brian
The Mission Pinball Framework (MPF) Project*
Twitter
* Disclaimer: MPF is a work-in-progress!

Gerry Stellenberg

  • Administrator
  • *****
  • Posts: 2399
    • View Profile
    • PinballControllers.com
Normally open switches activate when the path to ground is closed.  The P-ROC sees ground on a switch input (row) and identifies the switch as closed.  When you power down a circuit, power goes away.  There's likely capacitance in various circuits that keep them operational for a bit, but it looks like your switch matrix is dropping power quickly.  So, the P-ROC sees switch closures at power down and activates the switch rules as programmed.

If you want to get rid of this, you could add capacitance to your switch voltage rail to ensure the P-ROC's logic power (5V) drops before the switch rail drops. 

- Gerry

Brian Madden

  • Wizard
  • *****
  • Posts: 498
  • Mission Pinball
    • View Profile
    • Mission Pinball
This is awesome, thanks!

Honestly we don't even care about the issue per se, really we wanted to know why it was happening so we would know if we had a problem we had to deal with or not. But it sounds like we can safely ignore this.

Thanks!
Brian
The Mission Pinball Framework (MPF) Project*
Twitter
* Disclaimer: MPF is a work-in-progress!