Shop OBEX P1 Docs P2 Docs Learn Events
Memsic 2125 seismic recorder, can it be done? — Parallax Forums

Memsic 2125 seismic recorder, can it be done?

kf4ixmkf4ixm Posts: 529
edited 2010-02-13 17:34 in BASIC Stamp
Hi all, i have an idea for a project to use a memsic 2125 (later to move to a H48C) accelerometer to detect both seismic P and S waves and convert thoses movements into actual magnatude readings. i have done alot of reading online about seismic readings, http://en.wikipedia.org/wiki/Seismic_wave·and have built and programmed a down and dirty sort of Richter scale using a 2125 and 2 servos to replicate the pen movement as seen on drum type seismic recorders.

'{$STAMP BS2}
'{$PBASIC 2.5}
accelx VAR Word 'accelerometer x value
accely VAR Word 'accelerometer y value
pulsex VAR Word 'pulse to control x
pulsey VAR Word 'pulse to control y
DO
PULSIN 6, 1, accelX
PULSIN 7, 1, accelY
PAUSE 1
pulsex = accelx * 3 / 4 - 1130
pulsey = accely * 3 / 4 - 1130
DEBUG HOME, DEC4· pulsex ,· DEC4· pulsey
PULSOUT 12, pulsex 'control x pen
PAUSE 1
PULSOUT 13, pulsey 'control y pen
PAUSE 1

RETURN

LOOP

This seems to work very well visually, but my question is, how can i· scale/calibrate the readings i recieve to an actual magnatude factor, say to output numbers to be displayed in stamp plot to correctly represent a (somewhat) accurate magnatude factor or richter scale?

Post Edited (kf4ixm) : 12/21/2009 8:35:57 PM GMT

Comments

  • Martin HebelMartin Hebel Posts: 1,239
    edited 2009-12-26 16:30
    Sorry for the delay in a response, but as to plotting in StampPlot Pro (for multiple channels), your debug statement needs to be similar to the following:
    DEBUG DEC4 pulsex , "," , DEC4 pulsey, CR

    This will DEBUG a value, a comma, a value, a CR.

    -Martin
    SelmaWare Solutions
    www.selmaware.com
  • kf4ixmkf4ixm Posts: 529
    edited 2009-12-26 16:52
    thanks for that pointer, i did try to use spp some with it but only could read one value, i got into something else at that time and didn't mess with it much after that. my next 'to-do' item will be to change the math up to output an actual g-force value to spp. after long and fruitless google searches, i think this will be the best route to go for a 'real-world' output.
  • C-BobC-Bob Posts: 19
    edited 2009-12-27 23:00
    Trouble is in meassured units - you mess acceleration, but Richter scale is based on decadic logarithm of amplitude, first you must calculate amplitude... On web i find some useful approximate values:
    RS a (cm
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2009-12-28 19:56
    StampPlot can also be used to perform math operations including logs.

    For example:

    DEBUG "[noparse][[/noparse]", val1, " LOG 10 * 5]", CR

    would plot a value of a the base 10 log of val1 times 5.

    If you are able to come up with an equation to convert the range you like, I can help with the DEBUG statement.

    I don't look at forums often, so please private message me if you post.

    -Martin
  • kf4ixmkf4ixm Posts: 529
    edited 2010-02-13 17:34
    thank you Martin! i really appreciate your help. unfortunaly i suck at math, lol. i will try to come up with some sort of range equation soon. i have a very hard time trying to visualize the way logarithms work with what im trying to do, not that i'm saying it doesn't, i just suck at math, and im trying to wrap my head around it so that i understand it. i was thinking if i could come up with a formula that would give me a value for amplitude for difference of one g to two g's. maybe im thinking about this all wrong.
Sign In or Register to comment.