(Topic ID: 239045)

Arduino Pinball Controller

By AmokSolderer

5 years ago


Topic Heartbeat

Topic Stats

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

    20240317_224906 (resized).jpg
    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

    You're currently viewing posts by Pinsider grangeomatic.
    Click here to go back to viewing the entire thread.

    #476 3 years ago

    I’m in for a group buy on through hole parts, too. Is the BOM already set for Mouser/Digikey? If not, I’m willing to put in some time to cross from Reichelt.

    Jeff

    1 month later
    #502 3 years ago

    I got in on the APC group buy and have my board soldered up, but that’s about as far as I got. Here’s a repost from the group buy thread. Any suggestions are welcomed.

    Hey, I got my board soldered up, programmed my Due on the bench, and started the “initial tests”, but nothing happened. Seems the Due is dragging down my 5v. It’s reading about a half a volt with the Due plugged in, but goes to a full 5v when I remove the Due. I measure essentially a short from the 5v pin to the Gnd pin.
    When I plug the due into the usb cable on my bench, no more leds. So yeah, I think I killed my due.
    I’m new to Arduinos, and I guess I bought a knockoff from Amazon. Is this something where I need to buy an official due? Is this a common thing? What can I check to make sure I don’t blow my replacement, too?

    Thanks,
    Jeff

    #505 3 years ago

    AmokSolderer , thanks for the feedback. Glad to hear this is not really uncommon. When I get home, I'll see if I have the same kind of clone as you and may give this a try. I'll report back whether it works or not.

    Jeff

    #506 3 years ago

    Ok, I got home and removed that voltage converter chip. Good thing we've got a surface mount rework station i borrowed from work.
    Now when I plug the Due into my computer via the USB cable, it lights up, at least. I haven't checked if the computer recognizes it or tried it in the APC yet, but this is promising!

    Jeff

    #510 3 years ago

    My knockoff Due is working. I have gotten through the initial tests and was playing music through the pinball speaker. Sounded great!

    So I guess with that dc converter removed from my Due, I can never power it through the Vin pin, correct? Or maybe through the DC plug, too? No matter...it was for APC from the beginning.

    Feeling pretty good about this. Gonna take a break and move forward more tomorrow.

    Thanks for the help,
    Jeff

    #515 3 years ago
    Quoted from AmokSolderer:

    What kind of power supply did you use when your Arduino failed?

    I had only powered it first via the USB programming cable (worked fine), then through the APC in my Pharaoh (seemed to fail instantly)...nothing else.

    #517 3 years ago

    I'd be interested in the Firepower version, as well, but like Matiou, I'm in no rush, either. I'm going to play around with the Pharaoh for a bit for now.

    Jeff

    #519 3 years ago
    Quoted from AmokSolderer:

    Different topic: what do you think about posting a short description of your APC setup (which machine you want to use and if you want to use it with MPF, PinMame or C code)? This would give us an overview of how our system is used and what to improve. Additionally you might find people working on the same stuff and could combine your efforts.

    I think that's a great idea. I'll start:
    I've been on a bit of a "gotta have a backup board" kick lately, plus I like soldering projects, so I've built some LISY80 boards, and some BallyFA boards. Now I just needed a way to get a backup Williams board, and the APC looked like a perfect project. I don't plan to build my own machine, or write my own rules, just use it as a backup.
    I currently have a Pharaoh, a Firepower and a Cyclone that it would work in, so those would be my top 3 at the moment, but also have access to a Jokerz, Riverboat Gambler, Blackout, and maybe some others at some friends' houses.

    Thanks for all the help and this great project!
    Jeff

    #529 3 years ago

    I tried to fire up my Pharaoh last night...no luck. Didn't have enough time to dig too deeply into why not. That'll hopefully happen this weekend with some debug logs and such.

    Question - is LISY 5.27-3 or newer required if I'm using the APC3.0? Are earlier versions of LISY not compatible?

    Thanks,
    Jeff

    #534 3 years ago

    Update: I couldn't wait until the weekend. I put the new LISY image on the SD and I have now played a game of Pharaoh via APC!

    Some things on the sounds seemed a bit off (I'm still using the original sound board), especially in the bonus count-down. And the cool "exit music" after the game got cut off a couple measures in, but I can look into that later. Overall, I'm pretty stoked, since it's working.
    Nice work, AmokSolderer and bontango and whoever else was in on this project.

    What's interesting is that yesterday, I had LISY V5.27-14, and I got nothing out of it. When I tried my Pi from the LISY80 (an earlier version of LISY from last year), I got a few LED flashes, then it seemed to reboot, but never actually started.

    Anyway, working today. Will play more with it over the next few days.

    Jeff

    #536 3 years ago

    Well, I guess I can't guarantee that I didn't have the Pi plugged in wrong, so that's an option, but I thought I checked it. Anyway, like you said, it's working now, so I'm not sure I'll be able to reproduce it.

    Jeff

    #538 3 years ago

    Spent some quality time with the APC/Pharaoh today. Thought I'd share some things and ask some questions along the way
    - First I ran it using the stock sound board. For the most part, it worked well, but I know there were at least a few sounds that were getting truncated, and there's probably some that I didn't realize. One was during the bonus countdown. It's hard to describe the sounds, but let's just say I could tell it wasn't playing the complete sound. Second was the game over song. It's one of the things I love about Pharaoh, and it got cut off after the first couple measures. This will not do!
    Question - is there a setting I'm not aware of that controls when sounds get cut off?

    So I decided to try it with the native APC sound hardware. This would require my first foray into Pinmame. I saw this coming, so I had messed around with it a little over the last couple weeks. The pinmame instructions say that they've recently implemented a "sound dump" feature, but I can't get it to dump anything when I press F6. Question - does anyone know how to get the automatic sound dump to work in pinmame?

    I got the sound debug log out of LISY, and after playing a game, it told me what sounds to start with. In this example, I need sounds 7f, 36 and 2e.
    sound logs (resized).jpgsound logs (resized).jpg
    Following the instructions, that tells me I need to play sounds 007f, 0036 and 002e out of pinmame, but those numbers don't play anything.
    bad sounds (resized).jpgbad sounds (resized).jpg
    Somehow I found myself using the given numbers followed by 1f. Not sure where that came from, but it seems to work.
    good sounds (resized).jpggood sounds (resized).jpg
    Question - can anyone explain why I needed to do this to get the proper sounds out?

    I'll continue in the next post

    #539 3 years ago

    I got about 20 sounds into it, so I became familiar with Audacity to change to 44.1kz and cut out the dead air. I also became familiar with the audiosave.pl that is provided from the APC Github. Got them all edited, converted, renamed and put on the APC SD card. It mostly worked well. There were some sounds missing, but that's to be expected. I've got 2 major questions at this point:
    1- Pharaoh has a droning sound that is typically playing through the whole game, but now it's getting cut off by the other sounds. I'll admit that I didn't save the 5min long version of this sound out of pinmame, but is there something I need to do to make it continue on? Do I just need to save a longer version of it?
    2- some of the sounds, out of pinmame, will play different phrases, even though they're the same sound number. How do I handle that so that it's not just saying the same things over and over?

    Thanks,
    Jeff

    [edit] - the bonus countdown and game over song now song now sound MINT!

    #542 3 years ago

    Thanks for all the great, detailed info. I’ll post a few things now that I can answer right away, but other things will need some time, and I need to step away to get some other things accomplished this weekend (though I’ll admit my main goal for the weekend was to get the Pharaoh/APC running, and that has been accomplished!)

    Cut-off end song - I’ve realized that the song extends beyond the end of the game. It actually spills into the attract mode, and when using the original hardware, it looks like it stops playing right when the attract mode kicks in. Probably some sort of “game over” command coming out of Pinmame that kills it. I’ll investigate further.

    Throttle - I have not adjusted this, because I don’t really know what it does. Probably still at 150.

    End song - when using the APC sound hardware, the two sounds that were giving me troubles on the orig hardware sounded perfect. I’ll try and get a vid to show the bonus countdown discrepancy. I’ve used the APC sound debug for a few games now, and it’s not barking at me for missing any sounds at the moment. I had 4 sounds I knew were missing, and it helped me find them.

    I’ll dig into the downloadable S7 file. That could be a big time saver. But I’d still like to know how to dump out of Pinmame. I’ve got a couple other machines I’d like to play with...

    36 & 2e - there was no significance to me using those sound numbers. Just wanted to share an example of my sound log with the group.

    Understood on the 1f

    Sound series and pitches - I had read about this, but somehow my brain put it into the Sys11 category, so I didn’t think it applied. My bad. I’ll get you those sound numbers with multiple call outs and the background sound number. This may have to wait a bit. Of course, once we’re done, this can be the “sound package” for others to use on Pharaoh. And now I know how to insert custom callouts to catch my friends off guard!

    #546 3 years ago

    I've been able to run through the sounds for the Pharaoh, both via PinMame and in the downloaded zip file you pointed me to. Things are looking good, and I've got all my WAV files ready to convert and such.
    Here's what I've found:

    I’ve been able to isolate the Pharaoh sounds from 00h to 1fh. As you explained, once I go to 20h, the sounds just start over again. Most are single-pitch sounds/speech, so they don’t need a “series”. Here are the exceptions:

    05h is a speech callout that has 4 different selections
    0ah is a speech callout with 2 different selections
    0dh is the background “music” or "sound", and it appears to have 31 different pitches. It should also be set to replay after other sounds are played. In Pinmame, the only way I can get it to stop is by playing “sound” 0ch, which is a blank sound, but appears to stop the background, if that makes sense
    10h is a speech callout with 2 different selections
    11h is a speech callout with 2 different selections
    17h is a speech callout with 2 different selections
    1ah is a speech callout with 4 different selections

    When you are able to get around to it (or if you'd prefer to guide me on how to do it myself), let me know when these updates can be applied to the Pharaoh APC file(s). I can then test it out and hold onto the SND files for others to use in the future, as needed. Unfortunately, I don't have any server space to offer up.

    Slightly different subject: correct me if I'm wrong, but it appears that if you are running the APC in sound debug mode to find those last few sounds, it does display the missing (and not missing) sound numbers in the player 4 display. However, it seems that it displays these numbers in decimal, not hex. I figured it out soon enough, but it did throw me for a loop at first, since all the other sound things I was dealing with were in hex.

    Thanks again,
    Jeff

    #554 3 years ago

    Thanks, Frank.
    I'll get on it this weekend and give feedback.

    Jeff

    #555 3 years ago

    short version - the stock hardware is working about 98%, totally good enough for most casual players. The APC hardware takes a bit of effort to get set up, but once you get past that, it's top notch. If anyone needs sound files for Pharaoh, let me know.

    Update from the weekend:
    I've been working on two angles here - 1 to run with the original sound board, and 2 to use the APC sound hardware and sound files on the SD card.

    Let's start with the original hardware:
    At first, running the stock sound card, it worked really good, except that the sounds in the bonus countdown seemed a bit "choppy", and that the end song would get cut off when it went into attract mode (if you're familiar with Pharaoh, you know this game end song). Didn't really like that, but the end song had come back after switching between the two modes. Now I'm back to the stock hardware, and AmokSolderer had suggested tweaking the LISY throttle value to adjust the speed at which pinmame is running. I've messed around with that a bit, and the bonus countdown still isn't right. It doesn't help that I have no computer near this machine, so to make a change I have to power down, remove the card, run upstairs, make the change, run back down and start over. But I did make it a little faster (I could notice the change in speed, but the countdown still wasn't right) and a little slower (still no love). But now the game over song is getting chopped off again. I think I'm going to leave it as is and step away for a bit. I'll probably tweak it a bit more later.

    Now to the APC sound hardware and the SD card. First, I realized I messed up with the sound numbers...there are 32 sound numbers. In hex (like pinmame uses), that's 00-1f. When you get to 20, it's only looking at the lowest 5 bits, so it's all the same and it just starts repeating. So 20-3f are the same as 00-1f, and I'm sure if you checked, 60-7f would be the same, too. Anyway, in that mode, the sound info I provided previously was not right, because even though the sounds are the same, Pinmame is actually asking for sounds 20-3f, so you have to name the files this way. And the update that was made (based on my wrong numbers) had to be updated again. I went in and corrected the numbers in the APC code on my local version, converted and renamed all the files (since some of the 32 files have multiple versions, there were actually 72 files to convert), and now when I run the APC sound hardware, it seems to work perfectly. The sound is awesome, there is zero hum coming out of the speaker, I'm getting the proper random voice calls, and I can hear the background droning sounds increase in pitch and speed as the ball lasts longer. I've got a hunch that this background sound is starting at a higher than normal pitch, but I'll have to look into that (or just ignore it).

    I'm totally digging this APC project!
    Jeff

    #558 3 years ago
    Quoted from AmokSolderer:

    Well, you really have a sensitive set of ears.

    But apart from that the APC generated sound is working 100%? No issues with bonus count down and end song?

    Must be the musician in me....
    I can make the interim change for now, or just live with it

    Yes, sound via APC seems to be 100%, bonus countdown and end song included. It even plays the annoying taunts during attract mode!

    2 weeks later
    #599 3 years ago

    matiou if you’re going to try the APC sound hardware with files on the SD card, definitely use the link given in post #541

    As I recall, it’s more than just sys7 games.

    These worked great for me on the Pharaoh. Saved a LOT of time. Sure, you still need to edit (or maybe not?) and convert each one, which is a bit tedious, but the APC sound hardware sounds awesome.

    Jeff

    #601 3 years ago

    Question: if I have a 3rd party software that will convert from WAV to SND, will that work for APC, or do I really HAVE to use audiosave.pl?

    #603 3 years ago

    Got it.
    It would be great if you could share some of these batch processes for those of us that are a bit less talented.

    #606 3 years ago

    Awesome. That’ll work for me.

    5 months later
    #705 2 years ago

    I’d be in if there was another run.

    1 week later
    #726 2 years ago

    ^ Nice work!

    4 months later
    #800 2 years ago

    I’ve got a Riverboat Gambler and a scope. Let me see if I can get on it tonight.
    When do you need it?

    #801 2 years 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).jpeg257C7AE7-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).jpegBA633E7E-D152-46C5-932E-E625D68C0A1F (resized).jpeg
    453DBE7E-8CD8-4CAE-82B9-46E2E87021F9 (resized).jpeg453DBE7E-8CD8-4CAE-82B9-46E2E87021F9 (resized).jpeg
    32FCCD80-1C7F-4782-84A2-0C0FFE9F3D78 (resized).jpeg32FCCD80-1C7F-4782-84A2-0C0FFE9F3D78 (resized).jpeg

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

    #807 2 years 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

    #809 2 years ago

    Confirmed.
    Always the same direction, always clockwise.

    Jeff

    2 weeks later
    #811 2 years 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

    #813 2 years 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.

    #816 2 years 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.

    #818 2 years 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?

    #820 2 years ago

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

    Jeff

    You're currently viewing posts by Pinsider grangeomatic.
    Click here to go back to viewing the entire thread.

    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, subscribe to Pinside+!


    This page was printed from https://pinside.com/pinball/forum/topic/arduino-pinball-controller?tu=grangeomatic and we tried optimising it for printing. Some page elements may have been deliberately hidden.

    Scan the QR code on the left to jump to the URL this document was printed from.