(Topic ID: 225276)

Homebrew LEDs?

By SpaceAce

3 years ago


Topic Heartbeat

Topic Stats

  • 16 posts
  • 6 Pinsiders participating
  • Latest reply 3 years ago by lyonsden
  • Topic is favorited by 4 Pinsiders

You

Linked Games

No games have been linked to this topic.

    Topic Gallery

    View topic image gallery

    1DE36528-E847-4D69-91DD-35ED6BC949CB (resized).jpeg

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

    #8 3 years ago

    If you want to control the color of the lights, you can use addressable LED strings. I’ve made some fun set ups with them and a Pinduino.


    1DE36528-E847-4D69-91DD-35ED6BC949CB (resized).jpeg

    #11 3 years ago
    Quoted from SpaceAce:

    @lyonsden Eric, So, I have been googling and looking at Youtube... did you make the Pinduino? Like... Is this your baby?

    Yes -- the Pinduino is my baby.

    For your questions, the pinduino is a board that plugs into the power driver board and monitors flashers, coils, magnets, etc. It is driven by a Nano. The core pinduino library (https://github.com/elyons/pinduino) is where most of the magic happens (that is where all of the controls are for monitoring states on the power driver board, all the effects for the LEDs, etc.) I've tried to make things very easy for writing code for a game. For example, the sketch for Tron will have something like:

    if (pd.pinState()->J7(3) ) { // Video Game
    pd.adrLED1()->color("cyan", 255);
    pd.adrLED2()->color("blue", 255);
    delay(200);
    pd.fadeOutAllAdr(100);
    trigger = 1;
    }

    Which means that when J7-3 on the power driver board is triggered (which is the flasher for the video game), then turn the GI "cyan" and the LEDs on the apron "blue". (Actually, due to the LED string in the GI using a different controller than the LED strips on the apron, the red and green channels are reversed, and cyan turns the GI purple.)

    The LEDs I use for the GI is pre-wired with 50 LEDs, so I just use those as they are, having some LEDs under the playfield when I need to make a longer run between holes in the playfield for the GI. I have a lot of documentation written up for the pinduino, but for setting up a GI system, here is the link: https://docs.google.com/document/d/1q4ocskLaG9377kGTRL-7TVRDCNNiFv-U_TAz9zaoilE/edit

    And here is a link to the folder containing all of the instructions and game builds: https://drive.google.com/drive/folders/0B2njOnd06CCOdlBCVzdiWFZhUVE

    I hope that answers some of your questions, but feel free to post more, or shoot me a PM and we can chat by phone.

    #12 3 years ago

    Also, glad you like what can be done with the Pinduino!

    #14 3 years ago

    Very neat stuff!

    Yes, the first version on the pinduino was based on the mega. While it had a lot of features, it was complicated to build, so I developed the version based on the nano. Much easier to build and assemble, and much less expensive. For you questions:

    Get a warm white is not difficult with the addressable LEDs (more green/red, less blue) will do the trick.

    To keep the LEDs out of site on the apron, you can always put them in the ball trough. Downside is that there are fewer LEDs so the less coverage. Or, you can make rails similar to stadium lighting. In the two videos below, Metallica as them in the trough and Dialed In as them in rails like stadium lighting.

    ->clear() is the function used to clear the LEDs and turn them off. Good idea to add a function called "black" to do the same thing.

    There is usually no noticeable lag, unless the program is set up to:
    1. monitor the flasher/coil activity for some time in order to check for a combination of events. Sometimes I'll monitor for 1/4 to 1/2 a second to capture those events. Also, if an effect is running, the pinduino will often need to complete it before starting the next one. A lot of the effects have routines built in them to continue to monitor the game's activity, but until that effect finishes, it won't break out of the effect (single thread nature of arduinos)

    2. The GIs are addressable. Here is a link: amazon.com link » . You can find them on EBay as well and usually run $10-$15.

    3. They are on par with incandescent lights, but dimmer than 5050 LEDs.

    4. Awesome -- most functions have two options where you can set a color, or set an RGB value. Depending on what I want to do, I may use the "named" color for convenience or RGB values if I want a specific color (e.g., make orange darker).

    5. You can strobe with fades as you have written, or go for on/off with a delay. And then wrap those in a for loop to minimize typing/cutting and pasting

    for (int i=0; i <= 4; i++){
    pd.adrLED1()->fadeIn("red",5);
    delay(50);
    pd.adrLED1()->fadeOut(5);
    delay(50);
    }

    --or--
    for (int i=0; i <= 4; i++){
    pd.adrLED1()->color("red");
    delay(50);
    pd.adrLED1()->clear();
    delay(50);
    }

    I'm going to be traveling this week out of the country, so may not be online as much, but hope this helps.


    #16 3 years ago
    Quoted from SpaceAce:

    Thanks for your response. Have a safe trip!
    I am pulling my boards today to start work on them. I have an order going into Mouser tomorrow. I have to rebuild the power supply and work on the lamp matrix. This is something I have been putting off for a while, so it's time. It will be a couple of weeks until I can pick up the Pinduino. But I will be looking very closely where things are located so I can get a game plan for the upgrade. These things can easily go off the tracks without an order of execution (well at least that's how it is for me).
    I get that things would need to play out before the next thing began. But this also means that things could stack up quite a lot at times. No?
    I noticed that you were using delay vs timer loops using millis + x as an end of timer sort of thing. If you did this with (if new thing == true){break()}, couldn't you leave a sequence mid em... sequence?
    It would seem that 40 ms would be enough time to do a full scan, no?

    Good luck with the board rebuild (and getting everything ordered the first time -- always takes me two tries).

    Great idea on using a break! Just hadn't occurred to me.

    Ping me when you are thinking of picking up a pinduino. Depending on what you are wanting to do, I may have some extra parts I can toss in that you could use.

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

    Hey there! Got a moment?

    Great to see you're enjoying Pinside! Did you know Pinside is able to run thanks to donations from our visitors? Please donate to Pinside, support the site and get anext to your username to show for it! Donate to Pinside