(Topic ID: 319170)

Need pointers on reading switch matrix with an Arduino and WPC

By Lhyrgoif

1 year ago



Topic Stats

  • 4 posts
  • 2 Pinsiders participating
  • Latest reply 1 year ago by zacaj
  • Topic is favorited by 2 Pinsiders

You

Linked Games

No games have been linked to this topic.

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

    #1 1 year ago

    I searched this topic on Pinside and found out that there are several Arduino shields already developed for this purpose "out there". As I really want to understand/learn the electronics involved in this I don't want to go the easy way of just buying a finished solution, what's the fun in that I also found lots of threads here discussing similar problems but none of those were showing any actual circuit diagrams or such what I could see; therefore this thread.

    I work with programming as a profession so I'm confident that I can fix the software part (already done an Arduino addressable LED strip mod for example). I do need some pointers on the hardware side though as I'm rather new there.

    Currently I just want to read a few specific switches (4-5 or so) from the switch matrix of a WPC-S game (and further on for the other type of WPC games too but I guess it will be the same approach). I really don't need to read the whole 8x8 switch matrix.

    So far my general idea is to jack into the row and column connectors directly on the CPU board for the specific switches I want to monitor, feed each switch specific colum+row to an AND gate who in turn will be input to an optocoupler who in turn connects to an Arduino digital input pin. The AND gate would only output signal when both row+column is high, meaning the switch is activated (if It works as I think it does). I want the optocoupler in series for electric isolation just in case.

    I also plan on feeding the Arduino (and stuff it will control like lights and display) with its own power supply. I will probably need some resistors in there too somewhere lol. My problem now is going from this "overview idea" to an actual circuit diagram and I really do need some help here as I don't want to blow something up while trying/tinkering.

    I kind of understand the concept of pull-up and pull-down resistors but unsure that I need to use in this case. Also, Is there any use of sharing a common ground between the Arduino and the pin (but not the +) or should they be totally separate?

    Any help/pointers on this will be highly appreciated.
    Thanks

    #3 1 year ago
    Quoted from zacaj:

    Never actually done this, but Iirc Williams uses an active low matrix, so an and gate is probably the wrong choice. You probably don't want any pull ups since that could mess with signal. The mpu should already be taking care of that part.
    Some gates would work, but it won't be very scalable. Seems to me like it'd be easier to just get a level shifter and pipe every row/col you care about into the arduino, and then set up some interrupts on the columns to read the rows?

    Regarding logic circuits and poor scalability, that doesn't really concern me as I only want to listen to a few switches, not the whole switch matrix. Having a few ICs for handling logic is ok to me.

    Is it really electrically safe to feed parallell lines from CPU board row+columns directly into an Arduino?

    Also I need to Google up on level shifters, no idea what those are. Perhaps I know them by some other name, unsure right now.

    Still would be great with a simple schematic if possible.

    You're currently viewing posts by Pinsider Lhyrgoif.
    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/need-pointers-on-reading-switch-matrix-with-an-arduino-and-wpc?tu=Lhyrgoif 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.