Shop OBEX P1 Docs P2 Docs Learn Events
Has anyone used a 3D cage-ball sensor? — Parallax Forums

Has anyone used a 3D cage-ball sensor?

DougworldDougworld Posts: 24
edited 2013-05-07 13:45 in Accessories
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?

Comments

  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-04-30 20:12
    Do you have a link to one? Sounds quite interesting.
  • ercoerco Posts: 20,256
    edited 2013-05-01 04:43
    Might not be pairs, but one common and any number of other contacts... an even number in this case.
  • kwinnkwinn Posts: 8,697
    edited 2013-05-01 09:58
    Use 5 prop pins, 4 as inputs, 1 as output, and rotate the output through each pin in turn.
  • PublisonPublison Posts: 12,366
    edited 2013-05-01 10:41
    Anybody have a link to such a device. I'm curious.
  • DougworldDougworld Posts: 24
    edited 2013-05-01 13:12
    No, that doesn't work. No pin can be called 'common' in a pentagon.
  • PublisonPublison Posts: 12,366
    edited 2013-05-01 17:02
    Dougworld wrote: »
    No, that doesn't work. No pin can be called 'common' in a pentagon.

    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:
    Ball Tilt Switch.gif
    will make contact with two contacts based on it's orientation.

    It is like Default.aspx. The Parallax Tilt Sensor

    I
    do not see where this is "3D". It looks like a 2D device.
    144 x 124 - 8K
  • ercoerco Posts: 20,256
    edited 2013-05-01 17:04
    kwinn wrote: »
    Use 5 prop pins, 4 as inputs, 1 as output, and rotate the output through each pin in turn.

    +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.
  • DougworldDougworld Posts: 24
    edited 2013-05-02 05:38
    It's 3D. The ball can move in the X, Y, and Z axes.
  • kwinnkwinn Posts: 8,697
    edited 2013-05-02 12:14
    Dougworld wrote: »
    It's 3D. The ball can move in the X, Y, and Z axes.

    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
  • kwinnkwinn Posts: 8,697
    edited 2013-05-02 12:14
    Dougworld wrote: »
    It's 3D. The ball can move in the X, Y, and Z axes.

    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
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2013-05-07 11:44
    Apart from the Globalspec link, are there any other actively selling these? For the last 10+ years they've become much harder to find. Maybe a new stash has been found recently? They're pullouts from 1980s-era pinball machines, so in the past whatever's left has been gobbled up by those who repair the machines.

    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
  • ercoerco Posts: 20,256
    edited 2013-05-07 13:45
    They're pullouts from 1980s-era pinball machines, so in the past whatever's left has been gobbled up by those who repair the machines.

    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
Sign In or Register to comment.