Announcement

Collapse
No announcement yet.

Let's made a PC-base metal detector with usb interface !!!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #46
    Software

    Have you evaluated this,

    http://www.baudline.com/

    for use as a starting point for software, That is where I planned to go first with my laptop MD.

    Kyle

    Comment


    • #47
      Originally posted by Aziz View Post
      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.

      http://en.wikipedia.org/wiki/Notch_filter
      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?
      Picking on you, Aziz ;-)
      RA

      Comment


      • #48
        Sample Rate: 192000 Hz
        Sine Frequency: 1000 Hz
        192 samples per 2PI (one wave)
        Conclusion: Sound-Card can NOT be Metal Detector
        Attached Files

        Comment


        • #49
          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.

          Comment


          • #50
            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

            Comment


            • #51
              Originally posted by TheWizard View Post
              Please, do not compare GPR with IB Metal Detector...
              No, I'm not comparing anything. I just don't get your point, that's all.

              Sound Card Sample Time is the problem... This time is unknow
              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?

              This time is Phase and Amplitude error(noise) -
              big time - big error
              Low RX - very big error
              what is low RX? Are you referring to the signal level?

              atachment:
              Sample Rate: 192000 Hz
              Sine Frequency: 8000 Hz
              24 samples per 2PI (one wave)
              TX - 1 watt speaker
              RX mono microphone
              RX ~= TX
              Your attachment shows a sawtooth kind of signal with a DC offset not a sine wave. What am I missing?

              if you work with Sample Rate 44.1, 48 or 96k - what will be error...
              You have to be more specific, what kind of error?

              Again, I do not agree or disagree with you. I just don't understand your conclusions and therefore I'm asking.

              Comment


              • #52
                ...What do you mean by sample time?
                http://en.wikipedia.org/wiki/Sample_and_hold
                The time for (adc) capacitor charge...
                44100, 48000... is not sample time, it is Sample Rate
                http://en.wikipedia.org/wiki/Sampling_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....

                Comment


                • #53
                  Originally posted by TheWizard View Post
                  ...What do you mean by sample time?
                  http://en.wikipedia.org/wiki/Sample_and_hold
                  The time for (adc) capacitor charge...
                  44100, 48000... is not sample time, it is Sample Rate
                  http://en.wikipedia.org/wiki/Sampling_rate
                  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.

                  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.

                  http://en.wikipedia.org/wiki/Sampling_rate

                  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.

                  ...what is low RX?
                  Input signal...
                  Search in Google or any other search engine of your preference for the words "Signal Conditioning" or even better try this book:
                  "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.

                  ...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)
                  So, what should I look into?

                  ...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
                  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.


                  Sorry but my Englis is bad and I can not explain exactly and in details....
                  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.

                  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

                  Comment


                  • #54


                    I have not problem with Synchronization
                    delay between TX and RX is 0

                    Comment


                    • #55
                      Originally posted by TheWizard View Post


                      I have not problem with Synchronization
                      delay between TX and RX is 0
                      How do you know that if you are not sure about your SC sampling interval?

                      Comment


                      • #56
                        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"]

                        Comment


                        • #57
                          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.

                          Comment


                          • #58
                            Originally posted by TheWizard View Post
                            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"]
                            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.
                            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.

                            Comment


                            • #59
                              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

                              Comment


                              • #60
                                Originally posted by Aziz View Post

                                As the FFT power spectrum is power related, you have to multiply with 20. Voltages and currents are multiplied with 10.0 for decibels.

                                Aziz
                                You got this the other way around Aziz, that's a common mistake on EE 101:

                                Decibels are unit less and therefore always imply a comparison.

                                dB(P)=10*LOG(Pout/Pin)

                                P= V^2/R

                                dB(P)=10*LOG((Vout^2/R)/(Vin^2/R))

                                dB(P)=10*LOG(Vout^2/Vin^2)

                                dB(P)=10*2*LOG(Vout/Vin)

                                dB(P)=20*LOG(Vout/Vin)

                                the same can be proven true for currents also.

                                Comment

                                Working...
                                X