Your offset looks like the sampling offset due to latency time of TX and RX.
So it can't be a DC offset.
Announcement
Collapse
No announcement yet.
Let's made a PC-base metal detector with usb interface !!!
Collapse
X
-
Hi TheWizard,Originally posted by TheWizard View PostThe first DSP Lock-In-Amp test - sine 12.5 kHz
Offset and Magnitude in samples
Angle in Deg
Rx-Tx direct connected, calculation - 300 frames per sec

nice, really very nice. So you can sweep the coil at 1 m/s and you will have every 3.3 mm a measurement. This is very good!
You have probably small window/frame size. How much? And how much is your sampling rate and bit depth (12)?
Your offset, is this the DC offset of the A/D converter?
Now I am looking forward to your progress.
Regards,
Aziz
Leave a comment:
-
The first DSP Lock-In-Amp test - sine 12.5 kHz
Offset and Magnitude in samples
Angle in Deg
Rx-Tx direct connected, calculation - 300 frames per sec
Attached Files
Leave a comment:
-
Now I need more whiskey....Originally posted by Aziz View PostHi,
what about a speaking MD? I could imagine that a nice girl voice could tell me when I detect some gold:
"Stop Darling! You have found, whatever you seeked for!"

Even this is possible! A laptop with second sound-card (cheap, 16 Bit, USB or so) must be used also for the beeping. Even this runs without any problems. I have tested this many years ago, running the application with two sound cards: one for data processing and another for signal audio output.
Aziz
Leave a comment:
-
This is like Treasure Talk from Garrett:Originally posted by Aziz View PostHi,
what about a speaking MD? I could imagine that a nice girl voice could tell me when I detect some gold:
"Stop Darling! You have found, whatever you seeked for!"

Even this is possible! A laptop with second sound-card (cheap, 16 Bit, USB or so) must be used also for the beeping. Even this runs without any problems. I have tested this many years ago, running the application with two sound cards: one for data processing and another for signal audio output.
Aziz
Garrett's exclusive voice function found only on the GTI 2500 that audibly announces various settings, adjustments and target information continuously or on demand.
I have yet to find someone who actually likes this feature.
Leave a comment:
-
Hi,
what about a speaking MD? I could imagine that a nice girl voice could tell me when I detect some gold:
"Stop Darling! You have found, whatever you seeked for!"

Even this is possible! A laptop with second sound-card (cheap, 16 Bit, USB or so) must be used also for the beeping. Even this runs without any problems. I have tested this many years ago, running the application with two sound cards: one for data processing and another for signal audio output.
Aziz
Leave a comment:
-
Hi TheWizard,
it is a nice DLL, but costs a bit (shareware). Anyway, there are many sample source codes for this DLL library.
I made lots of noise experiments with lock-in amp. The result is incredible. Even when the signal is totally buried in more noise, the lock-in amp is quite stable. So I am going to develop my own digital lock-in laptop MD.
With this technique, I will be able to measure very low signals with ultra-balanced search coils. This would bring more depth sensitivity.

Aziz
Leave a comment:
-
BASS.DLL(http://www.un4seen.com/) is "free" audio library for MP3, MP2, MP1, OGG....
I use before for Stream Media Web Radio Player (XP widget)
Leave a comment:
-
Hi,
I found some interesting measurements using sound-cards. There are some source codes and executables, I think in Delphi + DLL or so. If someone wants to try some coding or testing sound-cards, just check the site out.
Using the DLL any programming language can be used!
Web ist only in german.
Aziz
Leave a comment:
-
Now I'm playing around with the lock-in amp for a while. Did some additional noise on output channel (inductively -> input channel) and will also do some on input channel directly soon.
First tests showing a quite stable behaviour even if I take very much noise in the data (noise > signal).
Then, I will test a ultra-balanced search coil with µV range of signal rest.
Aziz
Leave a comment:
-
The problem arises, when your index-offset for +90° has some fractional part: e.g. 5.4 (you will have then 5 for index offset).Originally posted by TheWizard View PostYou have RX frame buffer - If you know who sample index is TX cross-zero
n is TX cross
it is I part RX[n]
Q part is RX[n+"90deg"]
Just use and plot this two samples and look dynamic range of phase...
in my first picture phase error is ~ 1 deg for 1/4 input signal
To avoid this, one could use multiple of 4 samples per wave. This is just a limitation to frequency of interest selection. What happens, when your coil is not exactly matched to a particular frequency? You will lose some sensitivity. Anyway, a VLF/TR/Off-resonance digital-MD up to 24 kHz on 96 kHz SR should be possible. Even with 44/48 kHz and 16 Bit. It would be better, to have a 192 kHz SR, but my sound-card has only 96 kHz input. Output is of course 192 kHz but I am using 96 kHz for both.
Better accuracy is given on lower frequencies: e.g. 5-15 kHz.
So, who want's to develop a laptop MD now?
Need more proof?
Anyway, then implement this on a DSP/µC. It's almost same.
Leave a comment:
-
You have RX frame buffer - If you know who sample index is TX cross-zero
n is TX cross
it is I part RX[n]
Q part is RX[n+"90deg"]
Just use and plot this two samples and look dynamic range of phase...
in my first picture phase error is ~ 1 deg for 1/4 input signal
Leave a comment:
-
Less work at the moment, because I had allready implemented the FFT-Filter. For quick implementation it is ok. But for speed enhancements, LP-FIR-Filter/Averaging + decimation should be used. But on the Laptop/PC there is much more computation power. I can acquire 94 Frames/s of signals + signal generation for output + Ref-I +Ref-Q, can process 94 Frames/s doing much more computation on approx. 40(!) channels, and displaying only up to 35 Frames per second (lame Win32-GDI). My frame size is 1024 samples at 96 kHz SR (24 Bit). There must be a good thread-implementation of the signal acquisition/transmission, signal processing and displaying the results. So I have up to 8 threads running for the application at the same time. Of course, of different priority levels. If there is not enough power, I discard some frames for displaying (less important). But all frames are processed just in real-time. This is, why I like the Laptop MD. There is no other DSP/µC that can do this! Of course, I am using multi-core CPU's automatically!Originally posted by TheWizard View PostOK,
but (if sync is good) you need only 2 samples at 0 and 90 deg (RxBuff[i], RxBuff[Q]) (I&Q) for ArcTan and Sqtr - why is FFT...
By the way:
Phase offset for Ref-Q of +90 degree should not realised as an index-offset to Ref-I! Otherwise, you will lose dynamic range of phase!
Ref-I(t) and Ref-Q(t) should be generated independently by a generator, having Ref-Q-phase +90 degree of Ref-I-phase.
Also, you should use pure sine-reference signal (no TTL wave forms). Then you will be able to get more accuracy.
Aziz
Leave a comment:
-
OK,
but (if sync is good) you need only 2 samples at 0 and 90 deg (RxBuff[I], RxBuff[Q]) (I&Q) for ArcTan and Sqtr - why is FFT...
Leave a comment:
-
Here is the main c-code of Lock-in amp for all others:
//------------Lock-in-------------
if (pMetDet->Config.bLockin)
{
fsample fi,fq, *pInp,
*pRefI,*pRefQ,
*pI, *pQ,
*pIOut, *pQOut,
*pMag, *pPh, *pF, *pIm, *pRe;
double f;
int i;
// Wave-Frame channels für Lock-in bereitstellen
//
pInp = Wave_GetChannelPtr(pMetDet->pWaveSig, METDETCH_INPUTL);
pRefI = Wave_GetChannelPtr(pMetDet->pWaveSig, METDETCH_LOCKIN_REF_I);
pRefQ = Wave_GetChannelPtr(pMetDet->pWaveSig, METDETCH_LOCKIN_REF_Q);
pI = Wave_GetChannelPtr(pMetDet->pWaveSig, METDETCH_LOCKIN_I);
pQ = Wave_GetChannelPtr(pMetDet->pWaveSig, METDETCH_LOCKIN_Q);
pIOut = Wave_GetChannelPtr(pMetDet->pWaveSig, METDETCH_LOCKIN_IOUT);
pQOut = Wave_GetChannelPtr(pMetDet->pWaveSig, METDETCH_LOCKIN_QOUT);
pMag = Wave_GetChannelPtr(pMetDet->pWaveSig, METDETCH_LOCKIN_MAGNITUDE);
pPh = Wave_GetChannelPtr(pMetDet->pWaveSig, METDETCH_LOCKIN_PHASE);
// Buffer for FFT-Filter
pRe = Wave_GetChannelPtr(pTmpWave, 0);
pIm = Wave_GetChannelPtr(pTmpWave, 1);
// LP-Filter spectrum
pF = Wave_GetChannelPtr(pTmpWave, 2);
// I und Q Mixer
//
for (i=0; i < nFrameSize; i++)
{
f = pInp[i]; // signal(t)
pI[i] = (fsample)(f*pRefI[i]); // X
pQ[i] = (fsample)(f*pRefQ[i]); // Y
} // for i
// LP-filter I und Q
//
memcpy(pIOut, pI, nFrameSize*sizeof(fsample));
memcpy(pQOut, pQ, nFrameSize*sizeof(fsample));
FFTFilter(nFrameSize, pIOut, pF, pRe, pIm, FALSE, &Result.fLockinDCI);
FFTFilter(nFrameSize, pQOut, pF, pRe, pIm, FALSE, &Result.fLockinDCQ);
// R,P of DC Level of I und Q
//
Result.fLockinDCMagnitude = sqrt(Result.fLockinDCI*Result.fLockinDCI + Result.fLockinDCQ*Result.fLockinDCQ);
Result.fLockinDCPhase = atan2(Result.fLockinDCQ, Result.fLockinDCI)*NACH_GRAD;
// Amplitude and Phase
//
Result.fLockinAvgMagnitude = Result.fLockinAvgPhase = 0.0;
for (i=0; i < nFrameSize; i++)
{
fi = (fsample)(pIOut[i]); // Y: sin
fq = (fsample)(pQOut[i]); // X: sin+90 = cos
// Magnitude = sqrt(I*I + Q*Q)
f = sqrt(fi*fi + fq*fq);
pMag[i] = (fsample)f;
Result.fLockinAvgMagnitude += f;
// Phase = atan(Q/I), atan2(Q,I)
f = atan2(fq, fi)*NACH_GRAD;
pPh[i] = (fsample)f;
Result.fLockinAvgPhase += f;
} // for i
f = 1.0 / nFrameSize;
Result.fLockinAvgMagnitude *= f;
Result.fLockinAvgPhase *= f;
Result.dwFlags |= METDETRESULT_LOCKIN;
}
//------------Lock-in-------------
Damn! Format is gone to the hell!
Leave a comment:
Leave a comment: