From 757Labs


[edit] Overview

"The completed slot machine at night."
The completed slot machine.

The idea for this project was based off of the skill crane project. I wanted to control a slot machine via a PC and stream it via a webcam to the internet and allow people to play it. This was my first project using an Arduino microcontroller and I learned a lot from it.

After getting the first few components running (Pressing the max bet button from the Arduino) with Ethan's help I was able to quickly add the additional features needed to run the machine 100% from the PC without issue.

The camera feed and the ability to play the machine are located at

[edit] Goals

  • Control the slot machine via computer
  • Capture output of the slot machine
  • Capture video of the slot machine in action
  • Stream video to the Internet
  • Allow players to make plays over the Internet
  • Record all plays and track information per player

[edit] Components

  1. PC
    • Standard desktop PC running Ubuntu 10.10
    • MySQL, PHP, RGraph, and Perl installed
  2. Arduino Microcontroller
    • Connected via USB to the PC for power and serial data
  3. IGT Double Red White & Blue S+ Slot Machine
    • Built in 1994
  4. Logitech HD Webcam
  5. Akai 30" Display
    • Used for displaying statistics from the machine to passersby
"Kyle working on the slot machine."
Kyle working on the slot machine.

[edit] Challenges

  • Keeping the slot machine intact and unaware of any changes to it inputs/outputs
  • Controlling the slot machine via the PC that can be automated and manual
  • Automated stream delivery to the internet with overlays

[edit] Design

This will be broken down by section for each of the major components

[edit] Arduino

The Arduino is interfaced to the slot machine through the digital out lines. This allows the following functions to be controlled via the Arduino while keeping it isolated from the high voltages inside the slot machine

  1. Pressing the Max Bet Button
    • This starts the reels spinning
  2. Pressing the Change Button
    • To disable credit play on the machine (This has now been disabled in the software of the slot machine)
  3. Simulating coins being put into the machine
  4. Simulating coins being paid out through the hopper
  5. Opening and closing the door via the door optics
    • This allows for clearing of any errors on the slot machine

The Arduino is controlled via a very simple set of single letters sent over serial to control the various outputs. When the solid state relay is closed the Arduino detects a digital high on an input line and triggers a routine that strobes an output high and low with a short delay that simulates coins being paid out of the hopper. It then transmits this information via the serial port to the controlling PC for further processing

[edit] Slot Machine

The machine used is an IGT S+ model with a 2 Coin Double Red White & Blue theme. This is/was one of the most commonly deployed slot machines in Vegas and Atlantic City casinos. They are being replaced by the newer and modernized IGT S2000.

The main changes needed to the machine were disconnection of the solenoid responsible for releasing the arm on the side (Not needed since the Arduino presses the button digitally, Maybe later the robot arm will play via the handle) and disconnection of the speaker because it makes a bunch of noise while playing so we don't want to piss off occupants of the lab. The speaker is reconnected via an audio cable to the line input on the PC controlling the machine to be muxed into the video stream for viewers to hear it.

[edit] PC

The PC controlling the slot machine is a Dell Poweredge 830 running Ubuntu 10.10. Its main control over the slot machine is done via a Perl script. This Perl script is connected to the MySQL database and the serial port to the Arduino. It also monitors a queue file via tail so it can be played via the web or via an automated cron job.

I had originally thought about writing the control daemon in C and Python but I don't have any experience with those languages and Perl satisfied all my requirements while being fast enough in terms of development time and actually running the script.

The PC is also connected to a Logitech HD Webcam. This webcam is streamed via VLC and then muxed with the line-in on the sound card to an RTSP file that is picked up via the JTVLC application to be streamed to Justin.TV. This solution offered the best benefit in terms of bandwidth utilization by only having to transmit one stream to the internet that is then multicast via Justin.TV. Also overlayed into the video is the name of the current player and then the amount that player has won and the total of the player.

The display of the PC is run on an Akai 30" flat panel television viewing a webpage with two HTML 5 graphs (Generated using the RGraph library) to show the results of the last 60 plays of the machine as well as the wins of the last 1000 plays sorted into 5 different bins.

[edit] Final Thoughts

This being my first microcontroller project and my first hack of a machine I learned quite a bit. There is quite a bit of power packed into the little Arduino that will let you do quite a lot. I've been working with slot machines for about 4 years now but learned quite a bit about some of the things I took for granted on how they worked.

[edit] Contact

This project is maintained and written by Kyle Kroskey (solareon). Have a question or comment? Drop me an email at (