Bally AS-2518-51 Sound Tester

…….. with Arduino Mega

This project demonstrates the testing of a Bally AS-2518-51 Sound Board using an Arduino Mega with LCD display and 4 push buttons. Buttons allow selection and play of sounds 0 – 31. One Button to repeat currently selected sound, One button to stop currently playing sound and a button to go back to the previously selected sound.

The Sound Board is powered with a standard PC Power Supply +12v to Sound Board TP1, +5v to TP2 and Ground to TP3.

See the below Schematic of the Bally AS-2518-51 Sound Board.

Arduino Mega Code below (Modify as appropriate for your LCD or buttons to work.)



// Bally AS-2518-51 Sound Tester v3.1.0
// 2022 PinballWiz.org

#include "LiquidCrystal.h"

LiquidCrystal lcd(8,9,4,5,6,7);

#define LATCH 30
#define ADDRA 41
#define ADDRB 42
#define ADDRC 43
#define ADDRD 44
#define ADDRE 45

int ADDRBITS[] = {ADDRA,ADDRB,ADDRC,ADDRD,ADDRE};
int sensorPin = A0;
int sensorValue = 0;
byte value;
int SoundNum = 0;

void setup() {
  
lcd.begin(16, 2);
lcd.setCursor(0,0);
lcd.clear();
lcd.print("Bally Sound Test");
lcd.setCursor(0,1);

pinMode(LATCH, OUTPUT);
pinMode(ADDRA, OUTPUT);
pinMode(ADDRB, OUTPUT);
pinMode(ADDRC, OUTPUT);
pinMode(ADDRD, OUTPUT);
pinMode(ADDRE, OUTPUT);

for (int i=0;i<5;i++){ digitalWrite(ADDRBITS[i],HIGH); } // Turn data pins off
digitalWrite(LATCH,HIGH); //Turn Sound Interrupt Off

}

void loop() {
lcd.setCursor(0, 1);   
sensorValue = analogRead(sensorPin);
if(sensorValue == 143 ){ PlaySound(SoundNum); delay(400); }
if(sensorValue == 328 ){ PlaySound(29); delay(400); }  
if(sensorValue == 505 ){ SoundNum = SoundNum - 1; if(SoundNum < 0){ SoundNum = 31; } PlaySound(SoundNum); delay(400); } 
if(sensorValue < 10 ){ SoundNum++; if(SoundNum > 31){ SoundNum = 0; } PlaySound(SoundNum); delay(400);} 
}

void PlaySound(byte num){
for (int i=0;i<5;i++){ byte value = bitRead(num,i); digitalWrite(ADDRBITS[i],value); lcd.print(String(value));}
lcd.print(" Sound " + String(num)+ "  ");
digitalWrite(LATCH,LOW);
delayMicroseconds(40);
digitalWrite(LATCH,HIGH);
}