Has anyone used a 3D cage-ball sensor?
Dougworld
Posts: 24
Has anyone used the small clear plastic 7-pin rolling-ball in cage switch that can be found cheap on the web? The problem I'm having is that there are 5 pins in the main cage-ball area in the shape of a pentagon, which is an odd number, which means that connecting the pins in plus/minus pairs is impossible to do. See if you can solve this: number the pentagon pins 1-5 clockwise.
Now you can sense the ball positioned between, e.g., pins 2 - 1 and 2 - 3, by using pin 2 as Vdd, and pins 1 and 3 as Vss.
But when the ball rolls to the 4 & 5 side of the pentagon (remember pin 3 is Vss) then by definition, pin 4 must be Vdd, which forces pin 5 to be Vss, which makes pin 1 -- yikes! it is also Vss. So you can't sense the ball between pins 5 and 1.
No matter how you slice it, you can't get "pairs" of Vss/Vdd out of an odd number of contacts.
Obviously, the two connectors, let's call them 7 and 8 are easy enough to sort out as Vss and Vdd. Also, there are no possible contacts with the pentagon of connectors and pins 7 and 8, so no further analysis is needed on them.
Am I just a moron and everybody else has figured it out but me? What good is an EE who can't divide 6 by 5 and get an answer to this?
Now you can sense the ball positioned between, e.g., pins 2 - 1 and 2 - 3, by using pin 2 as Vdd, and pins 1 and 3 as Vss.
But when the ball rolls to the 4 & 5 side of the pentagon (remember pin 3 is Vss) then by definition, pin 4 must be Vdd, which forces pin 5 to be Vss, which makes pin 1 -- yikes! it is also Vss. So you can't sense the ball between pins 5 and 1.
No matter how you slice it, you can't get "pairs" of Vss/Vdd out of an odd number of contacts.
Obviously, the two connectors, let's call them 7 and 8 are easy enough to sort out as Vss and Vdd. Also, there are no possible contacts with the pentagon of connectors and pins 7 and 8, so no further analysis is needed on them.
Am I just a moron and everybody else has figured it out but me? What good is an EE who can't divide 6 by 5 and get an answer to this?
Comments
http://www.globalspec.com/learnmore/sensors_transducers_detectors/orientation_position_sensing/tilt_switches
I'm not sure there is a common in the pentagon setup. How could you have a common to the ball?
The Ball Tilt Switch shown here:
will make contact with two contacts based on it's orientation.
It is like . The Parallax Tilt Sensor
I do not see where this is "3D". It looks like a 2D device.
+1. Have your program continuously scan all pins to see which two are connected. Pulldown resistors on each pin will make them read low unless they are pulled high by being connected to a momentarily high adjacent pin.
The ball still shorts 2 pins together to detect orientation. If you:
- connect each propeller pin to a cage pin
- make only one of the propeller pins an output at any one time, and have all the rest as inputs
- step through each pin and make it an output with 3.3V on it, and all others inputs
- read the inputs to see what pin the output is connected to
you will then know what 2 pins are connected after each pin has had a turn as an output
The ball still shorts 2 pins together to detect orientation. If you:
- connect each propeller pin to a cage pin
- make only one of the propeller pins an output at any one time, and have all the rest as inputs
- step through each pin and make it an output with 3.3V on it, and all others inputs
- read the inputs to see what pin the output is connected to
you will then know what 2 pins are connected after each pin has had a turn as an output
Maybe the biggest problem with these is that the ball is plated with something that doesn't inhibit corrosion or rust, and as it's not sealed in the package, the ball gets crudded up eventually and the sensor no longer works reliably.
For a time optical slot tilt sensors were all the rage. Those seem to be less common now, too. I'm guessing 3-axis accelerometers are really cheap in high quantity these days.
-- Gordon
My 1977 Gottleib Jungle Queen game has a simple pendulum tilt switch. It was the last all-mechanical pinball game, brimming with electromechanical contacts. Scores of relays, solenoid-driven rotary turntables for "bonus memory", and of course the solenoid-driven mechanical scoring displays for 4 players. All the internal heat generated by dozens of incandescent light bulbs warms the plywood and particle board case, giving off a very pleasing aroma... http://www.pinballrebel.com/pinball/jungle_queen/jungle_queen_pinball.htm
But I digress. It's a labor of love to maintain. Play it too much and it wears out. Don't play it and the electical contacts oxidize and it stops working. What a way to make a living... FYI, some handy pinball repair tips at http://user.xmission.com/~daina/tips/pub/emTips.html