Maker Pro
Maker Pro

linear motion sensor- help

mor1989

Jul 12, 2014
1
Joined
Jul 12, 2014
Messages
1
hey,
I want to write a program that do something whenever it detects a change in movement... (such as moving up and than moving down).
I'm sure I will need to use a motion sensor for it..
could you help me about the steps I sould do??
how will the software programming part integrate with the sensor??

Thanks!!
 

Ehsan

Jun 12, 2014
100
Joined
Jun 12, 2014
Messages
100
What kind of movement do you intent to detect ? Cold lifeless objects ? or human body parts ? or ... ?
 

davenn

Moderator
Sep 5, 2009
14,039
Joined
Sep 5, 2009
Messages
14,039
a tri-axis accelerometer would be the ideal sensor

google it :)
and then ask any other questions

I know a few humans that are cold and lifeless :)
Adam

hahaha Adam ... the wife ?? ;)

(I'm so bad )

cheers
Dave
 

shumifan50

Jan 16, 2014
579
Joined
Jan 16, 2014
Messages
579
What motion do you want to detect:
1. The movement of the object on which the sensor is mounted
OR
2. The movement of object(s) in the field of vision of the computer sensors

In the case of (20 distance, lighting conditions?

They require VERY different solutions.
And what level of experience do you have?
Go and have a look at some robotic code examples of both types motion detection = use google to find examples.
 

davenn

Moderator
Sep 5, 2009
14,039
Joined
Sep 5, 2009
Messages
14,039
What motion do you want to detect:
1. The movement of the object on which the sensor is mounted
OR
2. The movement of object(s) in the field of vision of the computer sensors

In the case of (20 distance, lighting conditions?

They require VERY different solutions.
And what level of experience do you have?
Go and have a look at some robotic code examples of both types motion detection = use google to find examples.

Yeah that's the important bit ;)
I neglected that though in my response


soooo mor1989, what are you trying to do ?

Dave
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Here's hopin' a response comes back soon.
It would be difficult for an accelerometer to detect linear motion if the object changes speed at a slow rate. Remember it only detects change in motion. (Imagine replacing the speedometer and trip counter in your car with a bar for your current brake and gas pedal position) The sensor will usually show -9.8 m/s^2 in the vertical axis (depending on it's orientation), this reading will not change while the device is in motion, but if it stops or starts in any given direction, you will see a momentary change in the reading. This method would require frequent polling of the sensor and comparing any readings to a baseline. You will then need to determine what your cut off should be (ie, how fast should the object change it's motion) so that you can avoid false readings. This sensor however can be invaluable to tamper proofing an item, as almost any change shows that the object has moved and is no longer on the floor/ground.
Using alternative methods, like optical sensors, proximity sensors, etc. will allow you to measure the current distance from a reference. You can poll your reference as slow or as fast as you want, if the value changes your object has moved. This will also be much more reliable if you need to know the distance travelled, or require an event to trigger based on a distance travelled.
 
Top