(Topic ID: 227831)

In simple words, usage of the zero crossing


By jimy_speedt

1 year ago



Topic Stats

  • 21 posts
  • 9 Pinsiders participating
  • Latest reply 1 year ago by jimy_speedt
  • Topic is favorited by 1 Pinsider

You

Linked Games

No games have been linked to this topic.

    Topic Gallery

    There have been 2 images uploaded to this topic. (View topic image gallery).

    pasted_image (resized).png
    pasted_image (resized).png

    #1 1 year ago

    Hi,

    I have spent a long time trying to find articles which explain exactly what the zero crossing does. What it is made for and what it is concretely. Simply what the CPU checks at boot time. Some schematics show AND gates with the zero crossing as input, what is it supposed to do ?

    Thanks you for helping me to understand, more as an abstract than deep technical explanations.

    #2 1 year ago

    The zero crossing watches the AC waveform coming from the wall and when it 'crosses' (equals) zero it sends a signal to the CPU. It's basically just a little repeater/delay circuit to get the signal going out the right side in a nice format for the CPU to sense. The output signal should be low and pulse high (5v) 120 times a second (or 100 in European countries?)

    pasted_image (resized).png
    #3 1 year ago

    As zacaj said. Basically, you know that AC "alternating current" means the flow of electrons reverses, and when it crosses zero there is a signal created that informs the MPU that the next cycle has started. Think of it as a clock signal based off the frequency of the alternating current supplied to the game from the AC main. It can be used to refresh the SCRs that hold the lamps on, signal when the best time to discharge coils to avoid spikes, etc.. depending on what the design is.

    #4 1 year ago

    Zacaj puts it eloquently.

    The AC current from the wall looks like a sine wave, and zero crossing is just the point where the voltage crosses over from the negative to the positive voltage.

    I know some games use it for timing. Bally 6803 games use it to control double the number of available lamps, since the cpu will turn some lights on for one phase of the zero cross, and others lights for the other phase. It’s like a built in multiplexer.

    WPC games use it for the dimming TRIACs on the GI. Using it as a somewhat frequency generator.

    That’s my not-so-technical explanation.

    #5 1 year ago

    Ok, and the fact that this is tested at boot by the CPU ? what does the CPU test exactly ? On the schematics, when I see an AND gate with the zero crossing as input, what does this zero crossing "line" represent exactly ? knowing that on the boards, the current is generally Vdc at that stage.

    Thanks for your explanation, if I understand well, the CPU checks the Vac, when the voltage reaches 0 or close too, whether the phase is ascending or descending, it is an opportunity for the CPU to trigger actions.

    #6 1 year ago
    Quoted from jimy_speedt:

    On the schematics, when I see an AND gate with the zero crossing as input, what does this zero crossing "line" represent exactly

    Where do you see that?

    The signal coming out of the detector I screenshotted will be high for a small amount of time, meaning that the voltage has just crossed zero. Ballys use this for timing to control their lamps and solenoids (both are turned off at zero crossing) as well as to trigger switch matrix scans (just as a convenient timer).

    At bootup the CPU just checks that it's getting pulses from the detector periodically. If it wasn't, then the game isn't going to be able to work, so it stops booting before it potentially damages stuff.

    Quoted from jimy_speedt:

    knowing that on the boards, the current is generally Vdc at that stage.

    Technically it's DC, but it's not filtered, it's just rectified. All a bridge rectifier does is flip the negative half of the AC sine wave positive, so it still hits zero just like AC would. Cheaper to do after it's DC due to most digital chips only working with DC.

    If you want way too much detail, I touched on this in a recent blog post: http://zacaj.com/p.php?id=18&title=Custom+Bally+OS%2C+Pt+3%3A+Lamp+Control

    #7 1 year ago

    Apologies, There is a second concept I do not get either, which is the blanking.

    I mixed both, sorry.

    #8 1 year ago
    Quoted from jimy_speedt:

    Ok, and the fact that this is tested at boot by the CPU ? what does the CPU test exactly ?

    The cpu during the startup boot sequence waits for ONE activation of the zero cross via its CB1 interrupt request on U10. It does NOT measure the frequency nor correct for it in any way, which is why sometimes timing can be off for things that do depend on a steady frequency at this input (cheap squeak boards for sure, and possibly other bally auxiliary boards).

    Ditto for the 555 interrupt signal, tests only for ONE activation. There can still be problems in both these circuits if they are activating too much (especially the display circuit if the timing is off you will spend too much time in the display interrupt)

    #9 1 year ago
    Quoted from jimy_speedt:

    Apologies, There is a second concept I do not get either, which is the blanking.
    I mixed both, sorry.

    Blanking is just a periodic signal used for many of the same things. Usually referred to in classic Williams solid state as it's kind of a 'fail safe' in case the cpu locks up, the lamp matrix and solenoids won't lock on (in practice, they do.....)

    #10 1 year ago

    The blanking circuit I don't quite understand either :/ I think it's some sort of one-shot timer. When the MPU starts the display update process it enables all the display output chips using that common vertical line on the left, and part of that triggers the blanking circuit at the bottom to send out a timed blanking pulse to the displays, turning them off momentarily, and during that time the MPU sends new data?

    Quoted from slochar:

    it does NOT measure the frequency nor correct for it in any way

    It'd be cool if it compared the zero crossing and display interrupt signal timings and stopped if it detected a mismatch...

    Quoted from slochar:

    Blanking is just a periodic signal used for many of the same things. Usually referred to in classic Williams solid state as it's kind of a 'fail safe' in case the cpu locks up, the lamp matrix and solenoids won't lock on (in practice, they do.....)

    On williams yes. On Bally it's specifically referring to the display blanking signal

    pasted_image (resized).png
    #11 1 year ago
    Quoted from zacaj:The zero crossing watches the AC waveform coming from the wall and when it 'crosses' (equals) zero it sends a signal to the CPU. The output signal should be low and pulse high (5v) 120 times a second (or 100 in European countries?)

    Is it not the case that the zero crossing is twice the frequency of line voltage? The sine crosses zero on the way down and up for every cycle... I have always assumed and think I read that its not equal to line frequency- its double...

    Please correct me if I am wrong as this is somewhat fundamental to understanding.

    #12 1 year ago
    Quoted from zacaj:

    The blanking circuit I don't quite understand either :/ I think it's some sort of one-shot timer. When the MPU starts the display update process it enables all the display output chips using that common vertical line on the left, and part of that triggers the blanking circuit at the bottom to send out a timed blanking pulse to the displays, turning them off momentarily, and during that time the MPU sends new data?

    Yeah - the MPU is telling the displays to latch on to the data they were given. Then, in the next cycle, the displays have to be reset, so the blanking line pulses, dropping the latches on the displays, for the MPU to re-send them data.

    #13 1 year ago
    Quoted from Coyote:

    Yeah - the MPU is telling the displays to latch on to the data they were given. Then, in the next cycle, the displays have to be reset, so the blanking line pulses, dropping the latches on the displays, for the MPU to re-send them data.

    The blanking line isn't attached to the latches though, it goes to the blanking input of the BCD decoders. The latches are controlled individually by the MPU?

    Quoted from rufessor:

    Is it not the case that the zero crossing is twice the frequency of line voltage? The sine crosses zero on the way down and up for every cycle... I have always assumed and think I read that its not equal to line frequency- its double...
    Please correct me if I am wrong as this is somewhat fundamental to understanding.

    I think so? US outlets are 60Hz, European is 50Hz?

    #14 1 year ago

    The blanking signal on early Bally/Stern does as it says. It blanks the displays. At this moment, data is updated at the displays for the next digit and after they're updated, blanking is removed so the digit can be displayed.
    If the displays were not blanked during the update, then numbers will get ghosted/shadowed to the neighboring digit.

    A reason zero crossing is used is that it's a very accurate and simple low frequency timer.
    Here are some oscilloscope waveform snapshots I took a few days ago of zero crossing detector on an early Bally with respect to the zero crossing source:
    https://pinside.com/pinball/forum/topic/future-spa-father-and-sons-second-restoration/page/12#post-4646141

    #15 1 year ago

    Blanking is also used on williams as the second half of an AND. The lamps and solenoids need to see the blanking signal AND the drive signal to turn on the transistor. 7408s are used as the AND gates

    #16 1 year ago
    Quoted from Quench:

    The blanking signal on early Bally/Stern does as it says. It blanks the displays. At this moment, data is updated at the displays for the next digit and after they're updated, blanking is removed so the digit can be displayed.
    If the displays were not blanked during the update, then numbers will get ghosted/shadowed to the neighboring digit.

    Do you know what's up with the little circuit that generates the blanking? Am I right that it's a oneshot, or does it service some other timing purpose? I would have expected the MPU signal to just go straight out.

    Quoted from Cheddar:

    Blanking is also used on williams as the second half of an AND. The lamps and solenoids need to see the blanking signal AND the drive signal to turn on the transistor. 7408s are used as the AND gates

    Yeah. On williams blanking basically disables every output of the driver board, as well as the displays themselves

    #17 1 year ago
    Quoted from Cheddar:

    Blanking is also used on williams as the second half of an AND. The lamps and solenoids need to see the blanking signal AND the drive signal to turn on the transistor.

    I jump on this, as the explanation regarding the display is unclear to me. A use case with the timings would help but I do not want to abuse.

    Why is the blanking necessary to turn on the transistor ? In that case, how does this blanking signal work, thanks again.

    #18 1 year ago
    Quoted from zacaj:

    Do you know what's up with the little circuit that generates the blanking? Am I right that it's a oneshot, or does it service some other timing purpose? I would have expected the MPU signal to just go straight out.

    If the CPU locks up, there is potential for the displays to suffer from digit burn due to a single digit at each display being stuck bright on. The oneshot delay prevents this from occurring by making sure the displays stay blanked when no active blanking signal is being generated.

    #20 1 year ago
    Quoted from Quench:

    If the CPU locks up, there is potential for the displays to suffer from digit burn due to a single digit at each display being stuck bright on. The oneshot delay prevents this from occurring by making sure the displays stay blanked when no active blanking signal is being generated.

    Ah, so it's actually the inverse. It's a one shot that makes it so the blanking can only ever be off for so long.

    Quoted from jimy_speedt:

    Why is the blanking necessary to turn on the transistor ? In that case, how does this blanking signal work, thanks again

    To be clear, this is only in reference to williams machines, which don't have a zero crossing, and I assume isn't relevant to your original questioning as it's completely unrelated to the way a bally board works.

    In a williams, the goal of their 'blanking' is that, if the CPU isn't running, then all outputs should be disabled (solenoids, lamps, displays), so that nothing locks on and burns up. Their blanking signal is generated from a periodic keep-alive the MPU sends while it's operating. If that keep-alive is ever missing, the blanking signal activates via a timer and disables evreything.

    #21 1 year ago

    Thank you zacaj, and all the others,

    I mainly work with williams pinballs

    Promoted items from the Pinside Marketplace
    $ 156.00
    Playfield - Toys/Add-ons
    ModFather Pinball Mods
    $ 27.99
    Lighting - Interactive
    Lee's Parts
    $ 69.00
    Playfield - Protection
    The MOD Couple
    $ 9.99
    Eproms
    Matt's Basement Arcade
    From: $ 110.00
    Playfield - Toys/Add-ons
    Lermods
    $ 40.00
    Cabinet - Other
    ModFather Pinball Mods
    $ 169.95
    Cabinet - Sound/Speakers
    Pinball Pro
    $ 299.00
    Displays
    Boston Pinball Company
    $ 99.00
    Gameroom - Decorations
    Pinball Sales
    $ 131.00
    Cabinet Parts
    Tilted Pinball
    $ 24.00
    Playfield - Other
    Pin Monk
    $ 48.00
    Cabinet - Other
    ModFather Pinball Mods
    From: $ 9.99
    Eproms
    Matt's Basement Arcade
    $ 29.99
    Cabinet - Sound/Speakers
    Lighted Pinball Mods
    From: $ 99.99
    Cabinet - Other
    Lighted Pinball Mods
    $ 11.95
    $ 109.00
    Cabinet Parts
    Tilted Pinball
    $ 7,499.00
    Pinball Machine
    Operation Pinball
    From: $ 99.99
    Cabinet - Other
    Lighted Pinball Mods
    From: $ 9.99
    Eproms
    Matt's Basement Arcade
    $ 18.99
    Eproms
    Matt's Basement Arcade
    $ 7,399.00
    Pinball Machine
    Pinball Pro
    $ 154.00
    Cabinet - Toppers
    Id Rather Play Pinball
    $ 69.00
    Cabinet - Armor And Blades
    Id Rather Play Pinball

    Hey there! Got a moment?

    Great to see you're enjoying Pinside! Did you know Pinside is able to run thanks to donations from our visitors? Please donate to Pinside, support the site and get anext to your username to show for it! Donate to Pinside