Hello, all! I'd like my Arduino to know what the score is on a 1970's pinball machine. I think I've got the right idea, but if anyone has any input, I'd love to hear it.
This pinball is so old it uses mechanical reels to display the score. Four of them, to be precise, each one powered by a single step-up coil that runs at 40v AC.
(everything inside this machine runs at 40v AC. Apparently having Frankenstein's Lab levels of lightning arcing inside as it's running is just fine and expected for a machine of this age.)
I want my score to be mirrored on an LCD or e-paper display connected to the Arduino, so that I can add high-score functionality and enable scoring higher numbers too (a lamp comes on once you pass 100,000 points, but when you get to 199,990 points, it just cycles back around to 100,000 points again).
At first I thought about sensing the voltage sent to the score reel step-up relays - but there are two problems with that. First, it's 40v AC, so I'd be looking at a step-down transformer for every reel, and that just doesn't sound like fun to me. Second, more crucially, sometimes two pulses are sent in rapid succession to a score reel, and the mechanical reel itself doesn't have time to register both - it's more important to me that the readout on the Arduino reflect the readout on the reels than that the Arduino reflect what the player's score should be.
So, after a bit of dillydallying, I'm leaning towards an optical approach. I'm going to print out some strips of paper with ten different shades of grey, and affix them to the inside of each score reel. Black will be at the nine position, white at zero, and everything in between will be a shade of grey. Then I'm going to use some sort of photoresistor-and-LED kind of setup, to have the Arduino sense the position of the reels by evaluating the light coming back off the strip of paper. I figure I can take care of calibration in software - since the reels reset by stepping to zero and only counting up, I can get a baseline from a routine that watches for a big, sudden difference between white and black.
One wrinkle is that there are also flashy lights in the backbox where the score reels go, so we need to isolate the photoresistor from that light, or compensate in software.
I would like to find a package that has a photoresistor and LED (and preferably some sort of shading arrangement to make it so that only light reflected from the LED itself is registered) in one thing, so as to simplify the circuit, but I'm having problems finding an appropriate component. If anyone can help, or if anyone has a better idea, I'd love to hear it.
Thanks!
-CavemanJoe