Closed tommy15979 closed 4 years ago
Glad you made one! To your question:
8/22 edit: The hardware gain is removed as soon as the value is read and converted to 32 bits. The hardware gain is only used to have maximum precision with a 14 bit board before converting to 32 bits.
To calibrate to m/s: the product of the software gain by the geophone manufacturer sensitivity gives you the scale factor between the value written out by the program in the text file and the velocity measured by the geophone. Make this product equal to one by changing the software gain, and you are calibrated.
Here is how to QC this. Replace the geophone by a known calibrated constant voltage of a few millivolts (or the signal generator of an oscilloscope), and make sure what you record in the text file has exactly the value of the input voltage delivered by your calibrated source. If it does, introduce the geophone sensitivity in the scale factor and put the geophone back. If it does not match, adjust the gain.
I will leave this ticket open until I have rigorously verified the gain application in the C program and on the board -or if you confirm the problem is solved on your side.
Ok. For example, my Geophone specs are (LGT-20D10): http://www.longetequ.com/geophone/5.htm So, making the product = 100 [cm/s] , I can modify parameters file using: Ampgain=64 Numgain=1,5625 In this case 64x1,5625 = 100 [cm/s]
then I can try to calibrate it with oscilloscope!
8/22 edit: the hardware gain is removed as soon as the value is read from the board, so the hardware gain will not affect the calculation, and should not be taken into account.
I realize what I need is allow the user to enter the geophone sensitivity (straight from sensor manufacturer specs) in the param file, and optionally the pre-amplifier gain (for those who want to fine tune dynamic and over-scaling). Then the program should automatically calculate the electronic gain so the result is always calibrated in m/s.
I will do that and test it with the various geophones I have, but that make take a little time.
Unfortunately i am able only to develop windows software (vb/c#). I think that a userform would be useful. For example, to start/stop logging and to set param file
Hi, have you tried to modify config file? If you want i can do some test
I took the time to go back to the C file today. -I finished implementing the gains and sample rates for all values permitted by the board (I had only implemented previously the values useful for the seismograph).
The new C file is available here: https://github.com/erellaz/RaspberryPi-seismograph/blob/master/Software/RaspberryCode/obj/main.c
The line that really matters to understand the gain is line 220 (then 236 and 252 for the other channels). The amplifier gain, passed to the board at board initialization is removed immediately after the value has been read from the board. The role of this gain is to scale the value read so it makes an optimal use of the 14 bits of sampling of the board. As soon as the value to be sampled has been read and converted to 32 bits, the gain is removed (/ (float)_pga in the code). In other word, the value of the amplifier gain only affects the precision of the sampling, it does not scale the value up or down.
What does affect the value of the output is only the conversion factor (*_conversionFactor), called NumGain in the input textfile.
So to be calibrated:
This would work with both versions (old and new). The new version has more AmpGain values implemented, as well as more sample rates.
BTW, I also added a GUI: https://github.com/erellaz/seisberry/blob/master/SeismographGUI.py
Here is a step by step tutorial to do the calibration and test the instrument with an oscilloscope. This was fully tested on 8/30/2020, and it works. https://erellaz.com/blog/seisberry/calibrating-a-seisberry/
Hi, I just completed your awesome project. Now i can register all data on TXT, but i don't understand if the file contains the Voltage of geophone or, in some way, you convert this voltage to mm/s or m/s. In this case, i don't know how to modify main.c to consider geophone sensitivity (V/cm/s).