Difference between revisions of "Hardware Control Systems"

From PinWiki
Jump to navigation Jump to search
(moved content from orphaned pages)
(The P-ROC will now be hosted on the pinball makers wiki)
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Introduction=
+
See: http://pinballmakers.com/wiki/index.php/P-ROC_Main_Page
Starting in the early 2000's, pinball control systems have been released.  These systems enable users (and manufacturers) to modify existing games or create new machines.  Custom machines based on these control systems are featured at most pinball shows and conventions, and new pinball companies are using them commercially to run their games.
 
 
 
Manufacturers of control systems include:
 
 
 
* [http://www.pinballcontrollers.com/ Multimorphic], producing the [[P-ROC|P-ROC and P3-ROC systems]]
 
* [http://www.fastpinball.com/ FAST Pinball]
 
* Ben Heck, who has developed the [http://www.benheck.com/pinHeck_wiki/index.php/Main_Page Pinheck board] which is used by Spooky Pinball LLC in America's Most Haunted
 
* [http://www.millisoft.de/catalog/product_info.php?cPath=22&products_id=32 milliSoft], who offers an all-in-one board
 
 
 
 
 
=P-ROC/P3-ROC=
 
[http://www.pinballcontrollers.com/ Official Website]
 
 
 
[[File:Proc-plated-threequarter-160.jpg|thumb|left|250px|]]<br clear=all>
 
 
 
 
 
The P-ROC / P3-ROC (and their related driver boards) are a set of pinball machine controller boards that allow a computer running custom software to control a pinball machine. The P-ROC board is an intelligent interface board that controls the low level pinball machine circuitry according to instructions from the computer running the game code.
 
 
 
In most cases, a [[Single_Board_Computers|single-board computer]] works quite well as the computer.  The P-ROC board can be used to either (1) replace the CPU board on existing machines (WPC-x, Stern Whitestar, or Stern S.A.M. systems) so they can run custom software, or (2) control a new pinball machine, whereas a P3-ROC can be used only to control new machines.
 
 
 
{| class="wikitable" style="text-align: center;"
 
!colspan="10"|P-ROC / P3-ROC Feature Support
 
|-
 
|
 
|WPC Driver Boards
 
|Stern Driver Boards
 
|[http://www.pinballcontrollers.com/index.php/products/driver-boards PDB (P-ROC Driver Boards)]
 
|Switch Matrix
 
|[http://www.pinballcontrollers.com/index.php/products/sw-16 Serial Switch Boards]
 
|DMD Support
 
|Aux Port
 
|I2C
 
|GPIOs
 
|-
 
|[http://www.pinballcontrollers.com/index.php/products/p-roc P-ROC]
 
|Y
 
|Y
 
|Y
 
|Y
 
|N
 
|Y
 
|Y (WPC compatible)
 
|N
 
|N
 
|-
 
|[http://www.pinballcontrollers.com/index.php/products/p3-roc P3-ROC]
 
|N
 
|N
 
|Y
 
|N
 
|Y
 
|N
 
|Y (Custom)
 
|Y
 
|Y
 
|}
 
 
 
 
 
===Functionality===
 
A P-ROC combined with a PC or embedded microcontroller provides functionality equivalent to a CPU board in a pinball machine.  Software runs on the PC or microcontroller and communicates with the pinball machine's features through the P-ROC via USB.
 
 
 
The P-ROC is essentially an [http://en.wikipedia.org/wiki/Field-programmable_gate_array FPGA (Field Programmable Gate Array)] surrounded by some support logic and a bunch of connectors.  The FPGA contains custom logic enabling it to perform tasks including:
 
 
 
* [[#USB_Control | Communicating with a PC over USB]]
 
* [[#Switch_Control | Scanning switches for switch events]] (Direct, Matrixed, and Burst)
 
* [[#Driver_Control | Driving coils, lamps, motors, etc]] (Direct and Multiplexed)
 
* [[#DMD_Control | Driving a Dot Matrix Display]] (DMD)
 
 
 
Note that the P-ROC does not handle audio. Instead audio is typically processed by the computer or microcontroller which is running the game software connected to the P-ROC.
 
 
 
The support logic and connectors enable the P-ROC to be used as a controller in custom homebrew pinball machines or as a CPU board replacement in the following generations of machines:
 
 
 
* WPC
 
* WPC-95
 
* Stern Whitestar
 
* Stern S.A.M.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
====USB Control====
 
The power of a personal computer can be leveraged to create pinball machine software with simple or complex rulesets, video sequences, and audio effects.  The PC's audio output can be connected directly to a pinball machine, but interfacing to the machine's switch and driver circuits and to display elements such as a dot matrix display requires an interface card such as a P-ROC.
 
 
 
===== Hardware Implementation =====
 
 
 
The P-ROC has a type B USB connector allowing it to connect directly to a PC using a standard USB cable.  The USB signalling protocol is handled by an [http://www.ftdichip.com/ FTDI] [http://www.ftdichip.com/Products/FT245R.htm FT245RL] chip on the P-ROC.  This chip buffers incoming data destined for the FPGA and outgoing data being sent back to the PC.  For more information about the FT245RL chip, refer to its [http://www.ftdichip.com/Documents/DataSheets/DS_FT245R_V206.pdf datasheet].
 
 
 
===== USB Drivers =====
 
 
 
[http://www.ftdichip.com/ FTDI] provides a free, closed-source driver for the FT245RL chip called [http://www.ftdichip.com/Drivers/D2XX.htm D2XX].  P-ROCs have been verified to work successfully with Windows based systems using D2XX.  Attempts to communicate with a P-ROC in Mac OS using D2XX have been unsuccessful due to an apparent bug in the Mac OS D2XX implementation.
 
 
 
A free, open-source driver called [http://www.intra2net.com/en/developer/libftdi/ libFTDI] is also available.  P-ROCs have been verified to work successfully in Linux and Mac based systems using libFTDi.
 
 
 
===== USB Bandwidth =====
 
 
 
The P-ROC can send/receive approximately 1 MB of data each second, which is more than enough to exchange any information needed to control a pinball machine, including DMD animation information at frame rates exceeding 60 fps.
 
 
 
====Switch Control====
 
The P-ROC can automatically scan direct, matrix, and burst switches and notify software and/or change the state of a driver when a switch changes states.  This allows software to spend its cycles processing game rules rather than implementing very high speed switch scan loops.
 
 
 
===== Direct and Matrix Switches =====
 
 
 
The P-ROC has 32 direct switch inputs, and it has 10 switch column drivers and 16 switch row inputs creating a 160 switch switch matrix.  The first 8 switch column drivers have dedicated outputs driven through a ULN2803 transistor array, and the other 2 are driven on an 8-bit multiplexed data bus (for WPC machines to use 8-driver boards).  The 16 switch row inputs are dedicated inputs, each going through an LM339 comparator that compares the row's voltage against a 2.5V or 6V reference voltage.
 
 
 
Every x milliseconds, the P-ROC goes through a scanning loop during which it first checks all of the direct inputs.  It then iterates through the matrix by driving a column and checking the row inputs, then driving the next column and checking the row inputs, etc.  The number of milliseconds between each full scanning loop is programmable down to 1 millisecond.
 
 
 
===== Burst Switches =====
 
 
 
The P-ROC has 32 burst switch outputs (each with two outputs) and 64 burst switch inputs.  These are provided for switches, such as long range infrared emitter/detector pairs, that require bursts of activity to function correctly.  The timing parameters of the burst activity are fully programmable (globally) so that it can work with many types of switches.  The programmable timing parameters determine how long it takes to cycle through all of the burst switches.
 
 
 
===== Switch Events =====
 
 
 
While scanning the switches, the P-ROC recognizes when the state of a switch changes.  States include:
 
 
 
* Open, non-debounced
 
* Open, debounced
 
* Closed, non-debounced
 
* Closed, debounced
 
 
 
The P-ROC can be programmed to perform specific actions for each state change for each of the 256 switches.  Actions include:
 
 
 
* Notify software
 
* Change a driver's configuration
 
 
 
For increased flexibility, the P-ROC can chain multiple actions together so that more than one action can occur as a result of a switch's state changing.  For instance, switch 3 can cause drivers 5, 10, and 20 to turn on, drivers 30-35 to be turned off, and software to be notified when its state becomes closed, debounced.  (Crazy example, but possible).  It can also have a different set of actions occur when its state becomes one of the other 3 states, such as open, debounced.
 
 
 
In typical applications, users will likely want to simply notify the host of all debounced switch events (for scoring and rule processing).  For situations requiring immediate driver reactions, such as pop bumpers popping in response to a pop bumper switch closing, a driver rule might also be used.
 
 
 
====Driver Control====
 
The P-ROC can individually control 216 driver outputs.  Driver outputs are typically used to control coils, lamps/leds, motors, etc.  There are dedicated output pins for 32 of the 216, and the other 184 are driven through a multiplexed bus that is compatible with WPC, WPC95, Stern Whitestar, and Stern S.A.M. power driver boards.
 
 
 
===== Multiplexed Bus =====
 
 
 
The Multiplexed Bus contains:
 
 
 
* 8 data bits
 
* 9 enable bits
 
 
 
The functionality of the data and enable bits is controlled by a large set of configuration registers.  For detailed information about the registers, refer to the P-ROC FPGA Specifications on the [http://www.pinballcontrollers.com/index.php?option=com_content&view=article&id=50&Itemid=56 P-ROC Documentation Page].
 
 
 
===== Timing =====
 
 
 
Every millisecond, the P-ROC checks to see if the internally programmed state of a driver has changed (either by a software write or by a switch event action).  When the internally programmed state of a driver with a dedicated output pin changes, the new state is reflected immediately on the pin.  Circuits connected to the multiplexed bus won't see driver changes immediately.  Rather, they will see the change whenever the bus logic services the changed driver.  How long that can take is determined by the configuration registers.
 
 
 
===== Driver Modes =====
 
 
 
The P-ROC can automatically control drivers in certain modes so that software doesn't need to programmatically turn on/off things like blinking lights or repeatedly pulsing coils.  The following modes can be used:
 
 
 
====== Solid ======
 
 
 
This is the simplest mode.  Drivers in this mode are either on or off, and they remain in that state until reconfigured.
 
 
 
Note - Drivers connected to high current coil circuits should NEVER be turned on solidly.  They should be driven with a timer (see the timed mode below).
 
 
 
====== Timed ======
 
 
 
A timed driver is turned on for a specified number of milliseconds, up to 255.  When the millisecond timer expires, the driver is turned off.
 
 
 
This mode is recommended for high current coil circuits that need to be pulsed for short periods of time.
 
 
 
====== Schedule ======
 
 
 
A scheduled driver turns on or off automatically according to a 1 second schedule.  The schedule contains 32 timeslots, each lasting for 31 microseconds.  When the timer enters an active timeslot, the driver turns on.  When the timer enters an inactive timeslot, the driver turns off.
 
 
 
Note - The timed mode can also be used for scheduled drivers.  When a schedule driver is configured with a timer, the timer determines how many seconds the schedule is repeated.
 
 
 
Scheduled drivers are recommended for blinking lamps/flashers.  Various light effects can be created by assigning different schedules to a set of lamp drivers.
 
 
 
====== Patter ======
 
 
 
Patter (named after the phrase pitter-patter) drivers repeatedly turn on for a certain number of milliseconds and then off for a certain number of milliseconds.
 
 
 
Note - The timed mode can also be used for patter drivers.  When a patter driver is configured with a timer, the driver turns on for the number of milliseconds specified by the timer.  When the timer expires, the patter begins and repeats indefinitely.
 
 
 
This mode is provided for fine-grained control of pulsed coils, such as Stern flipper coils that don't have hold circuits.  An example configuration would be to combine the Timed and Patter modes to pulse the coil and then patter it when the flipper button is pressed.  The driver could then be turned off when the flipper button is released.
 
 
 
====DMD Control====
 
The P-ROC is capable of directly driving a Dot Matrix Display (DMD) through a 14-bit ribbon cable.  Supported DMD features include:
 
 
 
* Programmable resolution, including 128x32.
 
* Up to 16 brightness levels (colors)
 
* 48 kb frame buffer storage (3 full frames @ 128x32)
 
* Frame events (for software synchronization)
 
 
 
Note: The P-ROC does not supply the electrical power for the DMD.  The DMD must be powered by other circuits/supplies. If you're using the P-ROC to replace the CPU board in an existing machine, then all you need to do is hook up the 14-pin ribbon cable since the existing DMD gets its power from the existing machine's power supply. If you're building a new machine, you'll need to power the DMD from your power supply in addition to making the 14-pin ribbon connection to your P-ROC.
 
 
 
===Getting Started===
 
====Hardware Installation====
 
 
 
====Connecting Switches====
 
 
 
====Software Development====
 
 
 
 
 
===Driver Boards===
 
====Functionality====
 
====Hardware installation====
 
====Controlling Devices====
 
=====Controlling Flippers=====
 
=====Controlling Lamp Matrixes=====
 
 
 
===Projects===
 
* JD_rules - Custom JD Software
 
* Single Board Computers
 
* Pyprocgame_vp, pyprocgame, Visual Pinball
 
 
 
=== Additional resources ===
 
* Modifying a WPC-95 board for Audio Input
 
* [http://www.pinballcontrollers.com PinballControllers.com website]
 
* [http://www.pinballcontrollers.com/forum PinballControllers.com discussion forums]
 
 
 
=FAST=
 
[http://fastpinball.com/ Official Website]
 
 
 
 
 
=Single Board Computers=
 
A single board computer is a complete computer built on a single circuit board[http://en.wikipedia.org/wiki/Single-board_computer].
 
 
 
Some people in the P-ROC community are investigating various single board computers for use as an alternative to a full PC or laptop (as the host from which to control the P-ROC hardware).
 
 
 
== Overview ==
 
 
 
{| border="1" cellspacing="1" cellpadding="2"
 
|-
 
! Solution
 
! Cost
 
! CPU
 
! RAM
 
! Storage
 
! AV
 
! Other
 
|-
 
| [[#Beagleboard|Beagleboard]]
 
| 150 USD
 
| 600MHz
 
| 128MB
 
| 256MB Flash, SD/MMC
 
| Audio I/O, DVI-D + S-video out
 
| USB OTG
 
|-
 
| [[#Chumby|Chumby Hacker Baord]]
 
| 90 USD
 
| 454MHz
 
| 64MB
 
| 512MB uSD
 
| Composite video out, audio I/O
 
| 3 USB
 
|-
 
| [[#ODROID|ODROID U3]]
 
| 75 USD
 
| 1.7GHz quad core
 
| 2GB
 
| 128MB Flash
 
| HDMI, Audio I/O
 
| USB host, USB OTG, Ethernet, GPIO, I2C
 
|-
 
| [[#Raspberry Pi|Raspberry Pi]]
 
| 40 USD
 
| 700MHz
 
| 512MB
 
| SD Card Slot
 
| HDMI out, Audio I/O
 
| USB host, USB OTG, Ethernet
 
|}
 
 
 
== Beagleboard ==
 
 
 
=== Links ===
 
 
 
* [http://beagleboard.org/ beagleboard.org]
 
* [[Beagleboard P-ROC setup guide|P-ROC software (libpinproc/pyprocgame) Setup Guide]]
 
 
 
== Chumby ==
 
 
 
=== Links ===
 
 
 
* [http://www.adafruit.com/index.php?cPath=46&main_page=product_info&products_id=278 Adafruit.com]
 
 
 
== ODROID ==
 
 
 
=== Links ===
 
 
 
* [http://www.hardkernel.com/main/products/prdt_info.php?g_code=G138745696275 ODROID-U3]
 
 
 
== Raspberry Pi ==
 
 
 
=== Links ===
 
 
 
* [http://www.raspberrypi.org/ Raspberry Pi]
 
* [http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=raspberry%20pi Amazon.com]
 
* [[Raspberry Pi P-ROC setup guide|P-ROC software (libpinproc/pyprocgame) Setup Guide]]
 

Latest revision as of 06:00, 8 February 2016