(Topic ID: 104889)

PinLightShield: Control your own Mods with an Arduino board

By BigLebowski

9 years ago

Topic Heartbeat

Topic Stats

  • 40 posts
  • 12 Pinsiders participating
  • Latest reply 3 years ago by Ashram56
  • Topic is favorited by 47 Pinsiders


Linked Games

No games have been linked to this topic.

    Topic Gallery

    View topic image gallery

    P1100812 (resized).JPG
    P1100808 (resized).JPG
    P1100810 (resized).JPG
    P1100809 (resized).JPG
    PinLightShield User Guide v0.2.pdf (PDF preview)
    P1050360 (resized).JPG
    P1100243 (resized).JPG
    P1100241 (resized).JPG
    P1100236 (resized).JPG
    P1100235 (resized).JPG
    P1100175 (resized).JPG
    P1100168 (resized).JPG
    P1100179 (resized).JPG
    PLS with description (resized).jpg
    #1 9 years ago

    We´ve built a little board which makes it fairly easy to build your own Pinball lightshow. We called the board PinLightShield, although it can potentially do a few more things like controlling shakers, motors, other lights etc.
    The board is based on the popular Arduino platform about which you can read a lot on the web. In short the Arduino is a little processor that can consume input signals and drive output signals. What it does is controlled by little pieces of software (called sketches), which are written in a C-like language and lots of examples can be found on the web.
    Our PinLightShield takes up to 15 Pinball signals (insert lamps, GI, flashers, coils) as input, converts them through optocouplers into signals the Arduino can understand and then drives up to 6 output signals
    which can be used to light RGB LED strips, single LEDs, motors, shakers etc. - basically everything that would run on 12VDC.
    All that´s needed (in addition to the PinLightShield) is the Arduino Uno board, the Arduino sketch, some wiring between the pinball machine and the shield and of course the hardware that you want to control (LED strips etc.).
    In all likelihood you will also need a decent power supply, because the Arduino can only drive a few 100 mAs. The shield itself is designed to handle as much as 7 amps on each of the 2 output connectors.

    Here are pictures of the empty board, the assembled board and the board sitting on the Arduino Uno:

    Here´s a picture of the shield and power supply ready to be put into a pinball machine:

    The first project I did with the PinLightShield is a lightshow for my AC/DC with surround lighting for the cab+backbox and a stage lighting for the band. Here´s a short video showing what it looks like. Unfortunatley my game play sucks even more than normal when the recorder´s running...
    AC/DC Lightshow

    Important: even though this shield makes it easier to create fantastic light effects it still requires basic programming skills, making connections into your pinball machine, connecting a power supply with your pin, connecting LED strips etc. If you don´t feel comfortable doing these things then this is not for you. Sorry. For all others it´s a way to add more fun to your favorite pinball machine.

    For now we´ve only produced 10 empty boards, but if there´s demand in the pinball community we can easily create more.

    Just let me know if you´re interested or have any questions.


    #2 9 years ago

    Dropbox does not work

    #3 9 years ago
    Quoted from pinball_erie:

    Dropbox does not work

    Pinside is truncating the link. You'll need to add it using proper href HTML tags instead.

    #4 9 years ago

    Thanks for the hint, the link should work now and I learned something about href tags

    #5 9 years ago

    Are the outputs PWM?

    #6 9 years ago

    Yep, all 6 outputs are PWM

    #7 9 years ago

    Now I also tried a shaker motor with the PinLightShield. The result can be seen in the attached video.
    BTW, the white breadboard with all the cables and stuff is only needed in this test setup. In the pin you would only need the Arduino with the PinLightShield on top plus a power supply similar to the one in this video.
    As you can see the motor starts running at around 15. This means that I´m writing ~38 to the PWM output that controls the motor. So there´s a lot of upside, because the output can take up to 255, and I didn´t dare going beyond 25 (~63 real value) to prevent the shaker from flying through my basement.
    Three of the six outputs of the PinLightShield are protected against inductive loads and I´m using one of those in this little experiment.

    2 weeks later
    #8 9 years ago

    The careful reader may have noticed that I didn´t mention the detection of "switches" so far. That´s because switches need some additional logic to be reliably detected. We´ve designed an extension to the PinLightShield which simply goes on top of it to add the ability to detect up to 6 switches.
    The design so far has been tested on WPCs and an AC/DC pin and works fine.
    It uses the Arduino channels A0 to A5 for that and the channels that are used for switches can´t be used for something else anymore.

    Here´s the finished layout for the extension:


    We´ll produce a limited number of these boards and I´ll post a picture of the assembled board and how it connects to the PinLightShield once I have it here.

    4 months later
    #9 9 years ago

    Finally the Switch Shield is ready. It allows you to control your mods also from switches in your pin (not only flashers, inserts or coils). This gives you a much higher flexibility because many game situations can only (or more easily) be detected by reading the state of one or more switches (e.g. Multiball: just read a few trough switches to detect if a multiball mode is active).

    This is the Switch Shield sitting on top of the PinLightShield:

    You can see the two 6-pin headers in the lower left and upper right (J1+J2)? That´s were you connect the signals (row+col) from the switch matrix to. The rest is done by the Arduino and the PinLightShield.

    This is the view from the side (Arduino + PinLightShield + Switch Shield):

    BTW, the Switch Shield also works with just the Arduino. That way you can use it to monitor switches during game play to diagnose problems in the switch matrix. All you need then is a few LEDs that connect to digital outputs of the Arduino that show the status of those suspect switches.

    This would look something like this:

    I had some strange problems with the lockup switches in my Roadshow and this little monitor helped me to diagnose that.

    The switch detection so far has been tested and confirmed to work on WPC and Stern machines. I will test it also on my Data East GnR, but I don´t see a reason why it wouldn´t work there.

    I´m happy to produce a few more of these boards and offer them here. I could sell them 'naked' or bundled with the necessary parts or even fully assembled and tested.

    Just let me know if there´s any interest.

    #10 9 years ago

    I´ve also written a little User Guide for this which documents what can be done with the PinLightShield and the Switch Shield and how to accomplish it. It also describes a little bit how to get started writing your own first sketch that reads inputs and controls outputs.

    #11 9 years ago

    Today I tried the Switch Shield on my Data East GnR and it works perfectly.

    Data East (and Stern and maybe others as well) used a 5V switch matrix which means that the 6.8k resistors on the board must be bridged.
    On the next revision of the board we will provide soldering pads, which make it easier to bridge those resistors. This will look like this:

    switch shield mit Lötpads (ausschnitt).JPGswitch shield mit Lötpads (ausschnitt).JPG

    #12 9 years ago

    Have a SwitchShield ordered! Can't wait to try this out.

    2 weeks later
    #13 9 years ago

    Now I´ve posted my PinLightShield library on github PLS Library.
    This library makes it a lot easier to write sketches for all kinds of things you can do with an Arduino and the PinLightShield. It contains light effects for RGB strips and many more useful functions:

    • show a rainbow-like color change
    • do a two-color flash
    • do a multi-color flash
    • do a two-color fade back and forth
    • read switches and opto switches
    • determine the state of an insert (on, off, blinking)
    • read flashers, motors, shakers etc.

    The library is programmed in a way that it never uses Arduino functions like delay() which basically keep the Arduino from processing signals while that function is active. So for example if you use delay(1000) in your sketch (or in a library function) and a switch that you monitor gets closed during that 1000 ms the Arduino will not recognize that and therefore your sketch can not react to that.
    In some cases this may be a desired behaviour - in some cases not.
    I also wrote a little documentation that explains the usage of the various library classes and functions. I hope this gives a better understanding.
    Feel free to use this library and let me know if you find any bugs or have any questions about the usage. There´s also a small test sketch included that shows the different light effects.

    #14 9 years ago

    This is really great stuff! Can't wait for my board to arrive to try this out.

    #15 9 years ago

    And here´s the new SwitchShield:


    These (in the red boxes) are the solder pads, where you "adapt" the board to the voltage level of the switch matrix:

    P1060564 Solderpads.jpgP1060564 Solderpads.jpg

    Bridging the resistors via these solder pads means, that the board runs in a pin with a 5V switch matrix (e.g. Stern, DE). Doesn´t matter if the resistors are in or out in that case.
    IMPORTANT: Putting a board configured for 5V into a pin with a 12V switch matrix will destroy the ICs on the board!!!

    #16 9 years ago

    I read through some of your code for the SwitchShield on GitHub yesterday. Seriously good stuff. Well written and document! Do you have a license you are going to use for it (e.g., GPL?) Also, do you have assembly/install directions for the SwitchShield?

    #17 9 years ago

    I never thought about that license stuff but GPL is fine and I added the COPYING file to the Github repository (I took it from your repository ).
    I didn´t put together assembly/install instructions because I believe it´s pretty obvious from the print on the board. If you feel that´s not the case please let me know and I´ll write a little assembly guide.

    #18 9 years ago

    Great that you went with GPL (or any open source license). I'll give it a go (when it arrives) without any instructions (it does look very well explained on your boards.) Hope it arrives soon and thanks again for your work in developing this mod.

    #19 9 years ago

    I wrote a little Quickstart Guide for both boards that explain assembly and installation. Hope the guide helps those who ordered the boards from me. If I missed anything important please let me know and I will correct/amend.

    PinLightShield Quick Guide.pdfPinLightShield Quick Guide.pdf

    3 months later
    #20 8 years ago

    A quick update: since we ran out of boards a while ago we´re now working on version 2 of the PinLightShield. This version 2.0 will feature a few enhancements, notably:

    • moved the MOSFETs, so that there´s no more danger to touch the Arduino USB connector and accidentally create a short
    • option to integrate a 5V switching regulator on the board providing up to 5A to drive digital LED strips (so no need to stress the pin´s 5V line anymore and no need for an extra 5V power supply either)
    • option to use more flexible terminators for the connections to the pin´s signals (see picture below) - no need to wire a new IDC connector when you want to try a new signal from the pin, just insert the wire in the terminal and close the lever. Standard 0.1" headers are still supported, too.
    • Arduino D0 is not used anymore because it´s unusable anyway
    • instead added D11 to the list of ports that can be used as input or output (configurable by jumper), so we now have 3 PWM ports as outputs, 3 PWM ports as input/output, 12 ports as input and 1 port as input/GI input
    • added 4 mounting holes in the corners of the board

    We´ll show the new layout as soon as it´s finished.


    8 months later
    #21 8 years ago

    Any reason that this would / would not be able to interface with a Williams system 3-7 lamp / switch matrix?

    #22 8 years ago

    I'm really interested in this mod. If anyone has a spare laying around that they're not using and would be willing to part with, please send me a PM. I also have an ad running here: https://pinside.com/pinball/market/ad/31763

    1 year later
    #23 6 years ago

    Finally the second revision of the PinLightShield is ready. It took quite some time and I apologize to all the folks
    that asked if they could get one of those boards since I ran out of the rev1 boards. The new PinLightShield is now perfectly equipped to control classic RGB LED strips as well as digital (aka "addressable") LED strips as well as motors, shakers, flashers and whatever else runs on 12 VDC.
    The board can work with coils, flashers, motors, controlled lamps and GI as input signals - and with the optional SwitchShield (which has also been redesigned) it can even use the switch matrix as input signals (up to 6 switches).

    rev2 features the following improvements over rev1:

    - 3 mounting holes (the 4th just wouldn't fit on the board but I figure 3 should be good enough)
    - in rev1 there was the possibility that the solder pads of the MOSFETs touched the USB port of the
    Arduino - this has been corrected
    - an optional 5V on-board power supply for digital LED strips (Pololu 24V25F5 or 24V50F5), that can deliver up to
    5 amps. The Pololu is a modern step-down regulator that works very efficiently. It´s not quite cheap, therefore
    it´s optional but it relieves you from providing 5V in addition to the 12V the Arduino system needs anyway.
    - 4 outputs (D2, D4, D7, D8) to control up to 4 digital LED strips (WS2811/WS2812)
    - 6 outputs to control 1 RGB strip and an additional RGB LED strip or up to 3 different 12V devices
    - D0 is no longer used
    - D11 can now also be used as input or output, configurable by jumper
    - GI is now on D1 (instead of A0 as in rev1), so that all 6 analog inputs are available for the SwitchShield even if you use GI as an input
    - optional SwitchShield to use up to 6 switches as input signals

    Here are a few pictures of the re-designed board:

    Fully assembled board with description of inputs and outputsFully assembled board with description of inputs and outputs

    Naked boardNaked board

    PinLightShield sitting on top of the Arduino UnoPinLightShield sitting on top of the Arduino Uno

    Full stack: PinLightShield with SwitchShield on top (5V section with Pololu on the left)Full stack: PinLightShield with SwitchShield on top (5V section with Pololu on the left)

    For now I only have a few boards made which I could sell as a kit (for self assembly) at 30 Euros (plus shipping).
    The kit would contain the board plus all parts plus the extra header and capacitor needed for the 5V section, but not the Pololu. You´ll probably get the Pololu cheaper in the US than I can get it here in Germany.
    If there´s interest I can have more boards made pretty quickly.
    If somebody wants the board fully assembled and tested I would have to add 20 Euros because that takes me more than an hour of work.

    1 month later
    #24 6 years ago

    To make connections to the pin easier I created a few adapter boards that fit on the typical headers used in WPC, Sys11, Stern and DE machines. So far because I don´t like permanent modifications to my pins I always built kind of a Y connector to connect the signals I needed to my PinLightShield (e.g. the drive signal of a flasher or a coil or row/col of a switch). The Y connector had a header to plug in the original connector from the pin and a socket that goes on the board. On the other side it had one or more long cables (depending on the signals I needed) ending in the connector that goes on the PinLightShield. That was OK if I had to build it once and never touch it again. But if I decided that I needed another signal or an additional one I had to rip the whole thing out and more or less completely rebuild it. Annoying and also not good for those connectors btw.
    To make this whole process a little easier I build those little adapter boards. They go on the original header (e.g. a J122 in a WPC game needs a 9-pin, 0.156" adapter board). The original J122 connector goes on the 0.156" header on the adapter board while I derive the signals for the PinLightShield from the smaller 0.100" header. This makes changes a lot easier because I only have to remove the wire harness between the adapter board and the PinLightShield.

    Seven types of adapter boards for nowSeven types of adapter boards for now

    Two types of 9-pin connectors assembled (right one is for power connectors)Two types of 9-pin connectors assembled (right one is for power connectors)

    I could imagine these come in handy for all kinds of mods and purposes so I´ve made a couple of each board and can sell them if somebody is interested. Just pm me.....

    1 month later
    #25 6 years ago

    Recently I created another addon to my PinLighShield family: the BumperLights.
    I figured that in some games the bumpers could use a little more light action and so I built these little PCBs that fit exactly into the bumper cap, but instead of the usual ones that you know from all the pinball shops these are equipped with digital LEDs which can be controlled individually from a PinLightShield or a Pinduino. There´s 6 LEDs on top and 4 on the bottom and this enables some nice lightshows on your pop bumpers.
    Like all digital LEDs they need a stable 5V power supply and can be controlled from any Arduino type board for which you can get a WS2812 compatible library.
    Unfortunately my movie maker capabilities are very bad so I can only show some pictures of what the boards look like. Luckily fellow pinsider lyonsden was nice enough to test some of my first prototypes and he wrote a nice review incl. a video of the BumperLights in action.
    Have a look: https://pinside.com/pinball/forum/topic/product-review-bumperlights.

    The bare PCBsThe bare PCBs
    3 bumpers on my testbed3 bumpers on my testbed
    A closer look at one of themA closer look at one of them

    Feel free to let me know what you think.....even if you think this idea is completely bonkers...

    2 weeks later
    #26 6 years ago
    Quoted from BigLebowski:

    Recently I created another addon to my PinLighShield family: the BumperLights.
    I figured that in some games the bumpers could use a little more light action and so I built these little PCBs....

    These look great and have lots of potential. If someone writes the code I'd be in for a couple sets!

    1 week later
    #27 6 years ago

    I already wrote some code for them but have a hard time filming it. The different colors are not really coming out very well. If somebody has an idea how to better film LEDs I´d appreciate it.

    1 month later
    #28 6 years ago

    How compatible is any of this with Spike 2 games?

    #29 6 years ago

    I don´t own a SPIKE2 pinball machine but from looking at the manual of a SPIKE pinball machine I would say that detecting flashers, coils motors etc. should work just fine. Instead of connecting the PinLightShield to some driver board in the backbox you need to connect them to the node boards under the playfield but otherwise you should be fine.
    Lights might be trickier because for some of them it seems that the actual logic is on the lightboard itself making it harder to connect the PinLightShield to them.
    I´m almost 100% sure that the SwitchShield will not work at all because the switch detection seems to be completely different from older Stern, Williams, Bally or DE systems.

    As I don´t own such a machine I stand corrected if any of my assumptions were wrong......

    1 month later
    #30 6 years ago

    Finally I got around to update my PinLightShield documentation to the newest version of the board (rev2) and I also included a chapter for the SwitchShield. Feel free to comment or ask questions. I still have some kits available.

    PinLightShield User Guide v0.2.pdfPinLightShield User Guide v0.2.pdf

    2 months later
    #31 6 years ago

    I installed the PinLightShield and the SwitchShield in my first Sys11 machine (F-14 Tomcat) and they are working just fine. I´ll be using them to control a digstrip under my red ramp, my BumperLight on the jet and probably two flashers that will illuminate my F-14 and my Mig models that will go on the big clear plastics in the left and right corner of the playfield..
    The SwitchShield will monitor 3 playfield switches to detect when the machine is in Multiball or no ball is in play and control the lightshow accordingly.
    The code is not finished yet, but now that the hardware is working that´s just a matter of some free hours to come up with nice lighting effects.

    3 months later
    #32 5 years ago

    Sometimes when I develop a sketch for the Arduino and/or the PinLightShield/SwitchShield I wish I could see the status of my Arduino ports without having to put debug statements in my code. Of course I can use my multimeter or a LED with a resistor attached but that´s always a lot of fumbling around in the semi dark.
    Therefore I´ve built a little shield that sits on top of the other shields (or the Arduino for that matter) and gives me the state of each port with LED bars.
    I hope that makes my debugging a little easier. I´ve ordered boards and parts for 10 of them and I can sell them as kits or fully assembled if somebody wants one. Because of the price of those LED bars I can´t sell the kit for less than 15 Euros unfortunately. Fully assembled would be 25 Euros. Shipping to the US 8 Euros with tracking.

    P1100808 (resized).JPGP1100808 (resized).JPGP1100809 (resized).JPGP1100809 (resized).JPGP1100810 (resized).JPGP1100810 (resized).JPG

    2 months later
    #33 5 years ago

    There´s a new member to my family of Arduino shields to create your own lighting or other mods for your pinball machine. It´s a combination of the two boards I had so far - the PinLightShield and the SwitchShield - as it combines the monitoring of flashers, coils etc. with the monitoring of switches on one single board (plus the Arduino of course). I figured that in the mods I´ve built so far I never needed all Arduino ports and the advantage of having to build only one board would outweigh the drawback of having less flexibility on the number and usage of the ports.

    Here´s a short summary of the ports and how they can be used:

    A0 - A5: used to monitor up to 6 switches, can´t be used for anything else
    D3, D5, D6: used as outputs to drive 12V devices like RGB LED strips, can´t be used for anything else
    D9, D10, D11: can be used as inputs or as 12V outputs, individually selectable via jumpers
    D2, D4, D7, D8: can be used as inputs or as outputs for digital (addressable) LED strips
    D1, D12, D13: used as inputs, can´t be used for anything else

    Here´s a picture of the fully assembled board, only the IC´s and the Pololu 5V regulator aren´t in yet:

    P1100812 (resized).JPGP1100812 (resized).JPG

    As always I´ve made more boards than I need myself and can sell them as DIY kits. Cost would be 35 Euros plus 8 Euros shipping.
    I can also sell the naked boards at 10 Euros including a list of the parts you would need to aquire yourself.

    1 month later
    #34 5 years ago

    Since quite a few folks have been asking recently - I have all boards and parts here to put together DIY kits. Not huge amounts of parts, though, as this is a hobby and not a business.
    The costs of the kits are the following:

    PinLightShield 30 Euros
    SwitchShield 15 Euros
    PinShield (the combined one) 35 Euros
    LED board 15 Euros
    Adapter boards (naked PCB only) 2 Euros
    Adapter boards (up to 10pin) 8 Euros
    Adapter boards (12 and 13pin) 10 Euros

    If you want them fully assembled please ask as the effort differs quite substantially between the different boards.

    5 months later
    #35 4 years ago

    I finally got some time to finish up the code for my X Files. I wanted the colors and effects to be as random as possible so it took a little longer than I anticipated. Disregard the horrible game play, its hard to stand behind a tripod and try to play without bumping the camera. The first 30 seconds show off the stadium style lights which are run by the light shield. After that the ramps effects kick in during attract mode, they are being run by the switchshield.

    1 month later
    #36 4 years ago

    I´ve completed my lineup of adapter boards that can be used for pinball mods but also all other kinds of things where you want to avoid soldering or want to make things completely reversible:


    If there are any other combinations needed let me know. I can include them in my next production run.

    Prices see my last post above.

    5 months later
    #37 4 years ago

    Are the bumper cap leds still available ?

    9 months later
    #38 3 years ago
    Quoted from nutty:

    Are the bumper cap leds still available ?

    Same question.

    1 week later
    #39 3 years ago

    @BigLebowski, I tried to look at the github, but it seems completely empty?


    Added over 4 years ago:

    I stand corrected, github does have code indeed.

    Would welcome however a pointer on "where to buy"


    1 month later
    #40 3 years ago

    In case others did not think of it:

    I found out that there's an easier way to program the Arduino once installed in a machine rather than using a PC: I'm connecting a RPI3 (or 4) to the Arduino, as you can actually install ArduinoIDE on it, see here: https://minicode.co.za/2019/10/12/correctly-installing-the-arduino-ide-on-a-raspberry-pi4/

    Since the RPI is connected over wifi, you can use VNC to remote control it and update code without even opening the backbox.


    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/always-wanted-to-build-your-own-pinball-lightmod 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.