Hobby Electronics Basics How to handle many I/O events - like a pinball machine?

Bookmark this page:  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
How to handle many I/O events - like a pinball machine? steadisteve 12-26-06
Posted by on December 26, 2006, 2:42 pm
Please log in for more thread options


How does a pinball machine handle the gazillion sensors and lights and
coils and stuff?

I'm an electronic newbie who's interested in robotics and electronics
now. I have a comp. sci. education (years ago) so programming
challenges are OK but the electronics is slow going. I like to study
some machine until I learn something. CNC router = learning motor
control for example.

I've always wanted to build a pinball machine from scratch. No, not
nearly as complicated as, say, Funhouse but thought it would be an
interesting challenge where I could deal with much electronic theory -
it'll take years of course. One of the things that is immediately
apparent to me is the slew of lights, swtiches, sensors, scoring
targets, and solenoids that must be addressed by the microprocessor(s).
How is this handled? I doubt the microcontroller has 150 discreet
I/O lines with 150 relays, MOSFETS, transistors, switches, whatever -
but does it? Or is there some sort of matrix or something where the
CPU can switch them all with few I/O lines.

Asked another way, how can a BASIC stamp (or whatever) with, say, eight
I/O lines independently control 100 different lights? Or read 100
different switch events? Surely there is some clever way? Can you
point me in the right direction?


Posted by James Beck on December 26, 2006, 3:01 pm
Please log in for more thread options


steadisteve@aol.com says...
> How does a pinball machine handle the gazillion sensors and lights and
> coils and stuff?
>
> I'm an electronic newbie who's interested in robotics and electronics
> now. I have a comp. sci. education (years ago) so programming
> challenges are OK but the electronics is slow going. I like to study
> some machine until I learn something. CNC router = learning motor
> control for example.
>
> I've always wanted to build a pinball machine from scratch. No, not
> nearly as complicated as, say, Funhouse but thought it would be an
> interesting challenge where I could deal with much electronic theory -
> it'll take years of course. One of the things that is immediately
> apparent to me is the slew of lights, swtiches, sensors, scoring
> targets, and solenoids that must be addressed by the microprocessor(s).
> How is this handled? I doubt the microcontroller has 150 discreet
> I/O lines with 150 relays, MOSFETS, transistors, switches, whatever -
> but does it? Or is there some sort of matrix or something where the
> CPU can switch them all with few I/O lines.
>
> Asked another way, how can a BASIC stamp (or whatever) with, say, eight
> I/O lines independently control 100 different lights? Or read 100
> different switch events? Surely there is some clever way? Can you
> point me in the right direction?
>
>
Google :
Switch Matrix
Lamp Matrix

Basically all the switches are read in 8 bit lumps and the lamps are
strobed the same way, just at higher current levels.
The coils are driven using latches that are set and reset to turn the
drivers on and off.

Jim

Posted by on December 26, 2006, 3:22 pm
Please log in for more thread options



steadisteve@aol.com wrote:
> How does a pinball machine handle the gazillion sensors and lights and
> coils and stuff?
>
> I'm an electronic newbie who's interested in robotics and electronics
> now. I have a comp. sci. education (years ago) so programming
> challenges are OK but the electronics is slow going. I like to study
> some machine until I learn something. CNC router = learning motor
> control for example.

Most of it is simple, since pinball machines
are the perfecr machines for what computers
are worst at, audio-visual random events,

Most of the io you'tre talking about is
pretty simple in theory, but a little
difficult to build right. You use
multiple delay lines between the
various lights and bells. That gives
the machine a simulated depth percetion
that really isn't there.
So it's really in principle the same problem
as programming a pinball game to
play over the net.




>
> I've always wanted to build a pinball machine from scratch. No, not
> nearly as complicated as, say, Funhouse but thought it would be an
> interesting challenge where I could deal with much electronic theory -
> it'll take years of course. One of the things that is immediately
> apparent to me is the slew of lights, swtiches, sensors, scoring
> targets, and solenoids that must be addressed by the microprocessor(s).
> How is this handled? I doubt the microcontroller has 150 discreet
> I/O lines with 150 relays, MOSFETS, transistors, switches, whatever -
> but does it? Or is there some sort of matrix or something where the
> CPU can switch them all with few I/O lines.
>
> Asked another way, how can a BASIC stamp (or whatever) with, say, eight
> I/O lines independently control 100 different lights? Or read 100
> different switch events? Surely there is some clever way? Can you
> point me in the right direction?


Posted by jasen on December 26, 2006, 11:59 pm
Please log in for more thread options


> How does a pinball machine handle the gazillion sensors and lights and
> coils and stuff?

the old ones used hard-wired logic.

> I've always wanted to build a pinball machine from scratch. No, not
> nearly as complicated as, say, Funhouse but thought it would be an
> interesting challenge where I could deal with much electronic theory -
> it'll take years of course. One of the things that is immediately
> apparent to me is the slew of lights, swtiches, sensors, scoring
> targets, and solenoids that must be addressed by the microprocessor(s).

since the ball can only be in one place at a time: some sort of matrix would
work for many of the sensors.

I think many of the bumpers operate autonomously too, if ther ball hits one
it hits back. and signals to the scoring processor.

> Asked another way, how can a BASIC stamp (or whatever) with, say, eight
> I/O lines independently control 100 different lights? Or read 100
> different switch events? Surely there is some clever way? Can you
> point me in the right direction?

use a matrix.





--

Bye.
Jasen

Posted by Bob Masta on December 27, 2006, 10:06 am
Please log in for more thread options


On 26 Dec 2006 11:42:27 -0800, steadisteve@aol.com wrote:

>How does a pinball machine handle the gazillion sensors and lights and
>coils and stuff?
>
>I'm an electronic newbie who's interested in robotics and electronics
>now. I have a comp. sci. education (years ago) so programming
>challenges are OK but the electronics is slow going. I like to study
>some machine until I learn something. CNC router = learning motor
>control for example.
>
>I've always wanted to build a pinball machine from scratch. No, not
>nearly as complicated as, say, Funhouse but thought it would be an
>interesting challenge where I could deal with much electronic theory -
>it'll take years of course. One of the things that is immediately
>apparent to me is the slew of lights, swtiches, sensors, scoring
>targets, and solenoids that must be addressed by the microprocessor(s).
> How is this handled? I doubt the microcontroller has 150 discreet
>I/O lines with 150 relays, MOSFETS, transistors, switches, whatever -
>but does it? Or is there some sort of matrix or something where the
>CPU can switch them all with few I/O lines.
>
>Asked another way, how can a BASIC stamp (or whatever) with, say, eight
>I/O lines independently control 100 different lights? Or read 100
>different switch events? Surely there is some clever way? Can you
>point me in the right direction?

One easy way to add more I/O lines is via multiplexing.
You can do this with two ports, one to select the target
(or source) and the other to read or send the data.
For example, if the "selector" output uses only 4 active
bits, it can output one of 16 values, which go to a 1-16-line
multiplexer chip to enable only 1 of 16 octal latches. Then the
data (8 bits) is written to the other (output) port, and it goes only
to the selected latch. So this way you can control 16 * 8 output
lines. And of course, since the control output actually has 256
states you could ultimately control 256 * 8 lines. Inputs work
in a similar manner.

Best regards,



Bob Masta
dqatechATdaqartaDOTcom

D A Q A R T A
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Home of DaqGen, the FREEWARE signal generator

Similar ThreadsPosted
How to handle many I/O events - like a pinball machine? December 26, 2006, 2:42 pm
Re: wildly improbable events August 24, 2008, 1:58 pm
Pinball switch closure problem March 21, 2005, 7:35 pm
answering machine September 11, 2006, 12:54 pm
Beef Jerky Machine March 12, 2007, 5:13 pm
Positioning a FAX and an Answering Machine May 31, 2007, 11:43 am
Russian sleep machine availability ??? July 29, 2005, 4:15 pm
Messages Deleted on Answering Machine May 20, 2008, 3:41 am
clocked-synchronous state machine analysis November 26, 2005, 9:35 pm
No cold water in my HOTPOINT washing machine !!! June 21, 2006, 6:47 am
how much current can AWG wire handle December 8, 2008, 11:09 am
how to get this PWM DC motor control to handle more power October 28, 2008, 11:58 am
Replacement for BC557B and 547B which can handle 1 Amp December 23, 2008, 3:22 am
instructor's solutions manual for Machine Design - An Integrated Approach (3rd Ed., Norton) & instructor's solutions manual for Chemical Engineering Volume 1, 6th Edition, by Richardson, Coulson,Backhurst, Harker & instructor's solutions manual for Com November 21, 2008, 10:55 pm
instructor's solutions manual for Machine Design - An Integrated Approach (3rd Ed., Norton) & instructor's solutions manual for Chemical Engineering Volume 1, 6th Edition, by Richardson, Coulson,Backhurst, Harker & instructor's solutions manual for Com November 23, 2008, 8:36 pm