(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
    There are 959 posts in this topic. You are on page 8 of 20.
    #351 3 years ago

    Ok, something must be wrong with the outputs. I changed the switch handler for switch 8 to pulse each solenoid:
    void USB_SwitchHandler(byte Switch) {
    byte i = 0;
    switch (Switch) {
    case 8: // high score reset
    //digitalWrite(Blanking, LOW); // invoke the blanking
    for(int i = 0; i < 24; i++) {
    USB_FireSolenoid(255, i);
    }
    break;

    I expect to see a flash on each solenoid output, and I still get nothing.
    EDIt: Yeah, I see my stupid mistake. I reused i. Let me fix it. Still, the redefinition in the for loop should take precedence.

    #352 3 years ago
    Quoted from ThatOneDude:

    USB_FireSolenoid(255, i);

    Depending on your test circuit 255ms may not be long enough to see a flash.

    I think it would be easier to do it with a terminal program and the Lisy protocol:

    http://docs.missionpinball.org/en/latest/hardware/lisy/protocol.html

    You could use command 0x15 (Enable Solenoid at Full Power) to permanently turn on a solenoid and command 0x16 (Disable Solenoid) to turn it off again.

    #353 3 years ago

    I just released SW Version 0.13 and updated the documentation.

    The main improvement is that we have implemented PinMame support, watch my Pinbot video to see it working:

    For details about what's new, please read the changelog

    https://github.com/AmokSolderer/APC/tree/master/DOC/Changes.md

    #354 3 years ago

    Great stuff!

    Is PinMAME support still limited to the Raspberry PI build?

    #355 3 years ago
    Quoted from RatShack:

    Is PinMAME support still limited to the Raspberry PI build?

    Yes, we're focussing on the PI. We're even planning a new APC version with the Pi being located on the APC board. You wouldn't need an additional Lisy_Mini board or a USB connection then - it would just work on one board via I2C.

    Actually, we're collecting ideas for the new APC board at the moment, but up to now adding the PI is our only functional upgrade.
    So if you feel that something is still missing and should be included on a new board, now is the right time to tell us.

    #356 3 years ago

    I pulled the lisy pinmame code and started working on a smartmatrix DMD connection. If I get it working well, I'll share the code.
    In other news, I think my early damage might be hampering some of my work now, so I'm making 2 more boards and I'll check those. I gutted APC.ino to make a very simple solenoid activation, and none of it worked. Once I have another system built(without those oxidized SIP modules that caused me problems before), I'll be more sure of my testing. I'm almost done with the first step on the new boards, so I expect to be doing sound tests tonight.

    Quoted from AmokSolderer:

    Actually, we're collecting ideas for the new APC board at the moment, but up to now adding the PI is our only functional upgrade.

    For my work, a Pi is somewhat underpowered(even a Pi 4) compared to, say, an ITX board. When converting DMD frame information generated by pinmame into RGB information for Smartmatrix, for example, a Pi will lag where a cheap ITX will shine. Lisy uses the GPIO(and my previous DMD work did as well), but that doesn't have to be the case for all pinmame->APC connections.

    My preferred system, based on my needs:
    PC running pinmame or MPF
    (USB)
    |
    |------> APC for playfield control
    |------> Fadecandy for inserts
    |------> Smartmatrix for RGB DMD

    #357 3 years ago
    Quoted from ThatOneDude:

    For my work, a Pi is somewhat underpowered(even a Pi 4)

    Well, let's put it this way: you're probably not the typical user. I guess most guys are going to use the original segment displays and in this case even a Pi zero is enough to run PinMame on.

    For guys with special requirements like you, there will still be the USB control mode like it is today. That means you can just skip all this Pi stuff and connect what ever you want to the USB port.

    #358 3 years ago
    Quoted from AmokSolderer:

    Well, let's put it this way: you're probably not the typical user.

    Indeed, I am typically atypical
    I'll share my code shortly. I'm working on the Smartmatrix display first, but I plan on adding a direct connection to APC to pinmame, based on the lisy code(unless a simple way to use the existing code occurs to me).
    My new APC builds are going nicely. I'm planning on going back over the first board and repairing once I have the new ones up.

    #359 3 years ago
    Quoted from ThatOneDude:

    ...
    For my work, a Pi is somewhat underpowered(even a Pi 4)...

    Yeah, I have run into this.

    I'm used to designing dedicated comm boards that run in the hundreds of MHz rates. We needed a quick and dirty test fixture to simulate and verify a 2KHz synchronous serial stream. Bought a PI-4 with LCD and 'Ziosk' type case. Thought this would be a piece of cake to design using their GPIO header into RS422 drivers/receivers. But at that whopping 2Khz rate - we find huge gaps where the Pi-4 couldn't keep up with generating the data stream (haven't even got to the verification side yet). The latencies have to do how they incorporated the GPIO and the operating system access to the GPIO.

    #360 3 years ago
    Quoted from G-P-E:

    The latencies have to do how they incorporated the GPIO and the operating system access to the GPIO.

    IMHO it is mainly the OS, Linux is not a real time OS!
    Thats the reason why I choosed PIC Controllers for the time critical section with LISY.

    But you can patch the Kernel, have a look at: https://rt.wiki.kernel.org/index.php/Main_Page

    #361 3 years ago
    Quoted from bontango:

    IMHO it is mainly the OS, Linux is not a real time OS!
    Thats the reason why I choosed PIC Controllers for the time critical section with LISY.
    But you can patch the Kernel, have a look at: https://rt.wiki.kernel.org/index.php/Main_Page

    Correct. To get anything near a 2khz resolution on the gpio pins, you'd want to use RTLinux, a dedicated interrupt and direct memory writes to the GPIO regions

    For Pinball 2000, I ended up doing the same thing. Though you can also program it bare metal on the pi using a bit of assembler and jump into C

    I've done full pinball games using the RPi while also pushing out HD graphics. It can be done, but you have to optimize heavily. Generally full screen updates and long IO access times will kill you there.

    I'm currently rewriting the core to Demolition Man 2000 to move it from a clunky PC under the cabinet to a raspberry pi.

    #362 3 years ago
    Quoted from AmokSolderer:

    Yes, we're focussing on the PI.

    If the PI is able to emulate the displays via HDMI that might be enough to get me interested in using one.

    Windows PinMAME support for the USB control interface is very high on my list, let me know if there's anything I can do to help. Might try to hack something together.

    #363 3 years ago
    Quoted from bontango:

    IMHO it is mainly the OS, Linux is not a real time OS!

    Definitely the OS as well as the hardware interface drivers for the OS.
    We started off with Raspbian which is a Linux based OS.
    We know it is not an RTOS but we thought that 'surely, it can keep up with a slow 2K interface".... wrong.
    We had been evaluating RTOS options - then the covid virus started and the whole project got sidelined for the time being.

    We have used PICs in the past for home arrest system base units and they worked great. Didn't even consider them this time.
    The home arrest project was an absolutely fun project. You could never predict how tricky and devious some of the home arrestees were.

    1 week later
    #364 3 years ago
    Quoted from RatShack:

    If the PI is able to emulate the displays via HDMI that might be enough to get me interested in using one.

    You mean the display emulation from PinMame?
    I'm not really familiar with Raspberry Pis, but I heard that they're quite common for emulating old video games. So I guess if they have enough power to run a full video game emulation than it should be sufficient for the display emulation of PinMame also.

    May be jabdoa knows whether you can run MPF-MC on a Pi and what the performance limit is.

    #365 3 years ago

    You can run MPF-MC on a Pi. You'll run into I/O speed if you are pulling data from an SD card. If you are doing simple stuff, it should be fine. Look at the previous discussions on this thread to see more.

    My projects are on a standstill for a moment. I have to get a Flintstones and Lost World Jurassic Park cleaned up for next month, so my attention is sapped.

    #366 3 years ago
    Quoted from AmokSolderer:

    You mean the display emulation from PinMame?
    I'm not really familiar with Raspberry Pis, but I heard that they're quite common for emulating old video games. So I guess if they have enough power to run a full video game emulation than it should be sufficient for the display emulation of PinMame also.
    May be jabdoa knows whether you can run MPF-MC on a Pi and what the performance limit is.

    Yes, that's exactly what I mean.

    The PI probably doesn't have enough power for my MPF game, it uses a 1080p display and has a very large music library.

    My hope here is since the PI is communicating using serial-over-USB that the code is easily adaptable to the Windows build. If there's a PinMAME repo with these changes I'd like to check it out.

    #367 3 years ago
    Quoted from RatShack:

    The PI probably doesn't have enough power for my MPF game, it uses a 1080p display and has a very large music library.

    My hope here is since the PI is communicating using serial-over-USB that the code is easily adaptable to the Windows build. If there's a PinMAME repo with these changes I'd like to check it out.

    Why not ditch the Pi for an ITX or micro ATX motherboard with a Debian install? No need to adapt to Windows at that point.

    #368 3 years ago
    Quoted from ThatOneDude:

    Why not ditch the Pi for an ITX or micro ATX motherboard with a Debian install? No need to adapt to Windows at that point.

    Yes, but I'm adapting to Linux at that point.

    I'm a Windows developer by day so I already have the dev tools and frequently work with serial comms to hardware devices. I would rather contribute code to the project than adapt to a whole new OS.

    My machine doubles as a virtual pin so I'd prefer to use the same software as my desktop.

    I haven't looked at P-ROC protocol, if it's not too bad maybe it could be implemented on the APC, avoiding the need to modify PinMAME.

    #369 3 years ago
    Quoted from RatShack:

    The PI probably doesn't have enough power for my MPF game, it uses a 1080p display and has a very large music library.

    My hope here is since the PI is communicating using serial-over-USB that the code is easily adaptable to the Windows build. If there's a PinMAME repo with these changes I'd like to check it out.

    The RPi can play 1080p if encoded correctly and it also can play multiple music tracks. However, we do not recommend this for a one-off as it involves a lot of tuning to get it running smoothly. Additionally, asset loading from an SD card is not particularly fast in most cases so start-up times will be quite high.

    More in the docs: https://docs.missionpinball.org/en/dev/hardware/computer/index.html

    #370 3 years ago
    Quoted from AmokSolderer:

    I did a shaker controller for a friend of mine. It features an Arduino Mini (or Nano) with 16 inputs which are 100V tolerant.

    Hi Frank, could you suggest a through hole equivalent to the BSS123 ? I don't think I'm good enough to solder tiny surface mount components

    #371 3 years ago
    Quoted from matiou:

    Hi Frank, could you suggest a through hole equivalent to the BSS123 ?

    I have the stuff lying around here so I hope I can try it out next weekend.
    Basically you need a FET with a low Gate Threshold Voltage or your input pin of the Arduino won't recognize a H level. Of course the maximum Drain Source voltage of the transistor should be well above the voltage being applied to it.

    #372 3 years ago

    What I wanted to say is that it doesn't make sense to recommend any transistors before I don't know if the one I have in mind does even work correctly.

    #373 3 years ago

    Can the APC be used to drive the Gottlieb System 3's driver board (MA-1358)?. I am currently maintaining a Cue Ball Wizard, and it could be a nice opportunity to test the MPF on it, maybe on a Pi with a SmartMatrix DMD, if at all possible.
    These Gottliebs are very solid machines, quality material, very hard to break if maintained properly. A weak point of most of them is the gameplay rules, which are generally too crude and not deep or "rewarding" to the player. Too much "generic stuff" between the titles. I think that's one of the reasons why Bally/Williams won in the DMD era, the games were simply better. But these System3s could get a lot better with new sets of rules. Plus they can easily be enhanced for stereo sound
    So solenoid selection would be no problem I guess, as everything is driven by 74HC273s which could be selected from the Arduino, but as the lamp and switch matrix share the strobe signal, this section is not that trivial.
    Anyone with experience on this?
    TIA

    #374 3 years ago

    That sounds like a question for RatShack

    #375 3 years ago

    Not familiar with the System 3 hardware design. You'd need to modify the APC board design and code to add support, but it should be possible with enough work. Everything boils down to binary inputs and outputs.

    1 week later
    #376 3 years ago

    Found some time to test the shaker controller
    https://pinside.com/pinball/forum/topic/arduino-pinball-controller/page/5#post-5511845
    and it works as expected.
    I just used some very basic test SW which is only indicating that the pin has been triggered. That means I didn't test the decoding of the lamp and switch matrix, but the signals look perfect on the oscilloscope so I don't expect any problems there.

    Quoted from matiou:

    Hi Frank, could you suggest a through hole equivalent to the BSS123 ? I don't think I'm good enough to solder tiny surface mount components

    Finding adequate through-hole components seems not to be so easy any more. It has to be an N-channel enhancement MOSFET. The maximum gate-threshold voltage should not exceed 2V and the maximum drain-source voltage should be greater than 80V. I guess the TN0110 should do the job.

    If you just want to trigger on solenoids and not on matrix signals like switches and lamps you could also spare the whole MOSFET stuff and use a simple 1N4148 diode instead. You would then have to use the internal pull-up resistors of the Arduino and connect the anode of the diode to the corresponding Arduino pin.

    #377 3 years ago

    Anyone have an extra PCB they’d sell?

    #378 3 years ago
    Quoted from Kneissl:

    Anyone have an extra PCB they’d sell?

    Of the shaker board?
    I never ordered boards, but just etched one for a friend of mine. As it is so simple it could also be done on a breadboard.

    #379 3 years ago
    Quoted from AmokSolderer:

    Of the shaker board?
    I never ordered boards, but just etched one for a friend of mine. As it is so simple it could also be done on a breadboard.

    The main APC board.

    #380 3 years ago

    BTW, we're working on a new (and probably final) Version of the APC board. Schematics and first layout are done albeit not yet released.
    The only difference to V2.4 is that on the new APC board the Raspberry Pi is also included. Therefore no additional Lisy_Mini board is needed any more if you want to run PinMame or MPF without a PC connected.
    The use of the Pi is optional. If you don't populate it then you have the same functionality as in V2.4. Even if the Pi is populated you can still select the USB port for communication. That means you can use the on board Pi for PinMame and still use your PC to develop some MPF rules for your game.

    As many people seem to have problems populating the APC boards, I'm thinking about doing an additional layout for automated assembly. From my point of view there're three options:

    1. I'd try to move as many of the SMD components to one board side, as this is required by most chinese board manufacturers to do surface mount assembly. However, I'd keep the large 1206 packages and the through hole ICs, so it's likely that not all SMD components will fit on one side.

    2. Same as 1, but I'd change the packages to 0603 to ensure that the whole SMD stuff fits on one side.

    3. Same as 2, but I'd change the ICs to SMD also. This would leave only the connectors and some special components to be soldered by the user. In case of a repair you would then have to deal with SMD ICs of course.

    What do you prefer?

    #381 3 years ago

    for me the best would be something that is fully populated and working that could be ordered from pcbway or similar. The way pin2dmd works is great. You just select the board on their website and you drop in the BOM and they can sell it to you bareboard or fully populated and soldered ready to go. For me I would pay the extra for the ready to go option. I can solder but really don't have the time. I'd rather spend my time on the coding and leave all the soldering to the folks in China (or wherever)

    #382 3 years ago

    I like assembly, so more through hole. Count me in on the next group of boards.

    #383 3 years ago
    Quoted from jamescardona:

    For me I would pay the extra for the ready to go option. I can solder but really don't have the time. I'd rather spend my time on the coding and leave all the soldering to the folks in China (or wherever)

    same for me ... and about the costs: it's sometimes even cheaper to get the full populated board from China then with buying the components and do the soldering yourself.

    Of course with option 3 it is a lot of work todo for amoksolderer ...

    #384 3 years ago

    I would prefer all of the smd parts to be on one side. I'm ambivalent about the ICs being smd or not, if I'm getting them prepopulated.

    #385 3 years ago

    I mainly just want the latest version.. in whatever form

    #386 3 years ago
    Quoted from bontango:

    Of course with option 3 it is a lot of work todo for amoksolderer ...

    Doing layout work can even be fun from time to time, but browsing component lists is almost at the same fun level as doing my annual tax declaration.

    Quoted from ThatOneDude:

    I'm ambivalent about the ICs being smd or not, if I'm getting them prepopulated.

    I think nowadays most manufacturers only populate SMD components ...

    Quoted from Kneissl:

    I mainly just want the latest version.. in whatever form

    The prepopulated form has one big drawback of course - five boards will cost a lot more.
    Up to now you could just order five boards and only use one, but when you also have to pay for the components this is not a good deal any more.

    The do-it-yourself version is more or less ready, but I think I'll give the SMD design a try and release them both together.

    #387 3 years ago
    Quoted from AmokSolderer:

    The prepopulated form has one big drawback of course - five boards will cost a lot more.
    Up to now you could just order five boards and only use one, but when you also have to pay for the components this is not a good deal any more.

    Shops such as seeed will still produce 5 or 10 boards and just populate one of them. However, setup cost are most significant in that case.

    #388 3 years ago

    Whatever the popular group buy is i want in that list.

    #389 3 years ago

    Generally anything less than ~50 or so units the fab will likely hand solder anyway. However I've recently had to convert most of my board designs to use SMD components just because of the availability (and often cost).

    While this board was moderately difficult to put together (just from the time spent), it was a rather therapeutic break from programming for a change

    I checked my parts racks, and I do have 4 blank v2.4 PCBs if anyone could use one.

    #390 3 years ago
    Quoted from Compy:

    I checked my parts racks, and I do have 4 blank v2.4 PCBs if anyone could use one.

    What’s the big difference between 2.4 and this latest?

    #391 3 years ago
    Quoted from AmokSolderer:

    The only difference to V2.4 is that on the new APC board the Raspberry Pi is also included. Therefore no additional Lisy_Mini board is needed any more if you want to run PinMame or MPF without a PC connected.
    The use of the Pi is optional. If you don't populate it then you have the same functionality as in V2.4. Even if the Pi is populated you can still select the USB port for communication. That means you can use the on board Pi for PinMame and still use your PC to develop some MPF rules for your game.

    I'm just running on that paragraph as the main difference.

    1 week later
    #392 3 years ago

    Getting close, thanks @compy!

    F3CB63D6-7F5B-4A95-9E56-CA83120B5FB1 (resized).jpegF3CB63D6-7F5B-4A95-9E56-CA83120B5FB1 (resized).jpeg
    #393 3 years ago

    Got audio and display going!
    Great work AmokSolderer !

    12F1FF58-9819-4B1F-B339-8BD8200B6C2E (resized).jpeg12F1FF58-9819-4B1F-B339-8BD8200B6C2E (resized).jpeg
    #394 3 years ago
    Quoted from Kneissl:

    Got audio and display going!
    Great work amoksolderer !
    [quoted image]

    This is fantastic! You worked fast

    Can't wait to see what you cook up!

    #395 3 years ago
    Quoted from Kneissl:

    Got audio and display going!

    Do you use this Whirlwind only for testing or is this the machine you want to use the APC in?
    I'm asking because Whirlwind uses a so called 'Sound Overlay Solenoid Board' to be able to control five additional solenoids and you'd be the first to test it with the APC.
    This board can be connected to the HW_ext interface, but I still have to add the corresponding SW option.

    So, if the Whirlwind is your target machine, you should ignore this Overlay Solenoid Board for starters. If you got everything else working, I have to add the SW Option and we have to give it a try.

    #396 3 years ago

    Target machine is this. But if you want someone to help test the sound overlay board shoot me a pm and I’ll do what i can.

    83A7645B-45D4-431C-A2DB-E31D696175C4 (resized).jpeg83A7645B-45D4-431C-A2DB-E31D696175C4 (resized).jpeg
    #397 3 years ago

    I DID IT...

    The Gottlieb System 80B lamp board. I am never hand wiring a board this complex again.

    Once I run jumpers between the sets of connectors it will have System 1 support as well.

    20200612_042150 (resized).jpg20200612_042150 (resized).jpg

    #398 3 years ago
    Quoted from ThatOneDude:

    For my work, a Pi is somewhat underpowered(even a Pi 4) compared to, say, an ITX board. When converting DMD frame information generated by pinmame into RGB information for Smartmatrix, for example,

    I implemented a routine to send the raw frame data of pinmame to my PIN2DMD. That way there is only the USB transfer to be handled by the Pi and the frame calculation is done by pin2dmd

    #399 3 years ago
    Quoted from RatShack:

    I DID IT...
    The Gottlieb System 80B lamp board. I am never hand wiring a board this complex again.
    [quoted image]

    Impressive prototype board! Nice!

    #400 3 years ago
    Quoted from Kneissl:

    Target machine is this.

    Well, this doesn‘t look like it‘s going to need more than 24 solenoid drivers.

    Quoted from Kneissl:

    But if you want someone to help test the sound overlay board shoot me a pm and I’ll do what i can.

    That won‘t be necessary. It’s just that I didn’t implement the SW for the solenoid expander board yet and the ‚Sound Overlay Solenoid Board‘ is very similar just with less drivers. So, if Whirlwind was your target machine I‘d have to do it for you being able to use all of Whirlwind‘s solenoids, but now it looks like I have a bit more time.

    Quoted from RatShack:

    I am never hand wiring a board this complex again.

    The master of breadboarding strikes again.

    There are 959 posts in this topic. You are on page 8 of 20.

    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/page/8?hl=jabdoa 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.