Sponsored in part by... Smith Micro StuffIt Deluxe 12: breakthrough compression of MP3 files, PDFs,
iWork and MS Office files! Reduce JPEG file sizes with no loss in
quality, burn to CD/DVD, back up archives to iDisk and more. Buy
today for only $59.99! <http://www.stuffit.com/mac/deluxe/tb/>

 [F] TidBITS  / TidBITS  / TidBITS Talk  /

Sudden Motion Sensor Hacks

[rlatter]rlatter (apparently) - 11:04am Jun 2, 2006 PST
via email

I want to be able to use my PowerBook as a very expensive carpenter's
level. Has someone already done that?

<http://db.tidbits.com/getbits.acgi?tbart=08544>


Mark as Read
  OutlineAll MessagesOlder MessagesOldest MessagesNewest MessagesNewer Messages

Dan Frakes - Jun 3, 2006 12:45 pm (#1 Total: 10)  

Reply to this message
Guest User  

Photo of Author
Posts: 1
Re: Sudden Motion Sensor Hacks

On 6/2/06 11:04 AM, "Bob Latter" wrote:
> I want to be able to use my PowerBook as a very expensive carpenter's
> level. Has someone already done that?
>
> <http://db.tidbits.com/getbits.acgi?tbart=08544>

Yep:

<http://pallit.lhi.is/palli/dashlevel/>



bitreader (apparently) - Jun 3, 2006 12:45 pm (#2 Total: 10)  

Reply to this message
via email  

Photo of Author
Posts: 120
Re: Sudden Motion Sensor Hacks

On 6/2/06 at 11:04 AM, rlatterearthlink.net (Bob Latter) wrote:

>I want to be able to use my PowerBook as a very expensive
>carpenter's level. Has someone already done that?

I don't believe that it is possible to do this. The sudden motion sensor is based on an accelerometer. That is it requires sudden motion to trip. There is nothing to restrict operation of a PowerBook in any arbitrary orientation or to sense the orientation of a PowerBook. You should be able to pick up the PowerBook while it is running and move it to any orientation without disturbing its operation as long as your motion is reasonably gentle and not sudden.

edward (apparently) - Jun 4, 2006 3:38 pm (#3 Total: 10)  

Reply to this message
via email  

Photo of Author
Posts: 275
Re: Sudden Motion Sensor Hacks

At 12:45 06/03/06 -0700, Bill Rowe wrote:
>I don't believe that it is possible to do this. The sudden motion sensor
>is based on an accelerometer. That is it requires sudden motion to trip.

The SMS (Sudden Motion Sensor) is in fact a very sensitive accelerometer
which works in three dimensions. I gather that it is an entirely electronic
device. (I found more information at
http://www.kernelthread.com/software/ams/ams.html.)

When the laptop is horizontal -- flat on a table -- the X and Y axes will
show acceleration of zero, while the Z axis (vertical) will show -9.8
m/s/s, the acceleration of gravity. (In free fall, all three axes will show
zero.) Tipping the laptop slightly will change the X and/or Y axis
accelerations quickly, though the Z axis acceleration will change much more
slowly at first. (Trigonometry: sine vs cosine.) This makes use as a level
quite feasible.

"Sudden motion" is a somewhat vague term, but in this case must refer to
rapid changes in acceleration -- that is, relative large values of m/s/s/s
(meters over seconds cubed). Clearly a change from the normal 0/0/-9.8 to
0/0/0 would mean the sensor has gone into free fall -- and it doesn't
matter how sudden the change was TO 0/0/0, the critical observation is that
free fall is typically followed by a very sudden change to a very high
acceleration of many times the acceleration of gravity for a very small
fraction of a second in one or all axes (depending on the angle of impact),
followed by multiple additional changes in acceleration in all axes
("bouncing"), followed by a swift return to the normal (0/0/-9.8) or
"upside down" (0/0/9.8) configuration.

But a hard disk can be endangered by considerably less severe acceleration,
so I would guess that the detection is more sophisticated than this. For
example, if you were to give a laptop a firm push across a table where it
could slide, it could reach a potentially damaging speed with a maximum
acceleration in the X or Y axis of only a fraction of the acceleration of
gravity. Or as another example, a laptop being pulled off a table would
probably go through 1) minor acceleration in the X and/or Y axes (as it's
pulled), 2) changes in all three axes (as it tips on the edge), 3) ...
well, it could go into free fall, though rotation would probably result in
some remaining acceleration detected. And the pull and tip aren't dangerous
in an of themselves. But it also might hit something before going into free
fall -- say, the arm of a chair.

o the software might have a list of patterns which are considered dangerous
-- either vectors (X/Y/Z combinations) or temporal patterns. I don't know.
But it's interesting to consider just what might have to be detected.
Perhaps it turns out to be simple, but answering the question does not
appear to me to be trivial.

Edward
Art works by Melynda Reid: http://paleo.org


bitreader (apparently) - Jun 4, 2006 3:38 pm (#4 Total: 10)  

Reply to this message
via email  

Photo of Author
Posts: 120
Re: Sudden Motion Sensor Hacks

On 6/3/06 at 12:45 PM, DanFrakes.org (Dan Frakes) wrote:

>On 6/2/06 11:04 AM, "Bob Latter" wrote:
>>I want to be able to use my PowerBook as a very expensive
>>carpenter's level. Has someone already done that?

>><http://db.tidbits.com/getbits.acgi?tbart=08544>

>Yep:

><http://pallit.lhi.is/palli/dashlevel/>

Interesting. I had understood the motion sensor to only sense changes in motion which implies no ability to sense orientation.

Here is another URL with some apps to read the sensor

<http://www.kernelthread.com/software/ams/ams.html>

Felix Lawrence - Jun 4, 2006 3:38 pm (#5 Total: 10)  

Reply to this message
 

Photo of Author
Posts: 2
Re: Sudden Motion Sensor Hacks

I don't believe that it is possible to do this. The sudden motion sensor is based on an accelerometer.


Good ol' Einstein said that you can't tell the difference between acceleration and a gravitational force. So any accelerometer that points directly downwards will register an acceleration of 9.8 metres per second^2.

By looking at the three accelerometers (pointing in 3 different directions) embedded in a PowerBook, you can work out which way is down.

Cheers, Felix

Geoff.Odhner (apparently) - Jun 5, 2006 6:46 am (#6 Total: 10)  

Reply to this message
via email  

Photo of Author
Posts: 64
Re: Sudden Motion Sensor Hacks

On Jun 4, 2006, at 6:38 PM, Edward Reid wrote:
> The SMS (Sudden Motion Sensor) is in fact a very sensitive
> accelerometer
> which works in three dimensions. I gather that it is an entirely
> electronic
> device. (I found more information at
> http://www.kernelthread.com/software/ams/ams.html.)

Such accelerometers are not entirely electronic, but are MEMS (Micro
Electro-Mechanical Systems) chips made with technologies similar to
those used to manufacture electronic Integrated Circuits (ICs). They
actually have minute flaps that move in response to sudden motions,
and they are designed to produce an electronic response when a flap
moves (or a change in an electronic measurement). There are a number
of flaps in various orientations, and the aggregate pattern of
electronic response change is used to calculate the amount and
direction of acceleration, which can then be indicated digitally to
the other electronics in the computer.

The flaps are made by etching away the material around and below
them. This is similar to the etching that is done with IC
manufacture, but in IC manufacture each etched pattern is generally
filled in with another material. For making a MEMS device such as
this, the edge around the flap is etched away (except the side that
remains attached), but never filled in. The most challenging part of
manufacturing a flap (or an array of flaps) is etching away the part
under the flaps, which had supported the material when it was laid
onto the chip. I don't remember how that is done, but I think it is
done by laying a base of easily dissolved material only on those
places where the flaps are to be "sculpted" by the etching process
(or more likely, first laying it everywhere, and then removing it
everywhere else).

So, while it's more than anyone asked to know, maybe someone will
have enjoyed this little treatise on MEMS technology.

Cheers,

Geoff



mgessex (apparently) - Jun 5, 2006 6:46 am (#7 Total: 10)  

Reply to this message
via email  

Photo of Author
Posts: 6
Re: Sudden Motion Sensor Hacks

--- Edward Reid <edwardpaleo.org> wrote:

> When the laptop is horizontal -- flat on a table -- the X and Y axes
> will
> show acceleration of zero, while the Z axis (vertical) will show -9.8
> m/s/s, the acceleration of gravity. (In free fall, all three axes
> will show
> zero.)

I know it has been decades since I studied physics, but this does not
make sense to me.
 
Is not the force of gravity on the MacBook (F=ma) countered by an equal
vector in the opposite direction by the object it is sitting on, so the
length of the resultant vector equals zero, so the acceleration is
zero. (Of course I realize we are all moving in space.)

In other words, since it is not moving, there can't be any acceleration.

LKM (apparently) - Jun 5, 2006 6:46 am (#8 Total: 10)  

Reply to this message
via email - Lucas K. Mathis  

Photo of Author
Posts: 80
Re: Sudden Motion Sensor Hacks

On 4.6.2006, space aliens observed Bob Latter saying:
>I want to be able to use my PowerBook as a very expensive
>carpenter's level. Has someone already done that?

Indeed, somebody has. It's a Tiger Widget called "Level Widget":
<http://www.apple.com/downloads/dashboard/calculate_convert/
carpenterslevel.html>

Although it doesn't work too well. It's pretty jittery.

Johann Beda - Jun 5, 2006 10:40 am (#9 Total: 10)  

Reply to this message
Guest User  

Photo of Author
Posts: 1
Re: Sudden Motion Sensor Hacks

[Folks, let's begin winding down the discussion of accelerometer technology and physics. I think the original query has been covered adequately. -Joe]

At 6:46 AM -0700 6/5/06, Michael Essex wrote:
>--- Edward Reid <edwardpaleo.org> wrote:
>>When the laptop is horizontal -- flat on a table -- the X and Y axes will
>>show acceleration of zero, while the Z axis (vertical) will show -9.8
>>m/s/s, the acceleration of gravity. (In free fall, all three axes will
>>show zero.)
>
>Is not the force of gravity on the MacBook (F=ma) countered by an equal
>vector in the opposite direction by the object it is sitting on, so the
>length of the resultant vector equals zero, so the acceleration is
>zero. (Of course I realize we are all moving in space.)
>
>In other words, since it is not moving, there can't be any acceleration.

        "Not moving" does not necessarily mean "no acceleration" - consider
a vertically thrown ball at the top of its flight - it stops for an
instant, but the acceleration is constant (9.8 m/s^2 downward) throughout
the flight.

        Under most definitions of accelerations, the vertically thrown ball
would be said to be accelerating, and the computer on the desk would be
said to be at rest, but when you want to design devices that are effective
three dimensional accelerometers, you probably want them to give a reading
of zero when there are NO external forces on the device, gravity or
tabletops. Since gravitational forces can reach inside the device and
effect it, while the supporting forces of the table only act on the
exterior of the device, as a designer you are stuck with the "limitation"
that your device is going to measure an acceleration (of 9.8 m/s^2 upward)
whenever it is sitting on a table and zero when it is in inter-galactic
space (or in freefall).

        Another way of thinking about it is that you really cannot
distinguish between being in a rocket sitting on the launch pad on Earth
versus being in a rocket out there in inter-galactic space accelerating at
a rate of 9.8 m/s^2. In both cases, there seems to be some magical force
attracting everything "downward" with a strength of 9.8 Newtons for each
kilogram of mass. Deep thoughts about the equivalence of the force of
gravity and accelerations in general lead Albert Einstein to formulate the
General Theory of Relativity. Further discussion of that is probably beyond
the scope of this message even if I did have the "chops" to do so (and I
really do not).

<http://en.wikipedia.org/wiki/General_theory_of_relativity>


--
* Johann Beda - contact link: <http://xri.net/=j-beda> *
* Johann's MostlyMac Computer Consulting - <http://mmcc.beda.ca/> *

Rick Holzgrafe (apparently) - Jun 5, 2006 10:40 am (#10 Total: 10)  

Reply to this message
via email  

Photo of Author
Posts: 20
Re: Sudden Motion Sensor Hacks

>Is not the force of gravity on the MacBook (F=ma) countered by an equal
>vector in the opposite direction by the object it is sitting on, so the
>length of the resultant vector equals zero, so the acceleration is
>zero. (Of course I realize we are all moving in space.)
>
>In other words, since it is not moving, there can't be any acceleration.

It's like a bathroom scale. It measures your weight, which is the
force your body exerts on the scale due to the tug (i.e.
acceleration) of gravity. In fact, the bathroom scale is measuring
the force that's needed to prevent your body from actually
accelerating. The accelerometer does much the same thing: it measures
the force needed to prevent some internal part (a previous poster
called it a "flap") from moving freely under acceleration.

--
Rick Holzgrafe
rickkagi.com
http://www.semicolon.com



  OutlineAll MessagesOlder MessagesOldest MessagesNewest MessagesNewer Messages


 [F] TidBITS  / TidBITS  / TidBITS Talk  / Sudden Motion Sensor Hacks




Add a message

To add a message to this discussion, you must be a registered user. Enter your email address below. If you have an account associated with the email address you enter, you will be prompted for your password. If not, you'll be able to create a new account with no fuss.

Enter your email address:

Submit