Memsic 2125 seismic recorder, can it be done?
kf4ixm
Posts: 529
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
'{$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
bs2
471B
Comments
DEBUG DEC4 pulsex , "," , DEC4 pulsey, CR
This will DEBUG a value, a comma, a value, a CR.
-Martin
SelmaWare Solutions
www.selmaware.com
RS a (cm
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