Atmel168 and a pinball machine

Status
Not open for further replies.

trickpony

New Member
Hi all.
I am starting a new project and need some help.

I want to modify an older (1977) electromechanical pinball machine.

What I want to do is simple. The machine has 10 drop targets (targets the pinball hits and they drop down). When one drops, it forces a switch connection that carries 6v AC to a corresponding light bulb (to light it).

I want to remove these light bulbs, tap into the 6v AC "signal" and relay the info to my Microcontroller. (I will then light my own set of 10 leds the way I want).

I am planning on using a 16 channel analog/digital multiplexer, and poll the state of the 10 drop targets frequently.

My problem is that I dont know the best way to get the 6v AC to read in as a signal to my Atmel.

For power of the Atmel, I am planning on taking 6v AC from the pinball machine, half-recitfying it with a 1n4004 diode, smoothing it with a capacitor (what uF?) then voltage regulating it to 5v DC.

Question 1: Will the multiplexer route AC signals? Could I connect the AC 6v from the switches directly to the multiplexer, or will I have to diode, cap, regulate each switch to change it to DC?
(The multiplexer is rated to run at 3-15V)

Question 2: If the above is possible then how should I power the multiplexer..can I do it from the 5v DC out of the microcontroller

Question 3: Should I be hooking the atmel ground to multiplexer ground to pinball ground?

Thanks for your help,
Ben
 
Hi Ben;

Are you the one that asked about this on the Arduino forum? If not someone is working on a similar project.


Anyway lets see if I can add any thoughts to your project, it's a neat concept to interface with a pin ball machine.

I am planning on using a 16 channel analog/digital multiplexer, and poll the state of the 10 drop targets frequently.

My problem is that I don't know the best way to get the 6v AC to read in as a signal to my Atmel.

For power of the Atmel, I am planning on taking 6v AC from the pinball machine, half-recitfying it with a 1n4004 diode, smoothing it with a capacitor (what uF?) then voltage regulating it to 5v DC.

Question 1: Will the multiplexer route AC signals? Could I connect the AC 6v from the switches directly to the multiplexer, or will I have to diode, cap, regulate each switch to change it to DC?
(The multiplexer is rated to run at 3-15V)

That kind of analog switch demultipler chip can operate with either digital or AC input signals. However to work with AC analog voltages (like 6vac) the power supply for the mux chip will have to be +9 and -9 volts, a little awkward to implement. If the 6vac signals are first converted to a lower voltage digital signal by rectifying and filtering then the mux can be powered with just +5 and common.

Question 2: If the above is possible then how should I power the multiplexer..can I do it from the 5v DC out of the micro-controller

Yes, but only if you first convert for 6vac signals to a 0-5vdc signal. See above.

Question 3: Should I be hooking the atmel ground to multiplexer ground to pinball ground?

Yes all circuit commons must hook together in this design. This could be a problem because pin ball machines (at least the older electromechanical ones) can generate a ton of noise and is bound to effect the micros power causing unwanted resets and other nasty things. The best way to prevent this kind of noise problem to to utilize opto-isolator chips and I think that might be a better way to design the whole method to interface to your micro.

Iso-isolators have internal LED that shines on an internal switching transistor so that there needs to be no wiring to the circuit ground on the input side. There are models of iso-isolator chips that can have 4 couplers in one 14 pin DIP package so three of these chips could handle all 10 6vac signals you want to read. Here is a opto from sparkfun that could work:

SparkFun Electronics - Optoisolator - 4 Channel

To use these you would wire each 6ac socket via a 600 ohm resistor (to limit internal LED current to 10ma) to the input pins of each optical isolator. The output of each isolator would have a pull up resistor to 5vdc. You now have a digital signal (0vdc or 5vdc) and can process in with your demultipler (and power your mux with just 5vdc) as a digital signal. However the single data output of the mux unit may need some filtering as the signal will be turning on and off at a 8.33 msec rate as long as the 6vac 60hz voltage is on and your micro might read that as many on/offs instead of just one steady active state. A simple resistor/capacitor filter should be able to smooth that out.

Anyway the use of optical isolation solves three problems.

1. Does not require rectification/filtering of each of the 10 lamp signals.
2. Eliminates having to wire your micros ground connection to the pinball
machines ground.
3. Allow you to utilize your multiplexer as a 5volt logic circuit so that it can be powered by the micro's on board 5vdc supply.

Other things to consider going ahead.

1. Will your micro and program be fast enough to catch each and every hit on a contact on the pinball? It will take some time for your program to scan all ten inputs from the mux chip to see if any are active, and that cycle time will be a basic timing limit on how fast you can detect, and to activate a new LED light from your micro. It probably will be fast enough but you need to think and be aware of this.

2. You can leave the 6vac bulbs in their sockets on the pinball if you wish, the extra 10ma load of each optical isolator won't effect anything. More lights the better
 
Thanks Lefty

Thanks for the response and the link to the 4 channel optoisolator. I didnt think of feeding the output of the isolator to the multiplexer, in order to bring down the needed pins from the atmel...that is great.

I did come up with another option that I am tempted to do. I could actually cut the wire carrying the 6v AC into and out of the bank of 10 switches. I would then take a long wire and connect from the light in front and in back of the bank, basically bypassing the 10 bank but keeping the rest of the pinball alive and bright. I dont need the 10 light bulbs to light because I am replacing them with the atmel controlled LEDs.

Then I would supply 5v DC from the atmel directly to the switches. I could even use a wall wart to supply DC power to everything.

My only problem is that I want the change to be easily reversible, and cutting wires is kind of ummm cheating.

In the end I need to use a transistor like a tip102 to get a solenoid to fire (1000s point reel). This is being powered by 24V AC. Can run this directly thru the transistor and trigger it with a 5v digital out of the atmel? (Sorry again for my ignorance).

Thanks again,
Ben
 
Which pinball is it that you using as a 77 EM machine would most likely have a switch matrix. My friend has a Bally Lost World which was made in 78 and this has a switch matrix. This will make your design far more complicated as you will have to detect the column strobe and read in the row. What you are seeing as 6V AC is probably the 12V switch matrix in operation. Download the service manual for your machine from IPDB and see if it has a matrix. FYI, my current pinball is a Williams Monster Bash.

Mike.
 


Lefty, ex pinball wizard here.

We use to 'cheat' the machines in our local bowling alley during my teenage years. First we put ashtrays under the front legs, this would slow the balls way down and made it easy to run up high scores and gain free games. Later we learned to melt nylon fishing line to a quarter and slowly lower down the coin slot, at the right point the 3 game credit circuit ( yes I'm old, 3 games cost .25) would just keep running up the game credit counter to it's max. We would play till we had to go home and sell the remaining free games to other kids. Funny thing is after playing hundreds of free games you got good enough where you didn't need to cheat to win game. I guess it was a case of practice, practice and practice.
 
Last edited:
Lost World

Thanks Pommie, my machine doesnt have a switch matrix. There are no solid state components, it is purely electromechanical (solenoids and banks of physical switches and relays). Lost World is an early SS (solid state) machine from Bally, who was ahead of every other manufacturer...within 2 years everyone was doing SS.

Monster Bash is a sweet machine...


Wow, Lefty, advice and links to products.. thanks a ton!
Ben
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…