Shop OBEX P1 Docs P2 Docs Learn Events
accelerometer data logging — Parallax Forums

accelerometer data logging

Fair-playFair-play Posts: 5
edited 2005-02-21 19:02 in BASIC Stamp

Hi

Im a bit of a newbie trying (badly) to program a stamp bs2sx to read values from·two·ADXL210E accelerometers to measure g force in the X Y and Z axis and then log the results in memory. Im·after any advice or·program scripts on how to do this, also on what may be the best way to display the results graphicaly after. Cheers for any help

Tim

Comments

  • edited 2005-01-27 21:12
    Attached is a code example that does datalogging with the MX2125.· The code will need to be adjusted for 4% duty cycle/g instead of 12.5%.
    To record data, press and release reset.· The program waits for five seconds, beeps, then records 10 samples per second for ten seconds, then it beeps twice and sleeps.·
    If you are connected to a serial cable, you can either re-run the program or just press/release reset again.· You will then have five seconds to enter “y” into the Debug Terminal’s transmit windowpane.· It will then spit out the data.
    The MX2125 I was working with delivered a 100 Hz (T2 = 10 ms) signal.· Here are the values for the ADXL circuit.
    RSET·= 1.25 M
    Cx and Cy = 0.05 u


    Post Edited (Andy Lindsay (Parallax)) : 1/27/2005 9:24:39 PM GMT
  • dandreaedandreae Posts: 1,375
    edited 2005-01-31 17:19
    Hello,

    Remember to change the baud rate to 16624 instead of 16468 in the SERIAL command.

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Tech Support
    dandreae@parallax.com
    www.parallax.com

    ·
  • Fair-playFair-play Posts: 5
    edited 2005-01-31 17:39
    Hi

    Cheers for the help shall go and try it out now!!!
  • Fair-playFair-play Posts: 5
    edited 2005-02-21 18:07
    Hi


    I have been trying to get the program running that was posted, for the accelerometers and data logging, however i can not seem to get anywere it simply says "Display logged data Y/N" and will not run any further. Any advice on what i may be doing wrong?
    I am now using the mesmic accelerometers aswell not that this should effect this part of the program i think.

    Cheers Tim
  • steve_bsteve_b Posts: 1,563
    edited 2005-02-21 19:02
    Are you using the memsic?

    You're posting is a little vague for it to be easily troubleshooted.·
    Are your connections right?!
    Is the stamp and the sensor sharing the same common?
    Are you getting garbage or nothing at all?!
    What pin are you connecting your sensor to?!


    I've got code for the ADXL210.
    There's a lot in this code that you may not need....but hopefully it'll help!

    I bought the Eval board so I wouldn't have to deal with a SOIC (or whatever it is).

    my project is basically set up so that I read the pulses from the X and Y pins of the sensor do some math filtering (averaging/peak limiting) and then fire it out to a MAX232 chip that sends it down for a PC to log and display.
    All you want to do, to start, is read the pulses and output them to your screen (debug).
    so you want something along the lines of:
    pulsin (pin#), 1 (this is for the transition you're looking for: high/low), (variable to store it in)
    so: pulsin 15, 1, Xdata
    then just do a debug ? Xdata· and you should hopefully see something!

    IF not...then it gets fun! [noparse];)[/noparse]





    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve
    http://members.rogers.com/steve.brady
    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
Sign In or Register to comment.