Detecting Horizontal Movement


Closed Thread
Results 1 to 29 of 29
  1. #1
    Join Date
    Sep 2006
    Location
    Florida, USA
    Posts
    88

    Default Detecting Horizontal Movement

    Hello - I have an application where I wish to detect my movement over ground (asphalt, dirt, grass, snow, etc.). I need non-contact measurement from about 3 feet off the ground. I am not concerned with speed or distance, just the fact that I am moving. I thought of an accelerometer, but I need it to continuously output a signal the entire time I am moving and stop when I stop - similar to what an optical mouse does when you move it over a surface. I've thought of using ultrasonic sensors or even PIRs, but I don't think they will give me the results I want. Possibly a laser pointer aimed at the ground, but what would I use to sense the scattering when I move? I don't think a vibration sensor would work as there are too many things that could trigger it falsely. Anyone have any suggestions? Thanks!

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    You can do that with a simple accelerometer.

    By "integrating" the signal, it can tell you when it's moving.
    Integration is just a subtraction of a "Base" reading from the accel. reading, and adding the difference to an accumulator variable.

    Compensation for "Drift" is also needed, but can just be a new "Base" reading when the object is not moving.
    DT

  3. #3
    Join Date
    Sep 2006
    Location
    Florida, USA
    Posts
    88


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    Darrel - Thanks for your response, but don't accelerometers just detect changes in speed? I would think that once speed was constant, there would be no signal until the speed changed again (sped up or slowed down). Jeff

  4. #4
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    637


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    Quote Originally Posted by Atom058 View Post
    Darrel - Thanks for your response, but don't accelerometers just detect changes in speed? I would think that once speed was constant, there would be no signal until the speed changed again (sped up or slowed down). Jeff
    Yes, you are right. The acceleration of any object is defined as dv/dt, which is a change in velocity divided by a given amount of time. If the velocity doesn't change then the acceleration is zero. However, if you want to detect your own movement, running or walking, chances are that you won't be able to maintain a constant speed. There would be small fluctuations in your body speed that the accelerometer would be able to detect.

    Robert
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    May be a gps module can help if the speed is over its lower detecting limit.

    Ioannis

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    Add a compass and you have everything a "smartphone " has. They work very well for tracking movement.
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    But Dave, if you are moving to the direction the compass is showng, then I suspect no movement will be detected.

    I have not used a compass, so this may not be true.

    Ioannis

  8. #8
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    I have not used a compass chip but the coding I have done with Android shows the compass to be very sensitive. I can not move in a straight line without averaging. It would be interesting to see what a raw chip does.
    Dave
    Always wear safety glasses while programming.

  9. #9
    Join Date
    Sep 2006
    Location
    Florida, USA
    Posts
    88


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    Thanks Guys - Price is a factor (of course), so GPS will probably be out. Rsocor01, you have a point about the "jarring" effect of walking and the use of an accelerometer to detect that, but now we are getting back to vibration... Not sure how reliable that will be - might still be an option. My dream sensor is something that could be aimed at the ground and can determine when what it is looking at has changed - as what happens when an optical mouse moves. If I could hold an optical mouse 3 feet off the surface and still have it detect movement, that would be ideal, but we all know that won't work...

  10. #10
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    Hi,

    Bo need to put your head under the sand ...

    a location device will be necessary : moving at a constant speed doesn't produce any accelaration and compasses changes are too weak to be seen.

    so:

    1) a string fixed to a reference point ( the simplest ... )
    2) a surveyor dog
    3) a wheel on the ground
    4) the RSSI indicator of a Rx chip ( need a Tx somewhere in a reference point ...)
    5) a stupid GPS device ???

    you already have locating devices on the market ( for dogs, old persons, cars ....) so, try to see how they work ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  11. #11
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    As Darell already mentioned, the accelerometer is all you'll need. What you're looking to do is what accelerometers are made for....;o)
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  12. #12


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    There are a couple companies making autopilot devices for autonomous helicopters, which use a camera looking down to maintain position in much the same way a mouse does.

  13. #13
    Join Date
    Sep 2006
    Location
    Florida, USA
    Posts
    88


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    Bruce - So, if an accelerometer is attached to a moving object and the object is moving at a constant speed, I will get some feedback that the object is moving? Even over a smooth surface?

    JetPack - That sounds interesting (it is working much like an optical mouse), but I think it is getting out of my price range - otherise, I'd consider the GPS route, too...

    Thanks Guys!

  14. #14


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    When the accelerometer detects acceleration you can determine the speed by the amount of acceleration and the amount of time spent accelerating. Then, if there is no further acceleration or deceleration, you know that you are still moving at that speed. So you won't get feedback that you are in motion, the lack of feedback tells you that your speed hasn't changed.

  15. #15


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    an accelerometer has a base setting which is derived from "freefall, a no acceleration , no forces base point", so on earth, which is rotating, the reading is an offset from the base point and motion is an offset from that ofset ???

  16. #16
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    Quote Originally Posted by Atom058 View Post
    Darrel - Thanks for your response, but don't accelerometers just detect changes in speed? I would think that once speed was constant, there would be no signal until the speed changed again (sped up or slowed down). Jeff
    Quote Originally Posted by Atom058 View Post
    Bruce - So, if an accelerometer is attached to a moving object and the object is moving at a constant speed, I will get some feedback that the object is moving? Even over a smooth surface?
    That's what the "Integration" does. It converts Acceleration over time into speed.

    Sorry, it took me awhile to make something that would show how it works ... but here goes.

    "Integration" is the "I" in PID loop.
    By itself, it converts change in a value over time, to an approximated absolute value.
    In other words, acceleration over time can show speed.
    Speed over time can show distance.

    I made a simulation that shows a simple acceleration to speed integration.
    The PIC on the left simulates a single axis analog accelerometer, using HPWM to generate a DC voltage. Although they are ideal waveforms that you will never see from a real accelerometer, it was the easiest way to get exactly the same acceleration as deceleration profiles. Nature balances it out in real life, taking the exact amount of deceleration to stop an object that was accelerated.

    The yellow trace is the accelerometer, and its output only registers the Change in speed.
    The PIC on the right is running the very short "Integrater.pbp" program (attached).
    The output (blue trace) of the integration is sent to the HPWM to be able to see on the scope.
    The red trace is a digital output indicating "Forward Motion".

    You can see that the output (blue) is a constant speed when there's no change in acceleration.
    http://support.melabs.com/DT/Accel_Integrate.jpg



    The integrated Speed could then be integrated again to produce distance traveled.

    Disclaimers:
    The simulation is not scaled to any particular Accelerometer, acceleration range or maximum speed range.
    It is only intended to show how "Integration" works.

    In real life, motion in other axis would affect the output, so multiple axis should be monitored.
    Additional sensors (Gyros and Magnatometers) can be combined for greater accuracy and stability.

    Products like the UM6-LT can provide all the sensor data required for all 3 axis, plus combined orientation information.
    Attached Files Attached Files
    Last edited by Darrel Taylor; - 31st December 2011 at 07:36.
    DT

  17. #17
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    Darrel, either moving at a constant speed-constant direction or at complete stop, the result of the Integratio won't be the same?

    Ioannis

  18. #18
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    Hi,

    The only problem of that method is small errors ( < 1 LSB measurements for simple explanation ... ) are not taken into account and final result is then false.

    Try this into an elevator ( or an automated train ) and I promise you will stay a moment in it calling for help ... !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  19. #19
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    Quote Originally Posted by Acetronics View Post
    Hi,

    The only problem of that method is small errors ( < 1 LSB measurements for simple explanation ... ) are not taken into account and final result is then false.

    Try this into an elevator ( or an automated train ) and I promise you will stay a moment in it calling for help ... !!!

    Alain
    Apparently, you didn't read the whole post.
    DT

  20. #20
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    Hi, Darrel

    you sure ??? ...

    reminds me a thread about oversampling ... ( about altimeter ) that is a total view of mind for very small variations ( < 1LSB ) - like here !

    Have a Happy new year.

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  21. #21
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    Quote Originally Posted by Acetronics View Post
    you sure ??? ...
    Sure about what?
    That "Integration" is a very usefull function used throughout electronics and computing.

    Or that I could make a device that detects forward motion using accelerometers/gyros/and magnatometers.

    In either case, YES!!!!
    DT

  22. #22
    Join Date
    Sep 2006
    Location
    Florida, USA
    Posts
    88


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    Darrel - Thanks for that very nice example! I completely understand what you are trying to get across now. One last question... will this be sensitive enough to tell if you slooowwwwllllly coast to a stop?

    Thank you to all of you who replied to this post! I hope everyone has a safe and happy New Year! Jeff

  23. #23
    Join Date
    Sep 2006
    Location
    Florida, USA
    Posts
    88


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    Just did a quick look at Sparkfun for accelerometers and found that they have a bunch that look like they could easily be used with PICS. They have a nice comparison here:

    http://www.sparkfun.com/tutorials/167

    FYI - Jeff

  24. #24
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    That depends on how slowly you coast, the resolution of the sensor, maximum speed and other factors.

    You never really gave us an idea of what you are doing, other than moving over different surfaces, so I can't say.
    DT

  25. #25
    Join Date
    Sep 2006
    Location
    Florida, USA
    Posts
    88


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    Darrel - Unfortunately, you just about know as much as I do. The person that wants me to do this is being pretty secretive. Here is a little more... I am assuming it is a motorized vehicle and the position of the wheels will not always be the same, so they can't be used for indication. This will be in an outside environment, moving over any type of surface from very smooth to rough (grass, dirt, pavement, snow, etc.) at a pace that can range from 1/2 normal walking speed and up. Ideally, they are looking for something that they can just aim at the ground and determine that it is moving. They are not concerned about speed or direction, just movement. Height of sensor can be about 3 feet. Oh yeah, and cheap (duh) ... I am leaning towards a vibration sensor, but I don't know enough about the end system to be able to say that it would be 100% reliable - I have not tossed out the accelerometer, thanks to you... So there you have it... And again, thank you for your input. It is appreciated! Jeff

  26. #26
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    At first I thought this was a "person carry" project.
    I wish to detect my movement over ground
    Mounting to a vehicle has more possibilities.
    These a very nice units.
    http://www.dickey-john.com/product/radar-ii/
    Dave
    Always wear safety glasses while programming.

  27. #27
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    Wow, nice sensor! And heavy too, over 2kg !

    Darrel, i was thinking about the integration of accelerometer and humbly appologize for my doubts. The spikes in the oscilloscope snapshot clicked me.

    Ioannis
    Last edited by Ioannis; - 1st January 2012 at 14:32.

  28. #28
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    637


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    Quote Originally Posted by Ioannis View Post
    Darrel, i was thinking about the integration of accelerometer and humbly appologize for my doubts. The spikes in the oscilloscope snapshot clicked me.

    Ioannis
    Well, I had my doubts too, but not anymore after studying Darrel's program .

    There are a couple of things that I wanted to mention. First, for this program to work properly it is assumed that the initial speed of the integration is zero. In other words, it is assumed that when the program is started the speed that we want to measure is zero. Second, referring to Alain's comment

    Try this into an elevator ( or an automated train ) and I promise you will stay a moment in it calling for help ... !!!

    Alain
    You have a point there. So, it is necessary to obtain all the 3-axis acceleration components (X, Y, and Z) and calculate the resultant acceleration vector to obtain a valid result for the speed. There shouldn't be any problems with this program.

    Robert
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  29. #29
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default Re: Detecting Horizontal Movement

    Quote Originally Posted by rsocor01 View Post
    it is necessary to obtain all the 3-axis acceleration components (X, Y, and Z)
    Darrel noted that too.

    Ioannis

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts