As I mentioned, it is better to start with the time-domain signal display. A simple digital oscilloscope must be implemented first, to see what you are transmitting and what you get. Then the synchronisation can be applied, to see whether the synch is running correct (you can see this then on the display).
Next step is making a FFT power spectrum and showing the decibels:
If re[i] is the real part of the complex FFT transform and im[i] the imaginary part of the complex FFT transform, then:
/* c-code */
// Magnitude
power[i] = sqrt(re[i]*re[i] + im[i]*im[i]);
// Phase
phase[i] = atan2(im[i], re[i]);
// Decibels
decibels[i] = 20.0*log10(power[i]);
As the FFT power spectrum is power related, you have to multiply with 20. Voltages and currents are multiplied with 10.0 for decibels.
i is going from 0 to number of samples per frame -1. Due to symmetry, even to number of samples per frame / 2 - 1.
re[0], im[0] contains the DC current level and can be ignored.
Please, check your code or method TheWizard! You must be making something different.
Aziz
Announcement
Collapse
No announcement yet.
Let's made a PC-base metal detector with usb interface !!!
Collapse
X
-
You didn't answer to my question, if you are sure that the SC is not good for MD because the sampling interval is not good enough. Then all your conclusions regarding time or phase based on those measurements are wrong. Synchronization is a time question, and please specify, if you are "reading" the TX then does it mean you are not generating it in the SC? How can you be then sure that your "reading" are OK if you are not satisfied with the sampling rate of your SC? Your TX for instance might be aliased and then you might be "reading" something else.Originally posted by TheWizard View PostVery easy...
I read TX and RX like stereo
n = FindZeroCross(TX_Buffer)
n is array index 0 deg. in TX signal
Get from RX_Buffer RX[n] and RX[n+"90 deg"]
Point is that you are certain about some measurements with your sound card but uncertain about others, although all of them are essentially the same thing.
Sorry, but as I said before you need a better understanding of what you are doing before starting to code. Coding is cheap, understanding the hardware executing your code is another matter.
Leave a comment:
-
Hi TheWizard,
I am not agree with you. Yes, sound card can be used as a front-end for MD's. I am doing this and of course much more.
You must make something wrong.
Leave a comment:
-
Very easy...
I read TX and RX like stereo
n = FindZeroCross(TX_Buffer)
n is array index 0 deg. in TX signal
Get from RX_Buffer RX[n] and RX[n+"90 deg"]
Leave a comment:
-

I have not problem with Synchronization
delay between TX and RX is 0
Leave a comment:
-
The wikipedia is not a serious source of information, some authors are an authority in their field, some others have no clue what they are talking about.Originally posted by TheWizard View Post...What do you mean by sample time?
The time for (adc) capacitor charge...
44100, 48000... is not sample time, it is Sample Rate
http://en.wikipedia.org/wiki/Sampling_rate
Sampling Interval is the correct name and that is the inverse of the Sampling rate.
Try this article, it seems better than the one you found.
But be aware that all this info is very basic and might even contain errors. Keep in mind that the capacitor charge time is not a function, strictly speaking it is if you are building your own ADC, of the sampling rate but rather a function of the signal you are sampling. Do not mix the two things.
Search in Google or any other search engine of your preference for the words "Signal Conditioning" or even better try this book:...what is low RX?
Input signal...
"Analog-to-Digital and Digital-to-Analog Conversion techniques", written by David F. Hoeschele.
It is not the most authoritative source but it can give you basic understanding on what you are attempting to do. And further more, it is written in a very comprehensive language.
So, what should I look into?...What am I missing?
screenshot show The Amplitude of input sine wave signal with freq. 1kHz and 8kHz
Sample = Offset + AMPLITUDE * Sin (x * 2Pi)
"Phase in Deg" is phase difference between Transmited Sine Wave (TX) and Received signal (RX)
Error in synchronization is not an error in your sampling techniques but a latency happening due to the fact that the computer does not do things exactly at the time we want it to. But taht has nothing to do with sampling rate, or interval for that matter. Try to have it running all the time and synch in software....what kind of error?
Error form Amplitude and Phase calculations.
EXE calculations is double float
synchronization and the latency between TX and RX is 0
Don't worry about your English, I'm not an English speaker either. As long as we can understand each and another in these forums, then we are safe.Sorry but my Englis is bad and I can not explain exactly and in details....
I think I got the picture now of what's bothering you, but leave alone the sampling interval, that's not your problem. Synchronization is a major problem. Let me suggest you something to try, I have seen it done before, use one channel of the stereo system to send out synch pulses and the other to sample the signal. It gets a little tricky when programming to the driver directly but it can be done.
Regards
Leave a comment:
-
...What do you mean by sample time?
The time for (adc) capacitor charge...
44100, 48000... is not sample time, it is Sample Rate
...what is low RX?
Input signal...
...What am I missing?
screenshot show The Amplitude of input sine wave signal with freq. 1kHz and 8kHz
Sample = Offset + AMPLITUDE * Sin (x * 2Pi)
"Phase in Deg" is phase difference between Transmited Sine Wave (TX) and Received signal (RX)
...what kind of error?
Error form Amplitude and Phase calculations.
EXE calculations is double float
synchronization and the latency between TX and RX is 0
Sorry but my Englis is bad and I can not explain exactly and in details....
Leave a comment:
-
No, I'm not comparing anything. I just don't get your point, that's all.Originally posted by TheWizard View PostPlease, do not compare GPR with IB Metal Detector...
What do you mean by sample time? Sampling interval? The sampling interval is well defined in most decent SC otherwise all the "PC based o-scopes" in the market would be wrong, are they?Sound Card Sample Time is the problem... This time is unknow
what is low RX? Are you referring to the signal level?This time is Phase and Amplitude error(noise) -
big time - big error
Low RX - very big error
Your attachment shows a sawtooth kind of signal with a DC offset not a sine wave. What am I missing?atachment:
Sample Rate: 192000 Hz
Sine Frequency: 8000 Hz
24 samples per 2PI (one wave)
TX - 1 watt speaker
RX mono microphone
RX ~= TX
You have to be more specific, what kind of error?if you work with Sample Rate 44.1, 48 or 96k - what will be error...
Again, I do not agree or disagree with you. I just don't understand your conclusions and therefore I'm asking.
Leave a comment:
-
Please, do not compare GPR with IB Metal Detector...
Sound Card Sample Time is the problem... This time is unknow
This time is Phase and Amplitude error(noise) -
big time - big error
Low RX - very big error
atachment:
Sample Rate: 192000 Hz
Sine Frequency: 8000 Hz
24 samples per 2PI (one wave)
TX - 1 watt speaker
RX mono microphone
RX ~= TX
if you work with Sample Rate 44.1, 48 or 96k - what will be error...Attached Files
Leave a comment:
-
Hi TheWizard,
I don't agree or disagree with you, keep that in mind before you answer. My question is, why?
192 samples per cycle sounds like a whole bunch to me, in GPR systems we rarely have more than 10 per cycle and we are quite happy about it.
On most tek scopes I have dealt with, the amount of samples with the standard memory seldom exceeds 500 samples/window and they allocate into that several cycles.
If you are thinking about rise time of the sound cards input amplifiers or any other hardware related problem then please explain it. But with the info you provided I don't seem to follow your conclusions.
Leave a comment:
-
Sample Rate: 192000 Hz
Sine Frequency: 1000 Hz
192 samples per 2PI (one wave)
Conclusion: Sound-Card can NOT be Metal Detector
Attached Files
Leave a comment:
-
Yeah, and also "complex resistance" is called impedance in English, impedanz in German and impedans in Swedish. You see, lots of similarities! I wonder if the word was originally of Germanic origin?Originally posted by Aziz View PostI mean the inverted notch-filter! As notch filter acts as a band-stop filter, the inverted one is what I meant (band pass filter).
Sorry for this.
http://en.wikipedia.org/wiki/Notch_filter
Picking on you, Aziz ;-)
RA
Leave a comment:
-
Guest repliedSoftware
Have you evaluated this,
for use as a starting point for software, That is where I planned to go first with my laptop MD.
Kyle
Leave a comment:
-
I mean the inverted notch-filter! As notch filter acts as a band-stop filter, the inverted one is what I meant (band pass filter).
Sorry for this.
Leave a comment:
Leave a comment: