Simple and Reliable Homemade Pinball Sensors

Hello!

I am working on a from scratch pinball project and am looking for ideas on improving some of my sensor designs. I am making the sensors rather than buying pinball machine parts/microswitches/etc.

Please see the attached image which I hopes help clarify the ideas I have now for event detection.

POPBUMPERS
The only one I have tested so far is the popbumper collision detection, and I'm not happy with the results yet. For those who aren't familiar, popbumpers are the round actuators that shoot the ball out the direction the ball collided from by rapidly pulling down an angled ring. Real pop bumpers have a mechanism that isn't feasible for me to replicate in order to detect a ball collision with the bumper. My current set up detects the ball by the conductive ball completing a circuit between the metal shaft which supports the shooter ring and a flat metal ring encircling the shaft. The problem is that even when I've tested with interrupts on the Arduino, the time that the circuit is closed (while the steel ball is bouncing off the shaft) can be so brief (nearly instantaneous) that it only registers about half the time, meaning that I hear the ball collide with the shaft but the game totally misses it and the bumper doesn't fire reliably.

Two ideas I have are implementing some circuit that extends the amount of time the signal is pulled high (or low) or messing around with capacitance/discharge timing of the system. I haven't thought of a real good approach for the circuit, and I anticipate a couple issues with the capacitance method. The capacitance change detection would theoretically increase the time I can detect the ball because it wouldn't only include the time the ball was physically touching the shaft, but I'm not sure if I'd be able to run the necessary timing calculations with enough frequency and speed while still taking care of the rest of the sensors, scoring, lights, etc. Also, since the ball is small, I'm guessing it would be significantly more difficult to detect than human touch.

TARGET SENSOR
My current best idea for a simple sensor that detects when a target has been hit is one in which the target is on a fulcrum and spring or elastic loaded into the forward position where a circuit is closed. When the target is hit it temporarily breaks contact and opens a circuit. I anticipate that I could also have too short of a change here in switch status and this may also benefit from a circuit that prolongs time to register the event. (The pop-bumper is slightly more sensitive in timing because it has to react in time to shoot the ball back out before it simply bounces off and is out of range, but this one just has to eventually (ie. within a second) give the player their points.

ROLLOVER SENSOR
This one I think is going to work with my current design, but I haven't tested it (hopefully tomorrow I will test a prototype) and am still open to suggestions. It would be a firm wire (ie. heavy paperclip) with a bend in the middle that protrudes from a slot in the playfield and depresses when the ball goes between the appropriate guiderails, opening a circuit. Because it will take time for the ball to roll over the switch, I'm thinking that there will be enough time to register the change in switch status with this one.

OTHER
I have some other sensor types involving IR LED/transistor pairs, etc, but I think I'm okay on those.

I apologize about shotgunning so many different things out there, but I am sure that somebody(ies) on here will have suggestions of simple solutions I haven't been able to think of.

Any suggestions on detecting these events are welcome. Thanks ahead of time!

If you encounter problems with short spikes on a contact, add a capacitor to the contact. This capacitor will discharge quickly on contact, and charge slowly from the pullup resistor afterwards. 10nF and 50k will result in about 500µs prolongation.

If you're experiencing hits that are too short, i suspect there is something else wrong... the Arduinos will respond far quicker than a ball can move/respond.

For the rollover, you may try reflective IR -cheap and reliable.

For the targets, you could use capacitive sensing, again - no moving parts and cheap to implement.

The hardest thing you have to work out is the concentric solenoid plunger on the bumpers. And the software. Remember this is effectively a realtime system, so no delay() calls!

It's not the ball that causes intermittent signals, it's the mechanical contact which can bounce rapidly.

Capacitive sensing takes time for polling every single sensor, not well suited for real time applications.

Phototransistors can be used for rollover, be reflective IR or simply obscuration by the ball.

You can get a capsense result in well under 100 microseconds when it comes to sensing device vs sensing device with metal ball in very close proximity.

You can start with this and note that 16 cycles is 1 microsecond.

http://playground.arduino.cc/Code/CapacitiveSensor

I found that untouched, the setup shown would fill in less than 5 cycles. Touched... many more but all I want to know is if it is touched or not.

Compare to debouncing contacts that takes 2+ milliseconds and is still plenty fast enough for pinball.

One thing I did do with that tutorial was to replace the wire stuck in the pinhole with one leg of a 1 uF cap. The other leg, I put a bend in it and some foil on that to better couple with my field/finger and it slowed down only a bit while giving me protection against small static sparks.

Even when you have many sensors, you only need to check each one perhaps every millisecond or two.

Upshot --- do it right and your sketch will see the ball coming and going like they take all day.

DrDiettrich, lastchancename, GoForSmoke: Thank you all for your tips and ideas!

@DrDiettrich: I figured a capacitor had a place in this scenario, but wasn't sure how to implement exactly. I drew a couple options I think may be what you're describing? I don't have formal electronics training so I am probably missing something, but I thought that a capacitor would charge and discharge at the same rate unless there was a different resistor in the series somehow during charge vs discharge. For schematics A and B I think that the capacitor would have to empty very quickly and charge slowly to keep the pin pulled low longer. For C it seems like it would have to be the opposite, but I am sure that I am totally missing something here. Can you tell whether I have an issue in my schematics and/or my thinking and help me to get straightened out?

@lastchancename: I am implementing obstruction type IR pairs elsewhere, but there isn't space for the LED/transistor underneath the 1/8" rails. For reflective IR, would you recommend the sender and receiver are inline in the playfield and angled slightly towards each other (attached drawing)?

@GoForSmoke: I haven't programmed a microcontroller low level with registers and all, so I don't understand everything in the code, but do you anticipate I could use the function for multiple pins without tweaking anything? And just to make sure I understand the implementation of the code - l call readCapacitivePin() whenever I want to poll, it returns a value from 0 to 17 and I decide what the threshold is I want to use? Ie. if (readCapacitivePin(SENSOR_PIN) >= ACTIVATION_THRESHOLD)  activateActuator(); ?

Thanks again all for your help already!

reflective IR.jpg

The capacitor should be wired in parallel to the contacts.

Light barriers are usually activated by an obstacle breaking the beam. A reflective barrier then requires a reflector opposite to the sender and receiver, and a mostly non-reflective object to break the beam. But even a well reflecting ball between side-by-side sender and receiver can prevent light from reaching the receiver. Find out yourself, using an IR diode and transistor in various arrangements on your board.

With sufficient and constant ambient light a phototransistor can respond to an object that obscures the transistor when passing over it. An additional IR diode will provide brighter and more constant light on the transistor, making it easier and safer to detect an obstacle in between.

@DrDiettrich - I haven't had a chance to test it in real life, but running sims the capacitor seems to be doing what I need it to. Thanks again!

In that cap sense sketch, you measure how long to charge the object stuck in the pin hole. If the electrical field of the object is coupled with the field of the user it will take longer.

If you try charging many pins in the same instant, their fields will interact. Last time I tried, it didn't work well but I didn't really try all I could to make it work so there may be a way.

It was easy enough to work one pin at a time and still read more often than needed.