Catch up on stories from the past week (and beyond) at the Slashdot story archive


Forgot your password?
User Journal

Journal NanoGator's Journal: I'm looking for a particular type of sensor, help? 29

Hi All,

I'm trying to find a sensor that I can implant in a device and have it detect how many degerees it's tilted. A mercury switch might work if there's a way of getting a degree angle out of it. Another idea was something gyroscopic...

Before I go off and invent this device, I'd like to know if anybody's ever heard of one. Help?

This discussion has been archived. No new comments can be posted.

I'm looking for a particular type of sensor, help?

Comments Filter:
  • Gyros are the traditional choice for attitude sensing, and can be had for 3 digits in small packages designed for RC vehicles.

    Also check out magnetometers, which know their orientation in the magnetic field. Seems like they would be unreliable, but we've had good success with the one on our rocket.
    • Thanks for the info! Where could I buy something this? Is there a Radio Shack kind of place?
  • No offence, but I don't think it would be too hard to find this kind of stuff on your own. It took me 7 seconds to do a google search, which brought forth a lot of info.

    Anyway, you could probably buy a gyro from a hobby store that sells radio controlled stuff. RC helicopters use gyros to stabilize their flight. From what I could tell, piezo gyros are very popular, because of their small size, sensitivity and the fact that they have no moving parts.

    This link [] has a listing for a certain gyro, and also has a little explanation on how it works.
    Futaba [] sells all sorts of RC-related stuff, and has a decent selection of gyros.
    Also, you could do a search on eBay. There will be some gyros listed there, for sure.

    Lastly, why do you need such a sensor? Are you building your own Segway?
    • "No offence, but I don't think it would be too hard to find this kind of stuff on your own."

      Just wanted some experience from people who've done that is all. :) *didn't want to go through a whole lot of trial and error*

      Thanks alot! I appreciate it.
  • Easier if you give some parameters, like max size, max cost, max angle, min sensitivity, min time response, digital vs. analog, and so on. The gyro mentioned above is $90, which may or may not be within your range.

    For absolute cheap, I would get two potentiometers from Radio Schlock (may we have your phone number? Am I only allowed to buy stuff here if I have a phone?), large ones that turn easily. Shd be under $5. Then clamp a rod so it hanges off the post. If the thing is tilted, the rod will still hang straight down, turning the knob on the pot and changing the resistance. Put two at right angles, so you get an analog signal of tilt angle along both axes. This is an ugly kludge, but it is certainly cheap. (Don't bother commenting how this is a crappy way to do it unless you can come up with a better way for under $10.)

    BTW, the magnetics idea is silly, because it will only tell you your angle w.r.t. the Earth's magnetic field, which is not vertical (most places).

    Another BTW: did little gyros like that have good long term stability? I am imagining a robot that tilts over 3 degrees more every day until it falls over.

    • Thanks for the help!

      I have a camera and I want to find a way to record it's pitch. Reason? Well I really can't talk about that, trying to invent something hehe. :)
  • Places like digikey have optical angle sensors (potentiometer-like gadgets that output a binary number corresponding to how much the unit's shaft was rotated.) -- Attaching an off-center weight to the unit's shaft will result in output proprotional to the amount the unit is tilted.

    Use two mounted at right angles to each other to capture tilt in any direction...

    • Hmmm would that work if it's a hand held device though? What I want to do is attach one of these sensors to a camera and get a pitch angle. What you describe sounds like part of the rig'd have to be anchored to the ground.

      • I think they are talking about making what amounts to a digital plumb bob, with an optical encoder or a potentiometer attached to a weight. A potentiometer would require more force to rotate, but (relatively) cheap encoders are relative encoders, not absolute.
        Here is the difference: an absolute encoder (which can be rigged up with a potentiometer), is one which tells you "the shaft is at position X". While the relative encoder can only tell you "since you last checked, the shaft has moved X degrees".
  • Mount a rod into a set of ball bearings mounted to the enclosure. Attach another rod hanging from the middle with a counter weight attached to that. Attach a potentiometer to the end of the rod. Attach the pot to the enclosure. As the enclosure is tilted the pot rotates but the shaft stays in the same place because of the counter weight. You can find the POTS at radio shacks web site. The rod and bearings can be found at I hope this helps.
  • Inclinometer (Score:3, Informative)

    by bughunter ( 10093 ) <> on Tuesday April 30, 2002 @08:41PM (#3439619) Journal
    What you want is called an "inclinometer" or "declinometer," depending on the application.

    Check this page [] for commercial-quality two-axis inclinometers.

    Or if you'd rather save money and build them yourself, this fella [] seems to have a pretty good idea for a very small, glycol-dampened inclinometer that won't oscillate like the other pot-and-pendulum designs offered here. (Just stay away from his home page!)

  • Accelerometers (Score:2, Informative)

    by flyingV ( 72384 )
    If you have EE experience, you may also want to look into accelerometers [] which measure acceleration in a particular direction. Since gravity is an acceleration, it wouldn't be too difficult to figure out which direction is down, using one or more accelerometers oriented in the proper direction... in theory. And even if there wasn't any gravity, these chips would detect a slowing down or speeding up in whatever axis you orient them to detect, giving you either a digital, analog, or duty-cycle change (depending on which chip you use)

    Oh yeah, and one more thing: I did the free registration so I could order 2 free samples of the ADXL190 []. They showed up at my door in 2 days. And yes... I still paid nothing!
  • As has already been mentioned, it really depends on your application, what you're interfacing to, etc.

    Absolute best answer: get this book [] for $6 from Radio Shack. I have it. My answer is from it. It has 3 or 4 circuits to do just this, none of which should cost you more than $15 to construct. If you can't find it locally because there are no Radio Shacks locally, I'd be glad to run out and get it and ship it to you. E-mail me at merlin_jim *at* hotmail *dot* com.

    Two easy and quick solutions:

    A 2 or 3 axis accelerometer is an easy and cheap way to do it if you have a real time operating system, where you can sample the accelerometer often at known intervals. 3-axis is best, because then you don't have to worry about orientation; you'll get all the space acceleration parameters and be able to interpolate from there which direction down is, and therefore the tilt angle. If all you need is threshold data (like whether or not the tilt is past a certain angle), it's relatively easy to build a tilt sensor with a ball bearing and a few steel rods. Bend the rods to form a shallow U shape, cover the bottom 10 degrees (or whatever your threshold is) with an insulating material, seperate them by an amount smaller than the diameter of your ball bearing, and put the ball bearing in between. If you need it a little more rugged, put the whole contraption in an appropriately sized piece of PVC pipe.

    A digital compass is another good idea. These are electromagnetic sensors, available in two or three axes. You can build your own, too.

    One method is to wrap an electromagnet around an iron core; there will be slight changes in the current when orientation is tilted with respect to the earth's magnetic field. It takes some pretty smart sensor / amplifier design to detect and amplify these changes, but its not unsolveable.

    The second method is basically the same, but uses HALL effect sensors for the same effect. Get the book mentioned above.

    A 3-axis digital compass can sense orientation not only N/S, but tilt with respect to the earth's magnetic field... the magnetic field is in a sphere parallel to the earth's ideal surface, or what the surface would be if the earth's surface were totally flat. A rotation of the vector magnetic readings indicates that the compass has turned in a plane corresponding to the tangent of the earth's magnetic field at the point where the compass is located. A change in magnitude of the size of the vector magnetic readings indicates a tilt with respect to that same plane.
  • makes an accelerometer: te rs/index.html

    that this guy stuck in a Palm: ht ml

    to get a kind of "Marble Madness" game going:
  • Hey, nanogator - does the gator part mean you're in Gainesville?

    Two suggestions: The 3-axis accelerometer from AD, or something similar; or, I saw somewhere recently a magnetometer which would tell the angle of a nearby magnet - if your device had a magnet under it or near it...
    • "Hey, nanogator - does the gator part mean you're in Gainesville?"

      Hehhe nar, it's kinda hard to explain my name. It's really a play on 'Netscape Navigator.. NanoGator..... etc..". :)

      THanks for the tips! *Looking into it*

"It takes all sorts of in & out-door schooling to get adapted to my kind of fooling" - R. Frost