Gravity sensor

Go To Last Post
23 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi fellow freaks,

I need for an application a simple sensor that tells the orientation of the device. Simply, if the user rotates the product 180 degrees the unit should detect it and turn the LCD graphics accordingly.

What is the simplest way of doing this? Are there any cheap gravity sensors that can digitally tell were the earth is?

Any input welcome!

Kind regards
Bjorn

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Realizing now that a normal acceleration sensor could be enough? Any tips on ICs to use?

/Bjorn

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If that is one device then use any acceleration sensor you like, possibly with +-2g range. And if it is >1000 pieces then use a light sensor.

No RSTDISBL, no fun!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You don't define what "cheap" is, that can change things. But, I'm a fan of the Analog Devices ADXl345, ADXL346 and the new ADXL362. They are all designed for just the sort of thing you're looking at doing. Plus, they have lots of other useful features built-in.

Martin Jay McKee

As with most things in engineering, the answer is an unabashed, "It depends."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In addition to digital accelerometers, if the device is truely only in one of two directions, and money is an issue, then you could also consider a caged ball sensor. This has a small metal ball inside a box, (cage), with electrodes to tell whether how the box is oriented. It needs manual debouncing, and is mechanical, but in large quantities it probably costs less than a MEMS digital accelerometer.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for all the quick replies.

Brutte: How would the light sensor logic work? Assume that light direction is up?

mckeemj: Well, the cheaper the better :-) Analogs devices look nice but costs much.

DocJC: Can you recommend any caged ball sensors?

Best bid so far is Freescale MMA7660FC. http://cache.freescale.com/files/sensors/doc/data_sheet/MMA7660FC.pdf

/Bjorn

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Farnell/Element14 have the freescale kl25z frdm board with xtrinisic sensors for about $25. You get two accelerometers, baro sensor and magnetometer to play with. And it works with mbed. Job done.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

John, thanks for the kind offer. But I'll pass as I would need 1k-2k to cover my needs.

/Bjorn

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A 2 axis sensor gives tilt +-45 deg in pitch and roll using arcsin(); A 3 axis sensor gives full 360 deg in pitch and roll using atan2(); Does your gizmo pitch and roll a complete circle?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Right. So I'm at least 976 short...

John

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Assume that light direction is up?

Assume that the light from "up" is stronger than from "down".
I think you could use a regular LEDs (biased, with reasonable leakage) to measure the u1-u2 (not tested) to meet such coarse
Quote:
if the user rotates the product 180 degrees

requirement.

No RSTDISBL, no fun!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bjorn,

I was looking for a source for a caged ball sensor and can't find one at the moment. I have, however, actually seen them. Perhaps they were a custom part for that particular device?

In any event, if you go to Mouser's site and search on caged ball switch there are a number of Mountain Switch devices.

These appear to all be single axis "rolling ball" switches, so two would be needed for X/Y quadrature encoding, three for adding the Z axis.

Note that they seem rather expensive, especially if several are needed. Hence making the MEMs accelerometer chip look better and better.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What about making a round, beefy metalized via in a PCB (hole with inner metalization)? Then both PCB sides openings can be covered with SMD parts (uC in QFN, resistor ladder etc) to make the ball stay inside. A stainless ball cannot be soldered during process and it does not corrode in typical environment conditions. Gold flash is also a standard PCB process. I am not sure about the influence of the PCB cleaning process and the dust during usage..
So the inner metalization sides could be divided into N equal parts/contacts (N=3 for example) and the grounded QFN bottom pad and resistor ladder contacts could be used as the remaining two contacts for top and bottom..
Then a dumb scanning procedure would easily find out which contacts were shorted..

No RSTDISBL, no fun!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Would a bullseye level with some segmented metalization on one surface and full metalization on the other do the trick? The air bubble dielectric constant would change the capacitance between the metalization as it moves. Refraction could also be measured as could inductive coupling if the bubble were a metal ball. Of course costs could quickly get out control.

https://www.google.com/search?num=50&newwindow=1&q=bullseye+level&oq=bullseye+level&gs_l=serp.1.2.0i7i30l2j0j0i7i30l3j0i7i10i30j0i7i30j0j0i7i30.12689.18951.0.22623.13.13.0.0.0.0.282.2099.0j11j2.13.0....0...1c.1.27.serp..1.12.1981.2cA8nVdnWNg

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:
Bjorn,

I was looking for a source for a caged ball sensor and can't find one at the moment. I have, however, actually seen them. Perhaps they were a custom part for that particular device?

In any event, if you go to Mouser's site and search on caged ball switch there are a number of Mountain Switch devices.

These appear to all be single axis "rolling ball" switches, so two would be needed for X/Y quadrature encoding, three for adding the Z axis.

Note that they seem rather expensive, especially if several are needed. Hence making the MEMs accelerometer chip look better and better.

JC


These devices are relatively common in toys produced in China. Thus they are readily available in China. I believe they cost less than a penny each in mass production quantities.

I do not know of any American distributors for them, however.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have used a tilt switch from www.signalquest.com for starting a musical toy. Arrange a few appropriately and it might work as a gravity sensor.

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

100s of millions of phones have 3 axis accelerometers in them. Have we rejected this best practice for some reason?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner wrote:
100s of millions of phones have 3 axis accelerometers in them. Have we rejected this best practice for some reason?

They're still expensive, even though they're used in large quantities.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I have used a tilt switch from www.signalquest.com for starting a musical toy.

I guess you are talking some mercury switches Ross? Love that mercury! If you want new carpet in the work place, mention it to the OH&S people that a mercury switch broke & the mercury went into the carpet! Quick results!

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No mercury. Rolling ball.

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Mouser has this 4-way tilt, optically encoded, sensor, the RPI-1031.

Not as cheap as one might wish for, however.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bjornhi wrote:
Hi fellow freaks,

I need for an application a simple sensor that tells the orientation of the device. Simply, if the user rotates the product 180 degrees the unit should detect it and turn the LCD graphics accordingly.

What is the simplest way of doing this? Are there any cheap gravity sensors that can digitally tell were the earth is?

Any input welcome!

Kind regards
Bjorn

https://www.sparkfun.com/product...