Friday, May 18, 2018

Introducing: Electronic Tilt Bob for Pinball Machines - Part I

Some time around 2003 I came up with the idea of using an accelerometer to simulate a pinball tilt plumb bob.  I had been working with gyroscopes and accelerometers since 1993 and it seemed like a good crossover to my hobby of pinball.  I recall my biggest challenge at the time was creating a simple user interface to customize the internal settings ... a task that would require adding a whole new layer of interface electronics such as a display and keypad.  After researching a few microcontrollers I had a basic design, but unfortunately I lacked the will to complete the project due to other commitments.

Fast forward to 2012 and the birth of the Raspberry Pi.  MEMs devices have become mainstream and I decided to revisit my Tilt Simulator project and learn Python while I'm at it.  The simulation worked ok.  And by ok, I mean it worked but it really didn't work entirely as anticipated.  Python is not the language for anything in real time and the Raspberry Pi is not the ideal substitute for a microcontroller.  Proof of concept was achieved, but the burden of requiring ancillary equipment once again put my idea on hold ... I called this prototype #2 and relegated it back on the shelf where it belonged.

Fast forward again to 2015 and I find out about a microcontroller called the ESP8266.  This device had built in WiFi and that combined with a smartphone, solved all my interface challenges.  It was then I realized that the Tilt Bob Simulator was once again a viable concept.


Phase 1:  The New Plan

Basic System
- A device which accurately mimics the movement of a pinball tilt plumb bob
- Usable in both Electro Mechanical (EM) & Solid State (SS) pinball machines
- Usable in Virtual pinball machines
- Length, size, distance, diameter, etc. in the simulation must be user customizable
- Independent decay rates (ie friction) in both X & Y axis to mimic a mechanical setup
- Accelerometer 6 point calibration to get consistent data output across multiple machines (ie tournaments)
- Mountable in any one of the 6 major axis and self aware of its orientation
- Offset tuning to correct for minor alignment errors
- WiFi connection via Access Point and Station
- mDNS support for ease of access
- Tuning/setup done via web and/or MQTT server
- Utilize power already available in the machine (5V~12V DC)

Additional Considerations
- Variable tilt hold time to accommodate for different switch matrix read times
- Tilt warnings.  So older machines can act like new ones.
- A second 'Simple Force' simulation to emulate modern systems
- Setable force threshold
- A visual indication of current force or tilt bob position

Crazy Ideas
- variable gravity (have you ever played pinball on the moon?)

UPDATE:  All features implemented except variable gravity


Phase 2:  The Test Circuits

Prototype #3 and Prototype #4

The plastic box was originally the packaging from an Intel camera however, it was the perfect solution for performing a six point calibration.


Phase 3:  The Software

I remember the days when I used to code in Assembler and wondered why you'd ever code in anything else ... Those days are now gone but not forgotten.  Coding languages may have changed but methodologies do not.  I won't go into details on how a PID control loop works or the mechanics of how to calculate the current position of the tilt bob.  I have no intention of teaching you Calculus, Physics, Electronics or Software Programming.  Just be confident in the knowledge that I've been curious about all of them at one point of time in my life.

I held off learning javascript for the longest time and finally 'bit the bullet' for this project.  It was very easy to pick up however the whole time I couldn't help but think that someone slapped this language together and said 'good enough'.  Anyways, I shouldn't complain ... it talked XML to me and made communications much simpler to implement.



Phase 4:  The Web Interface


General Setup




Fine Tuning and Levelling




Classic (Tilt Bob) Tuning




Modern (Simple Force) Tuning




Phase 5:  The Supporting Cast

Bally PLAYBOY
Here's the perfect candidate ... well, yes and no or yes.

Pros:
Has damaged tilt mechanism so it needs replacing anyways.  A few bulbs may have come loose but it is otherwise functional.

Cons (or Pros in disguise):
Display buzz ... you know the sound, it's common for machines of this era.  Despite the potential doom and gloom, it's secretly a 'pro' since it helps test the robustness of taking power from the machine.


Phase 6:   Time To Get Serious


I had to use a hot air gun to solder some parts.  Since the soldering was successful, you could technically say that I'm good at blowing hot air 😏


Installation is next, but it's a long weekend in my part of the world so hold tight for a couple days.

To Be Continued ...