(Topic ID: 239045)

Arduino Pinball Controller

By AmokSolderer

3 years ago


Topic Heartbeat

Topic Stats

  • 889 posts
  • 63 Pinsiders participating
  • Latest reply 8 days ago by Zigzagzag
  • Topic is favorited by 112 Pinsiders

You

Linked Games

No games have been linked to this topic.

    Topic poll

    “Are you using the APC and what's the reason if not?”

    • I'm using APC with MPF 4 votes
      15%
    • I'm programming APC natively 2 votes
      7%
    • I'm waiting for PinMame support 5 votes
      19%
    • I have an APC board, but I still have to populate it 3 votes
      11%
    • I would only use the APC if populated boards were available 13 votes
      48%

    (27 votes)

    This poll has been closed.

    Topic Gallery

    View topic image gallery

    IMG_20220326_054355 (resized).jpg
    IMG_20220324_115019 (resized).jpg
    0803_1 (resized).jpg
    IMG_20220306_221732 (resized).jpg
    IMG_20220225_113217 (resized).jpg
    IMG_20220224_102209 (resized).jpg
    afficheur (resized).jpg
    bootok (resized).jpg
    20220225_100158 (resized).jpg
    20220225_100214 (resized).jpg
    20220225_084428 (resized).jpg
    U1wrongPol (resized).jpg
    453DBE7E-8CD8-4CAE-82B9-46E2E87021F9 (resized).jpeg
    32FCCD80-1C7F-4782-84A2-0C0FFE9F3D78 (resized).jpeg
    BA633E7E-D152-46C5-932E-E625D68C0A1F (resized).jpeg
    257C7AE7-F22E-45D1-9BD9-ECF10BC10B75 (resized).jpeg

    There are 889 posts in this topic. You are on page 17 of 18.
    #801 4 months ago

    Here is the wheel test when at full speed. Ch1 = P1-4, which is input B, I believe. Ch2 = P1-5, which is input A.
    257C7AE7-F22E-45D1-9BD9-ECF10BC10B75 (resized).jpeg
    And here are some shots as it is slowing down in the wheel test
    BA633E7E-D152-46C5-932E-E625D68C0A1F (resized).jpeg
    453DBE7E-8CD8-4CAE-82B9-46E2E87021F9 (resized).jpeg
    32FCCD80-1C7F-4782-84A2-0C0FFE9F3D78 (resized).jpeg

    Looks like they are always 90deg off, and frequency varies with spin speed.
    Does this help?

    #802 4 months ago

    I've seen this issue with some WPC machines and pinmame, where some mechanism or other is controlled by what look to be solenoids but are used in some other way.

    In BOP, the helmet lamps are driven by a shift register. This is controlled by 2 "solenoids" - one is used for the clock signal and the other for the data. In addition the motor which turns the head is not driven at 100%, the "solenoid" which controls the motor drive is run with PWM at about 50% which requires that output to be driven fairly consistently.

    Capturing the data from pinmame at that low level was OK, but getting the really fine control over the output wasn't possible with the normal solenoid drive logic for the P-ROC. Fortunately the P-ROC has what's termed an "auxilliary bus" which permits microsecond accurate control over a limited set of outputs and I was able to use that in the most recent update for Dutch Pinball with their "BOP 1.0".

    Something else which the P-ROC can do which might be worth looking at here is the concept of a "patter" instead of a simple on/off for an output. Normally you drive an output either on or off. However from the pyprocgame documentation -

    -method:: driver_patter(number, milliseconds_on, milliseconds_off, original_on_time)
    -
    - Drives the specified driver *number* with an indefinite pitter-patter sequence, where the driver is repeatedly turned on for *milliseconds_on* and the -off for *milliseconds_off*, each with a max of 127.
    -
    - If *original_on_time* is non-zero, the driver is first pulsed for that number of milliseconds before the pitter-patter sequence begins, with a max 255.-
    -
    - Pitter-patter sequences are commonly used for duty cycle control of driver circuits. A case where *original_on_time* might be non-zero would be for a -single coil flipper circuit that needs to be driven to activate the flipper before the pitter-patter sequence is used to hold the flipper up.

    I did spend some time trying to get Pinmame and P-ROC to run an Indy 500 - it has a kind of turbo mechanism which is controlled by PWM to control the speed, but there is also an opto on it which measures the current speed and increases or decreases the PWM to speed up and down. I could never get the control fine enough, so there are possibly some circumstances where it's just not possible to do.

    #803 4 months ago

    Thanks Grangeomatic and Snux helped a lot to understand the problem.

    I have updated LISY a bit to allign more to the PROC code (there was a 'smooth paramter set to '1' with PROC;
    which was set to the default value '2' with LISY). Amoksolderer will test this LISY version and see if it helps.

    If not we may go to the 'drive_patter' method on Arduino

    Will report about the outcome ASAP ...

    #804 4 months ago

    I guess the patter request wouldn't be something that pinmame would send to APC, it is probably more something that the APC would handle via a pinmame exception.

    #805 4 months ago

    Thanks Jeff, that's exactly what we need. May be you want to put the APC in your Riverboat Gambler someday. In this case Kobza is doing the pipe cleaning for you.

    https://www.flippertreff.de/start/forum/topic/11821-apc-im-riverboat-gambler/#comment-94906

    It's in german, but I can keep you posted if you're interested.

    Quoted from Snux:

    I guess the patter request wouldn't be something that pinmame would send to APC, it is probably more something that the APC would handle via a pinmame exception.

    Yes, generating the pulses to turn the wheel would be quite easy. The problem is to know exactly how many pulses to generate. This is important because in the RG the wheel is used as a roulette with black, white and green fields on it.
    From the gameplay point of view it's like this: the player has to bet on a color, then the roulette wheel is spinning and the player wins or looses depending on which color is on top when the spinning stops.
    Technically there's an opto to detect one certain position of the wheel and after that the SW keeps track of the exact position by the amount of pulses it has sent to the stepper motor. Hence the SW always knows which color is at the top position.

    For us it means we have to know either the number of pulses or the color the SW intends to stop on (to calculate the number of pulses by ourselves).

    Quoted from bontango:

    Amoksolderer will test this LISY version and see if it helps.

    Well Kobza has to do it as I don't have a Riverboat Gambler.

    #806 4 months ago

    Progress.

    https://www.flippertreff.de/start/forum/topic/11821-apc-im-riverboat-gambler/?do=findComment&comment=94931

    Ralf has done some Lisy magic and control pulses have appeared.
    They're still not good enough to turn the wheel smoothly, but at least we can count them and do the actual pulse shaping in a PinmameException.
    For being able to do that I'd need one additional information: does the wheel always turn in the same direction or does my Exception have to detect it?

    #807 4 months ago

    I'm not in front of the machine right now, but from my memory, the wheel always goes in the same direction.
    And I believe it is clockwise...

    Jeff

    #808 4 months ago

    No rush. I won't be able to do anything before sunday anyway.

    #809 4 months ago

    Confirmed.
    Always the same direction, always clockwise.

    Jeff

    #810 4 months ago

    Thanks again. At the moment we're busy adding support for these special displays of the Riverboat Gambler.
    I guess the wheel has to wait until next weekend.

    2 weeks later
    #811 3 months ago

    I hadn't played my Pharaoh with the APC in it for a while (my bad) when my son told me that it wasn't working. I went to check it out, and it powers up, but appears that the Pi isn't booting. Initially, I jiggled some wires (the APC creates a bit of a rat's nest in a system 7 game - at least in mine) and it started working again. Played a few games on it.
    A week later, I power it up again, and it's back to not booting. The light on the Pi Zero does like 2 blinks and then goes blank. I jiggled the wires again, but this time it didn't help.

    Any suggestions before I pull out my schematics again and dive back into the APC? Actually, I'm in the middle of a Black Hole playfield restore and may not want to get too distracted at the moment, but ideas are welcomed.

    Thanks,
    Jeff

    #812 3 months ago

    I would look at two things to start.
    1) Pull the Pi out and see if it boots with a monitor. It may be failing to boot. Could be a dodgy or loose SD card or something like that.
    2) If the pi boots fine independently, check the solder joints on the connectors.

    #813 3 months ago

    ^^^good ideas.
    Problem is I’m using Pi Zero and don’t have an adapter for the mini HDMI output (or whatever it’s called).

    I did put in a different Pi and it did the same thing...two relatively slow flashes on the activity light that is normally really flickering, I’m assuming indicating communication or boot activity.

    #814 3 months ago

    Hello, finally i order APC boards on JLCPCB, i'll got them next week.

    My goal is to replace my Simpson Data East MPU, is there any people got it working with DE Games ?

    #815 3 months ago
    Quoted from Grangeomatic:

    I did put in a different Pi and it did the same thing...two relatively slow flashes on the activity light that is normally really flickering

    If the LED of the Pi doesn't flicker than it's not booting corrcetly and if it's not the Pi itself then it's probably a faulty SD card.

    BTW the communication status between the Pi and the APC is shown by the 3 LEDs on the APC board.
    As long as the Pi is booting all LEDs are off. When Lisy is up it attempts to contact the APC and the yellow LED turns on. If the attempt is successful the green LED is lit and if not then it's the red one.

    #816 3 months ago

    That's good to know. I'll see what I can do with a new SD card tonight and report back...

    It's been a while since I've messed around with the APC and Pis.

    #817 3 months ago

    Update:
    The roulette wheel of the Riverboard Gambler is now spinning nicely, but with no PinMame control yet. That means the next task is to read the still distortet pulses from PinMame and regenerate the exact number of pulses to make the wheel stop on the correct color.
    That will probably keep Kobza busy for a while.

    And Snux has resumed working on his famous F-14 again and for that he has started the first thread in our 'own APC projects' section in english language.

    https://www.flippertreff.de/start/forum/topic/11824-apc-in-f-14/

    Apparently, he has extracted all PinMame sounds and is ready to play.
    Now we're working on upgrading the features of the LED_expansion board for him to add his special LED effects.

    https://github.com/AmokSolderer/APC/blob/V00.23/DOC/LEDexpBoard.md

    #818 3 months ago

    Update: I quickly replaced my SD card with one from a LISY80 board that I'm not currently using and it booted up correctly. Looks like I'll need a new SD for the APC. (and I now realize I could've checked the booting without a display...duh)

    However, I seem to have lost my free play. I'm a bit rusty when it comes to navigating the APC settings, so I'll have to brush up on that a bit and see what I can see.

    Can you refresh my memory? When using APC, are the standard Williams settings no longer available? Do I no longer set audit 18 to 0 for free play?

    #819 3 months ago
    Quoted from Grangeomatic:

    When using APC, are the standard Williams settings no longer available?

    The Williams settings are available as usual.
    The only tricky thing is that if you hold down the Advance button for more than 1s with the Up/Down switch in UP position then you're going to enter the APC settings. However, this does not happen when Up/Down is pressed, so if you just browse the menus backwards then you can keep Advance pressed as long as you want.

    #820 3 months ago

    Pharaoh is up and running again. Thanks for the tips.

    Jeff

    #821 3 months ago

    Is it possible to do the initial test on system 11 with only 1j17 and display segments 2 plugged in, or is it a must to plug in the switches as well? (I'm waiting on jumper connectors in the mail).

    The game fires up and prints some garbage display, which makes me wonder if Transporter has a special display going on. The game has some strange animations that make interesting use of the displays.

    Edit: I missed the note on the APC initial tests page about adjusting the display settings. I'll test that and report back

    #822 3 months ago
    Quoted from gorgar007:

    Is it possible to do the initial test on system 11 with only 1j17 and display segments 2 plugged in, or is it a must to plug in the switches as well? (I'm waiting on jumper connectors in the mail).

    The switch connectors are just necessary to change the display settings.
    But, the connectors J1, J2 and J3 are mandatory for the display and I'd not recommend to try it without them.

    1 week later
    #823 3 months ago
    Quoted from tmator:

    Hello, finally i order APC boards on JLCPCB, i'll got them next week.

    Did you get your boards with the 74HCT273 populated?
    Apparently they are again/still of of stock at JLCPCB.

    #824 3 months ago
    Quoted from AmokSolderer:

    The switch connectors are just necessary to change the display settings.
    But, the connectors J1, J2 and J3 are mandatory for the display and I'd not recommend to try it without them.

    Finally made my jumpers today. Plugged in all recommended cables. When I turn the game on, both displays show garbage in all characters, then the display goes off. It doesn't seem to want to enter the settings menu.

    Any troubleshooting steps out there for this kind of startup?

    #825 3 months ago

    Alas, the Transporter schematics from ipdb.org are unreadable, but those from Bally Gameshow are good and I assume the displays are the same.
    At a glance they look identical to the BK2K ones, except for the split into two boards which means the display is supported and you seem to have some problem with your setup.

    I'd first check the cable connections, especially the ribbon cable is prone to mistakes. It's very easy to plug it with an offset or in the wrong direction.
    Then check the orientation of the ICs, I had one board which had an ICs populated the wrong way by JLCPCB! On the APC board the marking for pin 1 is a white line next to the pad (arrow symbol in the picture). You can see that the pin1 notch of the IC points in the other direction, so U1 was mounted the wrong way.

    If that doesn't help then you can try to change the default setting for the display to fit to yours. To do that look for the following line in APC.ino

    const byte APC_defaults[64] = {0,3,3,1,2,0,0,0, // system default settings

    and change it to

    const byte APC_defaults[64] = {3,3,3,1,2,0,0,0, // system default settings

    Then recompile the code and run it on the board without having an SD card installed.

    U1wrongPol (resized).jpg
    #826 3 months ago

    Thanks AmokSolderer

    Good news manually changing APC_defaults helped. The display was saying NO SD CARD FOUND | APC REV 00,22. After putting an SD card in, it recognizes the card and also reports NO HIGHSCORES NO GAMESETTINGS.

    I'm thinking I missed a step or loaded the software incorrectly? I copied all .ino files (APS, BaseCode, BlackKnight, Pinbot, PinMameExceptions, Tutorial, USBControl) and Sound.h to the folder when loading the APC firmware. Note I still can't enter into settings using the machine's buttons.

    #827 3 months ago

    I guess you have the 1J8, 1J10 and 1J14 connectors plugged in, right? These connectors are needed for the settings.

    Keep the Advance button pressed for more than 1s to enter the settings menu.

    #828 86 days ago
    Quoted from gorgar007:

    Note I still can't enter into settings using the machine's buttons.

    Any progress?

    #829 86 days ago

    Unfortunately nothing. The board doesn't seem to be recognizing the advance button. Tested the connection at the board during the button press and contact closure is working fine (pins 2+3) on 1J4. Also cleaned the board flux (I neglected to do this earlier). Fresh out of ideas.

    20220225_084428 (resized).jpg
    #830 86 days ago

    U19 is handling the diagnostic switches, so it might be worth checking the socket and solder joints of this one.
    May be also the direction and solder joints of RR1, RR7 and RR8.

    #831 86 days ago

    Is this the right direction for RR1? I think I have RR7 and RR8 mixed up. RR7 may be backwards as well. Could this cause the issue?

    20220225_100158 (resized).jpg20220225_100214 (resized).jpg
    #832 86 days ago
    Quoted from gorgar007:

    I think I have RR7 and RR8 mixed up. RR7 may be backwards as well.

    Yeah, looks like it. RR7 is definitely backwards and the values of RR7 and RR8 are swapped as well.

    Quoted from gorgar007:

    Could this cause the issue?

    Absolutely. The wrong direction of RR7 alone means that it can't pull up the sense lines of the switch matrix. That means your APC is not able to detect any switches.

    Be careful not to damage your board when desoldering RR7 and RR8. The upper pads can easily be ripped off when you apply too much force.

    #833 86 days ago

    Oops! I knew it was too good to be true, getting this soldered up right the first time.

    Will repair this and report back.

    #834 83 days ago

    Hello,
    i finaly got my boards.

    I start to make some tests with DE Games.

    DE displays are a little different dans nedd some work (i create an issue here : https://github.com/AmokSolderer/APC/issues/31)

    Bontango add Simpsons DE support on Lisy, i'll try it this week !

    afficheur (resized).jpgbootok (resized).jpg
    #835 82 days ago
    Quoted from tmator:

    DE displays are a little different dans nedd some work

    I'll add a setting for this kind of display, but if you choose 'Taxi' as a display setting then at least your upper display should be fine.
    However, this doesn't look like a pure SW issue. The top segment of your upper display seems to be permanently on which is more likely caused by a short circuit. Could you check the solder joints at 1J22, may be some solder was spilled there creating a short.

    Did you get your boards fully populated or did you have to populate some SMD parts by yourself, because they were of of stock at JLCPCB?

    #836 82 days ago

    Thanks, board was not fully populated by jlcpcb. I add manualy somme CMS.

    In this example, the top segment is not Always on va ut Always off. I'll check soleders.

    IMG_20220224_102209 (resized).jpgIMG_20220225_113217 (resized).jpg
    #837 82 days ago

    I checked solders on twoo segments connector and didn't found short

    #838 81 days ago
    Quoted from tmator:

    I checked solders on twoo segments connector and didn't found short

    Could also be a missing solder joint.

    In your upper display the 'A' segment seems to be missing. In the APC schematics this signal is named '1a'. It runs from pin 9 of U8 to pin 19 of 1J8 (Display Segments 2 connector). I'd try to measure this connection.
    If you soldered U8 by yourself then also check the pins 8 and 9 of this IC. These TSSOP packages are quite awkward to solder by hand and therefore prone to mistakes.

    #839 81 days ago

    I know that DE inverted *some* of the signals on their 2x16 displays compared to Williams, but I can't find any documentation on what. I guess staring at the schematics might help.

    #840 81 days ago
    Quoted from Snux:

    I guess staring at the schematics might help.

    I did a quick check and they seem to be identical to the Williams 2x16 alphanumeric type (BK2K) except of the segment inversion.

    I have just added a new display setting 'Data East 2x16' to the V00.23 branch which should do it.
    However, I don't think it'll fix the missing A segment, because that definitely looks like a HW issue to me.

    #841 78 days ago

    Ty for all, i did some tests.

    In this movie i boot with Data East display selected, after enter settings display going crazy :

    In this

    I stop an restart power after getting crazy display...

    Maybe HW/Solder fail somewhere to found ...

    #842 78 days ago

    I found that sometimes after applying updates to apc.ino, especially when configuration settings get added/updated, it's best to delete the settings file stored on the SD card (or at least rename it so you have a backup). It's called APC_SET.BIN - just delete the file, put it back in and start APC again. You'll need to set the display type up again as everything will be reset to default.

    #843 78 days ago
    Quoted from Snux:

    I found that sometimes after applying updates to apc.ino, especially when configuration settings get added/updated, it's best to delete the settings file stored on the SD card

    Yeah, you're right we've seen that before and the 'System Settings' menu has seen several changes in the 00.23 branch recently.

    So, I'd also recommend to either delete APC_SET.BIN or just to select 'Restore Defaults' from the 'System Settings' menu which will overwrite APC_SET.BIN with the default values.

    #844 76 days ago

    Ok, i found à solder between 8 and 9 on U11 now it's better. But some problem on the second display. Any idea ?

    IMG_20220306_221732 (resized).jpg
    #845 76 days ago

    Yeah, the second row is still treated as a numerical display, but this can be normal as the complete re-initialization of the displays is only done when you EXIT the system settings.

    Have you run 'Restore Defaults' yet? If not then this is the right time to do it. Select 'Restore Defaults' and 'Exit Settings'. Then re-enter the settings and choose your display.
    Afterwards, I'd run the display test of the BaseCode to check that everything is OK.

    #846 76 days ago
    Quoted from AmokSolderer:

    Alas, the Transporter schematics from ipdb.org are unreadable, but those from Bally Gameshow are good and I assume the displays are the same.
    At a glance they look identical to the BK2K ones, except for the split into two boards which means the display is supported and you seem to have some problem with your setup.
    I'd first check the cable connections, especially the ribbon cable is prone to mistakes. It's very easy to plug it with an offset or in the wrong direction.
    Then check the orientation of the ICs, I had one board which had an ICs populated the wrong way by JLCPCB! On the APC board the marking for pin 1 is a white line next to the pad (arrow symbol in the picture). You can see that the pin1 notch of the IC points in the other direction, so U1 was mounted the wrong way.
    If that doesn't help then you can try to change the default setting for the display to fit to yours. To do that look for the following line in APC.ino
    const byte APC_defaults[64] = {0,3,3,1,2,0,0,0, // system default settings
    and change it to
    const byte APC_defaults[64] = {3,3,3,1,2,0,0,0, // system default settings
    Then recompile the code and run it on the board without having an SD card installed.[quoted image]

    Don't let the JLC mess with the design if you can help it. They "fix" component orientation when things are do not pass some automated alignment check. If all chips are not all orientated the same direction that is an easy human error. Keep an eye on the DFM reports that comes about 12-24 hours after order and email them if you see an issue.

    To ensure JLC does not have to mess with your design to do SMT assembly, make sure your part in the software is rotated the same way as the easy eda preview in the JLC parts search so the component placement file has correct rotations. Also check that the center point is good, can be a bit confusing to find center on a a TO252 type part, but having the rotation right is the most important thing on parts that can be installed backwards.

    #847 75 days ago
    Quoted from AmokSolderer:

    Yeah, the second row is still treated as a numerical display, but this can be normal as the complete re-initialization of the displays is only done when you EXIT the system settings.
    Have you run 'Restore Defaults' yet? If not then this is the right time to do it. Select 'Restore Defaults' and 'Exit Settings'. Then re-enter the settings and choose your display.
    Afterwards, I'd run the display test of the BaseCode to check that everything is OK.

    Now it's ok, after restarting it's really better
    I boot Simpsons Data East with Lisy and display is ok ! I'll pug the switch matrix now.

    0803_1 (resized).jpg
    #848 75 days ago
    Quoted from tmator:

    I boot Simpsons Data East with Lisy and display is ok ! I'll pug the switch matrix now.

    I'd strongly recommend to do the initial tests before installing the Raspberry Pi.

    https://github.com/AmokSolderer/APC/blob/master/DOC/InitialTests.md

    #849 74 days ago
    Quoted from AmokSolderer:

    I'd strongly recommend to do the initial tests before installing the Raspberry Pi.
    https://github.com/AmokSolderer/APC/blob/master/DOC/InitialTests.md

    Yes it's what i'll do. For now i just boot lisy with display only connected.

    #850 74 days ago
    Quoted from tmator:

    I boot Simpsons Data East with Lisy and display is ok

    Interisting, I though I would need to do adjustments on the second line, because LISY handles Simpsons
    internally as 'SYS11C' which has a different segment layout on the second line.
    AmokSolderer is that something you correct on APC side?

    When you connect the switchmatrix please check if you can enter the Data East diagnostics, from the pinmame source
    the 'advance switch' is handlded inverse compared to SYS11, so might not work at the moment.

    There are 889 posts in this topic. You are on page 17 of 18.

    Reply

    Wanna join the discussion? Please sign in to reply to this topic.

    Hey there! Welcome to Pinside!

    Donate to Pinside

    Great to see you're enjoying Pinside! Did you know Pinside is able to run without any 3rd-party banners or ads, thanks to the support from our visitors? Please consider a donation to Pinside and get anext to your username to show for it! Or better yet, become a Pinside+ member!