Connect with us

Zig zag motion detection using arduino

Discussion in 'Microcontrollers, Programming and IoT' started by bobdxcool, Mar 8, 2013.

  1. bobdxcool

    bobdxcool

    80
    0
    Mar 9, 2012
    I wanted to detect ZIG ZAG motion.
    Is it possible using accelerometer?

    Or is it recommended to use any other sensor??

    I want to use arduino uc.
     
  2. sirch

    sirch

    109
    1
    Dec 6, 2012
    Motion of what? Assuming it is within reasonable parameters, have you considered using a smart phone? They have accelerometers, a dsiplay, data storeage, rechargable batteries, a GPS (there is even a phone in there somewhere :)
     
  3. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,192
    2,694
    Jan 21, 2010
    There are many cheap 3 axis accelerometers available on eBay. Search for "Arduino accelerometer" for a quick list of some that are available.
     
  4. bobdxcool

    bobdxcool

    80
    0
    Mar 9, 2012

    Actually, I wanted to attach to detect zig zag motion in a car. I wanted to attach an accelerometer to the dash board of the car, and wanted to detect zig zag motion of the car based on the angle changes.

    I thought of using this one, which has 3 axis pins.

    http://robokits.co.in/shop/index.php?main_page=product_info&products_id=39

    or
    https://www.sparkfun.com/products/9269

    ADXL 335


    will this be possible??
     
  5. sirch

    sirch

    109
    1
    Dec 6, 2012
    I suppose it depends on what you want to know, gyros measure angular rotation, there are 3 axis gyro modules available. Inertial guidence systems use both gyros and accelerometers to get a fuller picture of how a vehicle is moving.

    An accelerometer will not be able to distinguish between forces due to rotation and other forces e.g. the car rocking from side-to-side whilst going over bumps.
     
  6. bobdxcool

    bobdxcool

    80
    0
    Mar 9, 2012
    so, which sensor do u suggest?

    gyroscope?

    Could you give me the link of any page related to gyroscope sales??
     
  7. CocaCola

    CocaCola

    3,635
    5
    Apr 7, 2012
    Properly written firmware that is filtering the results can though, especially if other sensors are implemented to compare against and use in the analysis, for example a compass or gps...
     
  8. sirch

    sirch

    109
    1
    Dec 6, 2012
    This is a link to a Sparkfun gyro, others are available

    Or this is a 9 axis board with gyros, accelerometers and compass

    Like I said it depends on what you want to measure, to do a reasonable job you need both,

    CocaCola - AFAIK you need both to get decent results, but that seems to be what you are saying anyway ("specially if other sensors are implemented"). Why would GPS/Compass be better than gyros? If you look at all the DIY Drone type boards they implement at least accelerometers and gyros, and add compass and GPS for navigation - which is different to aircraft attitude.
     
  9. CocaCola

    CocaCola

    3,635
    5
    Apr 7, 2012
    I never said 'better' I said if other sensors are implemented as in additional sensors providing additional feedback... A 'zig-zag' implies a change in direction vs simple rocking or bumping, combine a compass heading (or GPS) with accelerometer data and you can differentiate between road bumps and normal driving sway as you suggest would be an issue with simply an accelerometer very easily... A gyro would also add a layer of data to compare against, it really all boils down to how accurate you want the device to be and what is an acceptable error rate...
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-