EM Arrangeball conversion to Arduino

Restoration/upgrades/fixes/fabrication of pins and vids
Post Reply
User avatar
mrmikeman
MAACA Mega Contributor
Posts: 3407
Joined: Thu Nov 19, 2009 9:31 am
Location: Ottawa, ON
Has liked: 114 times
Been liked: 336 times

EM Arrangeball conversion to Arduino

Post by mrmikeman »

So Arrangeball is a Pachinko style gambling game. Pays out coins. Plays like a bingo machine where you make lines/squares/etc to win credits.

It'll be done in 2 phases:
- Hardware conversion
- Programming

I've started by removing all the hardware that I no longer need.

Installed a PS for 5, 12, and 24V:
- 5V is to power the relays (for the solenoids).
- 12V to power the addressable RBG lights as well as the Arduino Mega.
- 24V to power the solenoids.

I got the metal case with easy connection shield for the Mega. Makes things clean and solid.

Progress so far:
- Light boards removed.
- Ball switches removed (15).
- Ultrasonic cleaned the metal switch holder.
- PS is installed as well as 1 relay for the payout solenoid. Will rewire the solenoids like a pinball. Power to the coil and ground for the trigger. My relay is reversed right now (controls 24V instead of GND).
- Started testing the light control with test programs. Haven't decided which library to use yet. Will likely use WS2812FX. Right now all works ok with FASTLED but the other library has built-in animations that I can use for the attract mode.
IMG_7530.JPEG
IMG_7531.JPEG
IMG_7586.JPEG
IMG_7587.JPEG
IMG_7588.JPEG
IMG_7589.JPEG
IMG_7590.JPEG
IMG_7593.JPEG
IMG_7594.JPEG
Last edited by mrmikeman on Tue Feb 25, 2025 1:14 pm, edited 1 time in total.
PINS:
Harry Potter CE (#459)
Labyrinth (#21)
Metallica Remastered Premium
JAWS Premium
Scooby Doo CE (#141)
MultiMorphic P3 with Portal extended and all other modules except Lexy Lightspeed
Star Trek the Next Generation
Gottlieb Street Fighter 2 *FOR SALE - $3150

INCOMING
Beetlejuice

JUKES
NSM Emerald Ice CD(100) wall hanger juke. *FOR SALE - $1400

Gone but not forgotten
So many... JPLE, SW Prem, Looney Tunes CE, Lexy Lightspeed, Recel Lady Luck, Gtb Pro-Football, CCrLE, WOZ ECLE, Stern POTC, Star Trek Pro, MMrRE, Stranger Things LE, Dr Who, RFM, SWEP1, Road Show, Monster Bash, Twilight Zone, Lord of the Rings, Simpsons Pinball Party, Demolition Man, Terminator 2, Funhouse, Tales from the Crypt, High Speed, Bad Cats, Flintstones, WWF Royal Rumble, Laser War, Laser Ball, Silver Slugger, Batman Forever, Pinbot, 6 Million Dollar Man, Galaxy, Meteor, Countdown, Hot Tip(SS), and others I just can't think of lol.

User avatar
semicolin
MAACA Mega Contributor
Posts: 1238
Joined: Sun Apr 17, 2016 4:32 pm
Location: Ottawa, ON
Has liked: 209 times
Been liked: 259 times
Contact:

Re: EM Arrangeball conversion to Arduino

Post by semicolin »

What are you gonna do for sound? Fire some solenoids at a chime box or trigger an audio board?
Sharing my space with: Meteor, Tag Team, Dragon, Centaur II, Middle Earth, Xenon, Elektra, Mata Hari, Star Trip, Street Fighter cab w/Premium 8

User avatar
mrmikeman
MAACA Mega Contributor
Posts: 3407
Joined: Thu Nov 19, 2009 9:31 am
Location: Ottawa, ON
Has liked: 114 times
Been liked: 336 times

Re: EM Arrangeball conversion to Arduino

Post by mrmikeman »

There's no sound in these things. Don't plan on changing that. I want to keep the old school charm.
PINS:
Harry Potter CE (#459)
Labyrinth (#21)
Metallica Remastered Premium
JAWS Premium
Scooby Doo CE (#141)
MultiMorphic P3 with Portal extended and all other modules except Lexy Lightspeed
Star Trek the Next Generation
Gottlieb Street Fighter 2 *FOR SALE - $3150

INCOMING
Beetlejuice

JUKES
NSM Emerald Ice CD(100) wall hanger juke. *FOR SALE - $1400

Gone but not forgotten
So many... JPLE, SW Prem, Looney Tunes CE, Lexy Lightspeed, Recel Lady Luck, Gtb Pro-Football, CCrLE, WOZ ECLE, Stern POTC, Star Trek Pro, MMrRE, Stranger Things LE, Dr Who, RFM, SWEP1, Road Show, Monster Bash, Twilight Zone, Lord of the Rings, Simpsons Pinball Party, Demolition Man, Terminator 2, Funhouse, Tales from the Crypt, High Speed, Bad Cats, Flintstones, WWF Royal Rumble, Laser War, Laser Ball, Silver Slugger, Batman Forever, Pinbot, 6 Million Dollar Man, Galaxy, Meteor, Countdown, Hot Tip(SS), and others I just can't think of lol.

User avatar
semicolin
MAACA Mega Contributor
Posts: 1238
Joined: Sun Apr 17, 2016 4:32 pm
Location: Ottawa, ON
Has liked: 209 times
Been liked: 259 times
Contact:

Re: EM Arrangeball conversion to Arduino

Post by semicolin »

Not to disagree, but all the rules went out the window when you wrote down the words "addressable RGB lights!"
Sharing my space with: Meteor, Tag Team, Dragon, Centaur II, Middle Earth, Xenon, Elektra, Mata Hari, Star Trip, Street Fighter cab w/Premium 8

User avatar
mrmikeman
MAACA Mega Contributor
Posts: 3407
Joined: Thu Nov 19, 2009 9:31 am
Location: Ottawa, ON
Has liked: 114 times
Been liked: 336 times

Re: EM Arrangeball conversion to Arduino

Post by mrmikeman »

It’s easier using addressable bulbs than managing 26 individual bulb circuits. I *may* use color or I may just use white. I plan to just go white to start, get the software/game running 100%, then I’ll consider prettying things up with colors/attract mode lol.

Today I came up with a way to mount the RGB bulbs.
IMG_7617.jpeg
IMG_7620.jpeg
IMG_7622.jpeg
IMG_7621.jpeg
Last edited by mrmikeman on Wed Feb 19, 2025 10:20 am, edited 2 times in total.
PINS:
Harry Potter CE (#459)
Labyrinth (#21)
Metallica Remastered Premium
JAWS Premium
Scooby Doo CE (#141)
MultiMorphic P3 with Portal extended and all other modules except Lexy Lightspeed
Star Trek the Next Generation
Gottlieb Street Fighter 2 *FOR SALE - $3150

INCOMING
Beetlejuice

JUKES
NSM Emerald Ice CD(100) wall hanger juke. *FOR SALE - $1400

Gone but not forgotten
So many... JPLE, SW Prem, Looney Tunes CE, Lexy Lightspeed, Recel Lady Luck, Gtb Pro-Football, CCrLE, WOZ ECLE, Stern POTC, Star Trek Pro, MMrRE, Stranger Things LE, Dr Who, RFM, SWEP1, Road Show, Monster Bash, Twilight Zone, Lord of the Rings, Simpsons Pinball Party, Demolition Man, Terminator 2, Funhouse, Tales from the Crypt, High Speed, Bad Cats, Flintstones, WWF Royal Rumble, Laser War, Laser Ball, Silver Slugger, Batman Forever, Pinbot, 6 Million Dollar Man, Galaxy, Meteor, Countdown, Hot Tip(SS), and others I just can't think of lol.

User avatar
mrmikeman
MAACA Mega Contributor
Posts: 3407
Joined: Thu Nov 19, 2009 9:31 am
Location: Ottawa, ON
Has liked: 114 times
Been liked: 336 times

Re: EM Arrangeball conversion to Arduino

Post by mrmikeman »

It’s thin plastic that’s cuttable with scissors but stiff enough to hold the bulbs.
IMG_7625.jpeg
IMG_7624.jpeg
IMG_7627.jpeg
IMG_7628.jpeg
IMG_7629.jpeg
PINS:
Harry Potter CE (#459)
Labyrinth (#21)
Metallica Remastered Premium
JAWS Premium
Scooby Doo CE (#141)
MultiMorphic P3 with Portal extended and all other modules except Lexy Lightspeed
Star Trek the Next Generation
Gottlieb Street Fighter 2 *FOR SALE - $3150

INCOMING
Beetlejuice

JUKES
NSM Emerald Ice CD(100) wall hanger juke. *FOR SALE - $1400

Gone but not forgotten
So many... JPLE, SW Prem, Looney Tunes CE, Lexy Lightspeed, Recel Lady Luck, Gtb Pro-Football, CCrLE, WOZ ECLE, Stern POTC, Star Trek Pro, MMrRE, Stranger Things LE, Dr Who, RFM, SWEP1, Road Show, Monster Bash, Twilight Zone, Lord of the Rings, Simpsons Pinball Party, Demolition Man, Terminator 2, Funhouse, Tales from the Crypt, High Speed, Bad Cats, Flintstones, WWF Royal Rumble, Laser War, Laser Ball, Silver Slugger, Batman Forever, Pinbot, 6 Million Dollar Man, Galaxy, Meteor, Countdown, Hot Tip(SS), and others I just can't think of lol.

User avatar
mrmikeman
MAACA Mega Contributor
Posts: 3407
Joined: Thu Nov 19, 2009 9:31 am
Location: Ottawa, ON
Has liked: 114 times
Been liked: 336 times

Re: EM Arrangeball conversion to Arduino

Post by mrmikeman »

Switches, coils, and relays all wired into the arduino now. I only need to complete 2 splices on the light string. I had to cut it in 2 places to install.
IMG_7631.jpeg
IMG_7632.jpeg
IMG_7633.jpeg
IMG_7634.jpeg
IMG_7635.jpeg
Last edited by mrmikeman on Wed Mar 05, 2025 3:25 pm, edited 1 time in total.
PINS:
Harry Potter CE (#459)
Labyrinth (#21)
Metallica Remastered Premium
JAWS Premium
Scooby Doo CE (#141)
MultiMorphic P3 with Portal extended and all other modules except Lexy Lightspeed
Star Trek the Next Generation
Gottlieb Street Fighter 2 *FOR SALE - $3150

INCOMING
Beetlejuice

JUKES
NSM Emerald Ice CD(100) wall hanger juke. *FOR SALE - $1400

Gone but not forgotten
So many... JPLE, SW Prem, Looney Tunes CE, Lexy Lightspeed, Recel Lady Luck, Gtb Pro-Football, CCrLE, WOZ ECLE, Stern POTC, Star Trek Pro, MMrRE, Stranger Things LE, Dr Who, RFM, SWEP1, Road Show, Monster Bash, Twilight Zone, Lord of the Rings, Simpsons Pinball Party, Demolition Man, Terminator 2, Funhouse, Tales from the Crypt, High Speed, Bad Cats, Flintstones, WWF Royal Rumble, Laser War, Laser Ball, Silver Slugger, Batman Forever, Pinbot, 6 Million Dollar Man, Galaxy, Meteor, Countdown, Hot Tip(SS), and others I just can't think of lol.

User avatar
mrmikeman
MAACA Mega Contributor
Posts: 3407
Joined: Thu Nov 19, 2009 9:31 am
Location: Ottawa, ON
Has liked: 114 times
Been liked: 336 times

Re: EM Arrangeball conversion to Arduino

Post by mrmikeman »

Progress!

Wiring completed. Light string tested and correct insert numbers assigned to the string. Switch scan now light appropriate insert for ball switches. Instant 1-credit payout switch also pays out 1 coin.

Game/payout logic will take a bit longer to program.
PINS:
Harry Potter CE (#459)
Labyrinth (#21)
Metallica Remastered Premium
JAWS Premium
Scooby Doo CE (#141)
MultiMorphic P3 with Portal extended and all other modules except Lexy Lightspeed
Star Trek the Next Generation
Gottlieb Street Fighter 2 *FOR SALE - $3150

INCOMING
Beetlejuice

JUKES
NSM Emerald Ice CD(100) wall hanger juke. *FOR SALE - $1400

Gone but not forgotten
So many... JPLE, SW Prem, Looney Tunes CE, Lexy Lightspeed, Recel Lady Luck, Gtb Pro-Football, CCrLE, WOZ ECLE, Stern POTC, Star Trek Pro, MMrRE, Stranger Things LE, Dr Who, RFM, SWEP1, Road Show, Monster Bash, Twilight Zone, Lord of the Rings, Simpsons Pinball Party, Demolition Man, Terminator 2, Funhouse, Tales from the Crypt, High Speed, Bad Cats, Flintstones, WWF Royal Rumble, Laser War, Laser Ball, Silver Slugger, Batman Forever, Pinbot, 6 Million Dollar Man, Galaxy, Meteor, Countdown, Hot Tip(SS), and others I just can't think of lol.

User avatar
mrmikeman
MAACA Mega Contributor
Posts: 3407
Joined: Thu Nov 19, 2009 9:31 am
Location: Ottawa, ON
Has liked: 114 times
Been liked: 336 times

Re: EM Arrangeball conversion to Arduino

Post by mrmikeman »

Pics of tonight’s progress.
IMG_7636.jpeg
IMG_7637.jpeg
PINS:
Harry Potter CE (#459)
Labyrinth (#21)
Metallica Remastered Premium
JAWS Premium
Scooby Doo CE (#141)
MultiMorphic P3 with Portal extended and all other modules except Lexy Lightspeed
Star Trek the Next Generation
Gottlieb Street Fighter 2 *FOR SALE - $3150

INCOMING
Beetlejuice

JUKES
NSM Emerald Ice CD(100) wall hanger juke. *FOR SALE - $1400

Gone but not forgotten
So many... JPLE, SW Prem, Looney Tunes CE, Lexy Lightspeed, Recel Lady Luck, Gtb Pro-Football, CCrLE, WOZ ECLE, Stern POTC, Star Trek Pro, MMrRE, Stranger Things LE, Dr Who, RFM, SWEP1, Road Show, Monster Bash, Twilight Zone, Lord of the Rings, Simpsons Pinball Party, Demolition Man, Terminator 2, Funhouse, Tales from the Crypt, High Speed, Bad Cats, Flintstones, WWF Royal Rumble, Laser War, Laser Ball, Silver Slugger, Batman Forever, Pinbot, 6 Million Dollar Man, Galaxy, Meteor, Countdown, Hot Tip(SS), and others I just can't think of lol.

User avatar
cait001
MAACA OG
Posts: 5103
Joined: Tue Oct 09, 2012 3:42 pm
Location: Centretown, Ottawa, ON
Has liked: 708 times
Been liked: 350 times

Re: EM Arrangeball conversion to Arduino

Post by cait001 »

following!
backglasses wanted: Star-Jet, Fairy, Star Trek (1971 Gottlieb)
marquees wanted: Roller Aces, Quiz Dragon, Strider, Varkon, Dark Planet, R-Type (w/ship), Quantum, Ninja (Sega)
blog -- collection -- want list -- Pinball Women Ottawa -- Ottawa Pinball Map -- ratings

User avatar
mrmikeman
MAACA Mega Contributor
Posts: 3407
Joined: Thu Nov 19, 2009 9:31 am
Location: Ottawa, ON
Has liked: 114 times
Been liked: 336 times

Re: EM Arrangeball conversion to Arduino

Post by mrmikeman »

Basic programming is done. Game is working as it did originally. I haven’t put a payout limit however - original was 10 I believe. I want all the money lol.

I need to investigate on electrical noise reduction. The RGB strip (12v) is causing interference with a switch when lights close to that switch come on. It sucks because that’s the instant 1-coin payout switch. Switch/coil triggers randomly once the 3 lower RGB lights are on (5-8-15). The built-in pull-up resistors on the Mega are weak and the wires are a bit long. Bad combination. I may just need to add external pull-up resistors.

Other than that I have a fully working Arrangeball!

Once I fix the interference I will look into programming some light effects.

Last edited by mrmikeman on Sun Feb 16, 2025 10:48 am, edited 1 time in total.
PINS:
Harry Potter CE (#459)
Labyrinth (#21)
Metallica Remastered Premium
JAWS Premium
Scooby Doo CE (#141)
MultiMorphic P3 with Portal extended and all other modules except Lexy Lightspeed
Star Trek the Next Generation
Gottlieb Street Fighter 2 *FOR SALE - $3150

INCOMING
Beetlejuice

JUKES
NSM Emerald Ice CD(100) wall hanger juke. *FOR SALE - $1400

Gone but not forgotten
So many... JPLE, SW Prem, Looney Tunes CE, Lexy Lightspeed, Recel Lady Luck, Gtb Pro-Football, CCrLE, WOZ ECLE, Stern POTC, Star Trek Pro, MMrRE, Stranger Things LE, Dr Who, RFM, SWEP1, Road Show, Monster Bash, Twilight Zone, Lord of the Rings, Simpsons Pinball Party, Demolition Man, Terminator 2, Funhouse, Tales from the Crypt, High Speed, Bad Cats, Flintstones, WWF Royal Rumble, Laser War, Laser Ball, Silver Slugger, Batman Forever, Pinbot, 6 Million Dollar Man, Galaxy, Meteor, Countdown, Hot Tip(SS), and others I just can't think of lol.

User avatar
mrmikeman
MAACA Mega Contributor
Posts: 3407
Joined: Thu Nov 19, 2009 9:31 am
Location: Ottawa, ON
Has liked: 114 times
Been liked: 336 times

Re: EM Arrangeball conversion to Arduino

Post by mrmikeman »

And I wasn’t happy with my code structure and condensed things. I managed to shrink the win analysis section from 45-50 lines of code to 9. Woot!
Last edited by mrmikeman on Sun Feb 16, 2025 11:09 am, edited 1 time in total.
PINS:
Harry Potter CE (#459)
Labyrinth (#21)
Metallica Remastered Premium
JAWS Premium
Scooby Doo CE (#141)
MultiMorphic P3 with Portal extended and all other modules except Lexy Lightspeed
Star Trek the Next Generation
Gottlieb Street Fighter 2 *FOR SALE - $3150

INCOMING
Beetlejuice

JUKES
NSM Emerald Ice CD(100) wall hanger juke. *FOR SALE - $1400

Gone but not forgotten
So many... JPLE, SW Prem, Looney Tunes CE, Lexy Lightspeed, Recel Lady Luck, Gtb Pro-Football, CCrLE, WOZ ECLE, Stern POTC, Star Trek Pro, MMrRE, Stranger Things LE, Dr Who, RFM, SWEP1, Road Show, Monster Bash, Twilight Zone, Lord of the Rings, Simpsons Pinball Party, Demolition Man, Terminator 2, Funhouse, Tales from the Crypt, High Speed, Bad Cats, Flintstones, WWF Royal Rumble, Laser War, Laser Ball, Silver Slugger, Batman Forever, Pinbot, 6 Million Dollar Man, Galaxy, Meteor, Countdown, Hot Tip(SS), and others I just can't think of lol.

User avatar
mrmikeman
MAACA Mega Contributor
Posts: 3407
Joined: Thu Nov 19, 2009 9:31 am
Location: Ottawa, ON
Has liked: 114 times
Been liked: 336 times

Re: EM Arrangeball conversion to Arduino

Post by mrmikeman »

Although I haven't fully optimized the code I don't really care right now as it works ok but there are bugs in this version. I don't use AI for this so I'm sure it could be a bit more condensed but I enjoy the mental challenge of figuring things out on my own. Here's what the code looks like right now:

Code: Select all


#include <FastLED.h>
// How many leds in the light strip?
#define NUM_LEDS 26
#define DATA_PIN 12
// Establish the array of leds
CRGB leds[NUM_LEDS];
// I use Intergers throughout but many of these could have been set as constants
// Define position of LED on string for playfield inserts 1 through 15. For example the insert with the #1 is the 11th RGB light on the string
int insert[] = {11, 5, 6, 9, 1, 14, 7, 2, 12, 4, 8, 10, 13, 15, 3};
// Define position of LED on light string to indicate a winning line. These are in order so it didn't really matter as much
int wininsert[10] = {16, 17, 18, 19, 20, 21, 22, 23, 24, 25};
// Define payout array. This keeps track of how many coins get paid out per winning line
int win[] = {1, 1, 1, 1, 1, 3, 2, 2, 2, 2};
// Define win lines in groups of 4. 1 line pays with only 3 balls so 1 switch was listed twice for that group - first 4 (5, 8, 8, and 15)
int winline[] = {5, 8, 8, 15, 3, 6, 9, 12, 2, 4, 7, 13, 1, 7, 10, 12, 4, 9, 11, 14, 4, 7, 9, 12, 4, 6, 12, 14, 7, 9, 11, 13, 1, 3, 7, 9, 2, 4, 10, 12};
// Define win lines
int lines[10];
// Define ball aray to track which switches have been activated
int ball[16];
// Define input pins for ball switches
int ballswitch[] = {31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45};
int instantpay = 46;
int coin = 30;
int quit = 29;
// Define output pins for both coils
int ballrelease = 52;
int coinpay = 53;
// Define gameplay flags for play active and winning lines
bool pay = false;
bool gameover = true;
// Define prototype functions - doesn't do anything other than let the program know these exist after the "LOOP" section
void payout();
void reset();

// Initialize process
void setup() { 
    // Setup addressable RGB light string
    FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);
    // Assign arduino pins 29-46 for switches. 29-Quit(payout). 30-Coin in. 31-45 are ball switches. 46 - Instant payout LUCKY 7
    for (int i = 28; i < 46; i++) pinMode(i, INPUT_PULLUP);
    // Assign mode and pin number to the ball release coil
    pinMode(ballrelease, OUTPUT);
    // Assign mode and pin number to the payout coil
    pinMode(coinpay, OUTPUT);
    // Light GAME OVER light
    leds[0] = CRGB::Red;
    FastLED.show();
}

void loop() {
   // If gameover is true loop will only scan for coin added - this is where I may add an attract mode (light animations)
   if (gameover == true) {
      if (digitalRead(coin) == LOW) reset();
   }
   // Game is in play - scan for coin/quit which payout as required and then restart a game if it was coin. Scan also for lucky 7 which pays out instantly a coin
else if (gameover == false) {
      if (digitalRead(coin) == LOW){
         if (pay == true) payout()
         reset();
      }
      if (digitalRead(quit) == LOW){
         if (pay == true) payout();
         gameover = true;
         leds[0] = CRGB::Red;
         FastLED.show();
         return;
         }
      if (digitalRead(instantpay) == LOW){
        digitalWrite(coinpay, HIGH);
        delay(200);
        digitalWrite(coinpay, LOW);
      }
      // Check all 15 ball switches and light the appropraite insert and record the ball as "scored" on that number
        for (int i = 0; i<15; i++) {
          if (digitalRead(ballswitch[i]) == LOW) {
             leds[insert[i]] = CRGB::White;
             FastLED.show();
             ball[i+1] = 1;
          }
        }
 
     // Check win lines
     for (int i = 0; i<39; i = i + 4) {
        int ins = i/4;
        // Only check for a win if the line is not already flagged as winner
        if (lines[ins] == 0) {
          int check = ball[winline[i]] + ball[winline[i+1]] + ball[winline[i+2]] + ball[winline[i+3]];
          if (check == 4) {
            pay = true;
            lines[ins] = 1;
            leds[wininsert[ins]] = CRGB::White;
          }
        }
     }
     FastLED.show();
   }
}

void reset() {
  // Reset code to start game
    // Turn off all LEDS and set all ball and win tracking to 0
    for (int i = 0; i<26; i++) leds[i-1] = CRGB::Black;
      FastLED.show();
    // Set all ball switches to 0 (off)
    for (int i = 0; i<16; i++) ball[i] = 0;
    // Set all winning lines to 0 (off)
    for (int i = 0; i<10; i++) lines[i] = 0;
    // Release balls (coil)
    digitalWrite(ballrelease, HIGH);
    delay(2000);
    digitalWrite(ballrelease, LOW);
    // Set game to play and reset payout tracking to false
    gameover = false;
    pay = false;
  return;
}

void payout() {
  //Payout code to dispense coins
  // Go through all 10 win lines
    for (int i=0; i<10; i++) {
        // Check if this line is flagged as winner
        if (lines[i] == 1) {
        // Dispense coins in the correct amount for that win line
        for (int x = 0; x < win[i]; x++){
          digitalWrite(coinpay, HIGH);
          delay(150);
          digitalWrite(coinpay, LOW);
          delay(250);
        }
     delay(200);
     lines[i] = 0;
     leds[wininsert[i]] = CRGB::Black;
     FastLED.show();
     }
    }
  // Once wins are paid out game is over and pay flag can go back to false
  gameover = true;
  pay = false;
  return;
}
Last edited by mrmikeman on Wed Feb 19, 2025 10:24 am, edited 1 time in total.
PINS:
Harry Potter CE (#459)
Labyrinth (#21)
Metallica Remastered Premium
JAWS Premium
Scooby Doo CE (#141)
MultiMorphic P3 with Portal extended and all other modules except Lexy Lightspeed
Star Trek the Next Generation
Gottlieb Street Fighter 2 *FOR SALE - $3150

INCOMING
Beetlejuice

JUKES
NSM Emerald Ice CD(100) wall hanger juke. *FOR SALE - $1400

Gone but not forgotten
So many... JPLE, SW Prem, Looney Tunes CE, Lexy Lightspeed, Recel Lady Luck, Gtb Pro-Football, CCrLE, WOZ ECLE, Stern POTC, Star Trek Pro, MMrRE, Stranger Things LE, Dr Who, RFM, SWEP1, Road Show, Monster Bash, Twilight Zone, Lord of the Rings, Simpsons Pinball Party, Demolition Man, Terminator 2, Funhouse, Tales from the Crypt, High Speed, Bad Cats, Flintstones, WWF Royal Rumble, Laser War, Laser Ball, Silver Slugger, Batman Forever, Pinbot, 6 Million Dollar Man, Galaxy, Meteor, Countdown, Hot Tip(SS), and others I just can't think of lol.

User avatar
mdeslaur
MAACA Super Contributor
Posts: 250
Joined: Mon Jun 06, 2016 9:33 am
Location: Levis, Quebec
Has liked: 44 times
Been liked: 32 times

Re: EM Arrangeball conversion to Arduino

Post by mdeslaur »

Pretty cool project :)

User avatar
mrmikeman
MAACA Mega Contributor
Posts: 3407
Joined: Thu Nov 19, 2009 9:31 am
Location: Ottawa, ON
Has liked: 114 times
Been liked: 336 times

Re: EM Arrangeball conversion to Arduino

Post by mrmikeman »

UUUGGHHHHH.

So I was still having false triggering of the payout coil. Moved the Arduino closer to the switches and re-did all the wiring. Added a diode to the coil. Still not fixing the issue. The "Lucky 7" switch which pays out was triggering on its own. Even just touching the wires would trigger it. Wired a resistor between 5V and the switch and the false triggering stopped. Spent so much time searching for a hardware issue when all along.....

My initialization routine was not assigning that pin for the Lucky 7 switch to the pull up resistors. One little typo in the code. GAH. The "for i=" loop was stopping at pin 45 when it should have gone to pin 46. I should have typed i<47 as opposed to i<46.

So in the end that switch had a floating ground instead of being pulled up to 5v. My triggers are ground, like a pinball machine. Therefore it was triggering whenever on its own.

While I've fixed the issue I'm pretty pissed having spent 2 days on this. More pics to follow to show the new layout of the wiring. It's actually more compact and cleaner this way anyway.
PINS:
Harry Potter CE (#459)
Labyrinth (#21)
Metallica Remastered Premium
JAWS Premium
Scooby Doo CE (#141)
MultiMorphic P3 with Portal extended and all other modules except Lexy Lightspeed
Star Trek the Next Generation
Gottlieb Street Fighter 2 *FOR SALE - $3150

INCOMING
Beetlejuice

JUKES
NSM Emerald Ice CD(100) wall hanger juke. *FOR SALE - $1400

Gone but not forgotten
So many... JPLE, SW Prem, Looney Tunes CE, Lexy Lightspeed, Recel Lady Luck, Gtb Pro-Football, CCrLE, WOZ ECLE, Stern POTC, Star Trek Pro, MMrRE, Stranger Things LE, Dr Who, RFM, SWEP1, Road Show, Monster Bash, Twilight Zone, Lord of the Rings, Simpsons Pinball Party, Demolition Man, Terminator 2, Funhouse, Tales from the Crypt, High Speed, Bad Cats, Flintstones, WWF Royal Rumble, Laser War, Laser Ball, Silver Slugger, Batman Forever, Pinbot, 6 Million Dollar Man, Galaxy, Meteor, Countdown, Hot Tip(SS), and others I just can't think of lol.

User avatar
Azatotht
Admins
Posts: 9475
Joined: Wed Nov 18, 2009 9:32 pm
Location: Anjou (Montreal)
Has liked: 620 times
Been liked: 242 times
Contact:

Re: EM Arrangeball conversion to Arduino

Post by Azatotht »

Classic attention error, glad your code is working now :mrgreen:
I am the monster that breathing men would kill.
I, am Dracula... (and you're not!)

Pinball machines I have owned

Currently playing: Stern Lightning

User avatar
mrmikeman
MAACA Mega Contributor
Posts: 3407
Joined: Thu Nov 19, 2009 9:31 am
Location: Ottawa, ON
Has liked: 114 times
Been liked: 336 times

Re: EM Arrangeball conversion to Arduino

Post by mrmikeman »

Azatotht wrote: Fri Feb 14, 2025 1:22 pm Classic attention error, glad your code is working now :mrgreen:
I likely have another bug. I just filled the panel which pays out on all lines. Payout did nothing. Obviously an edge case as it's insanely unlikely anyone could get all 15 inserts lit with only 15 balls. I'll have to look at what's happening. I've paid out on 9 lines out of 10. It's only 10/10 that fails.
PINS:
Harry Potter CE (#459)
Labyrinth (#21)
Metallica Remastered Premium
JAWS Premium
Scooby Doo CE (#141)
MultiMorphic P3 with Portal extended and all other modules except Lexy Lightspeed
Star Trek the Next Generation
Gottlieb Street Fighter 2 *FOR SALE - $3150

INCOMING
Beetlejuice

JUKES
NSM Emerald Ice CD(100) wall hanger juke. *FOR SALE - $1400

Gone but not forgotten
So many... JPLE, SW Prem, Looney Tunes CE, Lexy Lightspeed, Recel Lady Luck, Gtb Pro-Football, CCrLE, WOZ ECLE, Stern POTC, Star Trek Pro, MMrRE, Stranger Things LE, Dr Who, RFM, SWEP1, Road Show, Monster Bash, Twilight Zone, Lord of the Rings, Simpsons Pinball Party, Demolition Man, Terminator 2, Funhouse, Tales from the Crypt, High Speed, Bad Cats, Flintstones, WWF Royal Rumble, Laser War, Laser Ball, Silver Slugger, Batman Forever, Pinbot, 6 Million Dollar Man, Galaxy, Meteor, Countdown, Hot Tip(SS), and others I just can't think of lol.

User avatar
Azatotht
Admins
Posts: 9475
Joined: Wed Nov 18, 2009 9:32 pm
Location: Anjou (Montreal)
Has liked: 620 times
Been liked: 242 times
Contact:

Re: EM Arrangeball conversion to Arduino

Post by Azatotht »

Well if someone miraculously manage to get it, it would suck to win nothing :D

Cool little project.

I will be playing with Arduino code very soon as well if I can just receive my board from Netherland, Canada Post has been a nightmare for international mail since the strike.
I am the monster that breathing men would kill.
I, am Dracula... (and you're not!)

Pinball machines I have owned

Currently playing: Stern Lightning

User avatar
mrmikeman
MAACA Mega Contributor
Posts: 3407
Joined: Thu Nov 19, 2009 9:31 am
Location: Ottawa, ON
Has liked: 114 times
Been liked: 336 times

Re: EM Arrangeball conversion to Arduino

Post by mrmikeman »

Ok so pictures of the updated layout are here as well as a video of the payout sequence. I just added code showing what lines are being paid out. Now I need coins lol.
IMG_7671.jpeg
IMG_7670.jpeg
Last edited by mrmikeman on Sun Feb 16, 2025 10:47 am, edited 2 times in total.
PINS:
Harry Potter CE (#459)
Labyrinth (#21)
Metallica Remastered Premium
JAWS Premium
Scooby Doo CE (#141)
MultiMorphic P3 with Portal extended and all other modules except Lexy Lightspeed
Star Trek the Next Generation
Gottlieb Street Fighter 2 *FOR SALE - $3150

INCOMING
Beetlejuice

JUKES
NSM Emerald Ice CD(100) wall hanger juke. *FOR SALE - $1400

Gone but not forgotten
So many... JPLE, SW Prem, Looney Tunes CE, Lexy Lightspeed, Recel Lady Luck, Gtb Pro-Football, CCrLE, WOZ ECLE, Stern POTC, Star Trek Pro, MMrRE, Stranger Things LE, Dr Who, RFM, SWEP1, Road Show, Monster Bash, Twilight Zone, Lord of the Rings, Simpsons Pinball Party, Demolition Man, Terminator 2, Funhouse, Tales from the Crypt, High Speed, Bad Cats, Flintstones, WWF Royal Rumble, Laser War, Laser Ball, Silver Slugger, Batman Forever, Pinbot, 6 Million Dollar Man, Galaxy, Meteor, Countdown, Hot Tip(SS), and others I just can't think of lol.

User avatar
Azatotht
Admins
Posts: 9475
Joined: Wed Nov 18, 2009 9:32 pm
Location: Anjou (Montreal)
Has liked: 620 times
Been liked: 242 times
Contact:

Re: EM Arrangeball conversion to Arduino

Post by Azatotht »

Very cool
I am the monster that breathing men would kill.
I, am Dracula... (and you're not!)

Pinball machines I have owned

Currently playing: Stern Lightning

User avatar
mrmikeman
MAACA Mega Contributor
Posts: 3407
Joined: Thu Nov 19, 2009 9:31 am
Location: Ottawa, ON
Has liked: 114 times
Been liked: 336 times

Re: EM Arrangeball conversion to Arduino

Post by mrmikeman »

Now fully working.
PINS:
Harry Potter CE (#459)
Labyrinth (#21)
Metallica Remastered Premium
JAWS Premium
Scooby Doo CE (#141)
MultiMorphic P3 with Portal extended and all other modules except Lexy Lightspeed
Star Trek the Next Generation
Gottlieb Street Fighter 2 *FOR SALE - $3150

INCOMING
Beetlejuice

JUKES
NSM Emerald Ice CD(100) wall hanger juke. *FOR SALE - $1400

Gone but not forgotten
So many... JPLE, SW Prem, Looney Tunes CE, Lexy Lightspeed, Recel Lady Luck, Gtb Pro-Football, CCrLE, WOZ ECLE, Stern POTC, Star Trek Pro, MMrRE, Stranger Things LE, Dr Who, RFM, SWEP1, Road Show, Monster Bash, Twilight Zone, Lord of the Rings, Simpsons Pinball Party, Demolition Man, Terminator 2, Funhouse, Tales from the Crypt, High Speed, Bad Cats, Flintstones, WWF Royal Rumble, Laser War, Laser Ball, Silver Slugger, Batman Forever, Pinbot, 6 Million Dollar Man, Galaxy, Meteor, Countdown, Hot Tip(SS), and others I just can't think of lol.

User avatar
Azatotht
Admins
Posts: 9475
Joined: Wed Nov 18, 2009 9:32 pm
Location: Anjou (Montreal)
Has liked: 620 times
Been liked: 242 times
Contact:

Re: EM Arrangeball conversion to Arduino

Post by Azatotht »

Well done !
I am the monster that breathing men would kill.
I, am Dracula... (and you're not!)

Pinball machines I have owned

Currently playing: Stern Lightning

User avatar
mrmikeman
MAACA Mega Contributor
Posts: 3407
Joined: Thu Nov 19, 2009 9:31 am
Location: Ottawa, ON
Has liked: 114 times
Been liked: 336 times

Re: EM Arrangeball conversion to Arduino

Post by mrmikeman »

I updated again. Decided to try color matching the inserts to the win lines during payout. I tried gray for the 1-credit lines but it looks the same as white. So then I went with a light blue instead. The 3-credit line I went purple. The 2-credit lines match with red, green, blue, and yellow.

Not sure I like this more than just 1 color during payout like the post above.

PINS:
Harry Potter CE (#459)
Labyrinth (#21)
Metallica Remastered Premium
JAWS Premium
Scooby Doo CE (#141)
MultiMorphic P3 with Portal extended and all other modules except Lexy Lightspeed
Star Trek the Next Generation
Gottlieb Street Fighter 2 *FOR SALE - $3150

INCOMING
Beetlejuice

JUKES
NSM Emerald Ice CD(100) wall hanger juke. *FOR SALE - $1400

Gone but not forgotten
So many... JPLE, SW Prem, Looney Tunes CE, Lexy Lightspeed, Recel Lady Luck, Gtb Pro-Football, CCrLE, WOZ ECLE, Stern POTC, Star Trek Pro, MMrRE, Stranger Things LE, Dr Who, RFM, SWEP1, Road Show, Monster Bash, Twilight Zone, Lord of the Rings, Simpsons Pinball Party, Demolition Man, Terminator 2, Funhouse, Tales from the Crypt, High Speed, Bad Cats, Flintstones, WWF Royal Rumble, Laser War, Laser Ball, Silver Slugger, Batman Forever, Pinbot, 6 Million Dollar Man, Galaxy, Meteor, Countdown, Hot Tip(SS), and others I just can't think of lol.

Post Reply