Announcement

Collapse
No announcement yet.

FPGA based multi-frequency VLF design

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

  • #16
    A bit more info would help the electronics noob, George.
    It's not essential, it's a noise-reduction technique. Lowering the RX bandwidth lowers the amount of noise. And tuning it to exactly the TX frequency is not generally considered a good idea (something related to random phase shift jitters/instability, sensitivity to component characteristics) so deliberately tuning 'off' is commonly done.
    Plus...if you're wanting to go multi-frequency, then a tuning cap sounds like a bad idea to me. The Fisher CZ front-end just has some low-pass RC filtering to reduce high-freq stuff, and a 1 KOhm load.

    Can anyone find an example circuit of a Whites 6.6KHz machine front-end?

    I'm still thinking about why swapping the TX drive wiring made such a mess of the null behaviour. I'm thinking (some of) the shielding must connect to TX ground, and driving this with 7 V AC just couples a signal straight into the RX.

    Comment


    • #17
      Originally posted by Skippy View Post
      I'm still thinking about why swapping the TX drive wiring made such a mess of the null behaviour. I'm thinking (some of) the shielding must connect to TX ground, and driving this with 7 V AC just couples a signal straight into the RX.
      On concentrics, the bucking coil is connected to the ground side of the TX signal to minimize capacitive coupling of the signal onto the RX coil. If you drive the TX coil backward, the bucking coil gets the hot side of the signal and the RX coil will see a lot of signal coupled in. What he saw was higher than I would have expected, but it looks correct now.

      Panchito, now that you have a believable RX signal, did you try different targets? A silver coin, a piece of foil, and a nail should show a good spread.

      Comment


      • #18
        Originally posted by Carl-NC View Post
        On concentrics, the bucking coil is connected to the ground side of the TX signal to minimize capacitive coupling of the signal onto the RX coil. If you drive the TX coil backward, the bucking coil gets the hot side of the signal and the RX coil will see a lot of signal coupled in. What he saw was higher than I would have expected, but it looks correct now.

        Panchito, now that you have a believable RX signal, did you try different targets? A silver coin, a piece of foil, and a nail should show a good spread.

        So i'm still not sure i'm getting the correct response.. its weird but here is what i have so far..

        No tuning Capacitor:
        As shown in last scope image RX voltage in phase with TX. with a silver coin amplitude shoots up but phase barely moves.

        Adding a Tuning Capacitor.

        i measured an inductance of 36 mH.. so using the equation I added 16.8 nF in parallel to the RX Coil. The RX Voltage was now about 20 degrees out of phase with the TX Voltage when no metals were near the coil. When a silver coin is in center of coil, RX amplitude shoots up and phase goes close to zero/so it moves back about 20 degrees,,, in phase with TX.. When i move the coin from the center of the coil toward the outer edges of the coil, the amplitude begins to drop as expected but the phase begins to increase alot, more than 90 degrees.. then eventually as i move more toward the edge and past the edge the phase comes back down to the 20 degrees and nominal voltage when nothing was in front of the coil. (i hope my description is understandable.)

        This behavior seems weird.

        if i swap the RX wires, the RX voltage is ~180 degrees out of phase with TX , and with the silver coin in the center produces the sharp increase, but the phase barely moves. moving the coil from the center toward the TX coil, the phase does not really move at all, unlike my previous description...



        I hope i don't sound too naive. I am a EE, i have just always avoided analog electronics in favor of digital electronics/software/firmware. And now as part of this hobby project i actually do need to understand..

        Comment


        • #19
          Originally posted by green View Post
          The outside of connector J1 is grounded. Where is the return to ground for J2?
          When i made the schematic i didn't know one side of the coil needed to be tied to ground. I have modified the board and wired the outside connector of J2 to ground.

          I'm not exactly clear on why one side has to be tied to ground, why we cant just measure the voltage across the inductor. I don't remember why i picked the instrumentation amplifier i did, but my original thoughts were that i could just use a diff amp with a high enough allowable common mode voltage in case the signal would drift, since it would not be tied to ground..

          Comment


          • #20
            Originally posted by Skippy View Post
            I realise I'm thinking ahead a bit here - but is the chosen coil going to be suitable for your projects' intended multi-frequency operation. I'm no multi-freq expert, but I recall commercial mf machines tend to have noticeably lower-inductance transmit coils. Maybe it's the high-frequency components of the square-wave they are driven with that dictates this.
            So an alternative coil choice may be needed. One obvious one is that for the Fisher CZ-3 / 6 / 70 etc, designed for a 5KHz square-wave drive.
            And the White's DFX etc coil should be considered. Minelab BBS/FBS coils have the complication of having an internal pre-amp, which may limit what you can achieve.


            Yeah right now all i have is the XLT. eventually i'll look into getting a different coil.

            as you have said, I have read that many multi frequency machines use square waves to generate the harmonic frequencies. But why is that? Why not just generate a sum of sine waves of the actual frequencies you want instead of just living with harmonics. is it just because its easier? will the metal will react better with a square wave?

            It seems that with summing of sines you can actually emphasize any frequencies that may undergo loses thru the coil. So i probably don't know what i'm talking about since i haven't tried this yet, but i was going to try "somehow" getting a frequency response plot of a coil , and based on that figure out how much each frequency needed to be emphasized. Of course getting a coil exactly matched to your needs would be best, but if not you may be able to compensate thru the TX waveform... I don't know , these are just some of the questions i've had since starting this project..

            Comment


            • #21
              Originally posted by Skippy View Post
              Quote:"In software any DC offset should be ignored since I'm not looking at the 0 Hz frequency"
              This shows some misunderstanding. The DC offset is AFTER demodulation to get a DC level.
              Example (simplified):
              Nulled signal from coil, no target present = 2 mV RMS
              Amplify this x 100 = 200 mV RMS
              Synchronous demodulated => +200mV DC (demodulators have different gains, depends on type, and integral gain etc)
              Bring target near coil => +250 mV DC
              Use various methods to remove the 200 mV DC => 50 mV DC, the target signal.

              Obviously you will do two demodulation processes, at (usually) 90 degrees apart. How you choose your zero/90 references is one of the issues ,hardware or software can give solutions.


              Skippy, I'm a bit confused by your example. Is your example based on analog demodulation? and how would this transfer over to the digital world? As far as i understand, the end result is we want to determine the phase offset between the TX voltage and the RX voltage. Correct? And you mention 2 demodulation processes, one in phase and one 90 degrees apart...

              A fourier transform of a single frequency is of the form A*sin + i*B*cos.. so in effect it will give us the in phase and quadrature components. the arctan(B/A) is the phase shift. ( I assume as long as we compare relative phase shift from when nothing is in front of the coil to when a metal is in front of the coil we'll be ok)... And any offset in the raw signal would only show up as frequency 0.

              Please let me know if i am misunderstanding or misapplying the math... ..

              you know... i don't know 100% that what i'm doing is correct.. i really just got an idea in my head and i built hardware and software to test it out. I've hit this road bump and i'm really grateful that so many people are trying to help me work thru this..

              Comment


              • #22
                Originally posted by Panchito View Post
                Please let me know if i am misunderstanding or misapplying the math... ..

                you know... i don't know 100% that what i'm doing is correct.. i really just got an idea in my head and i built hardware and software to test it out. I've hit this road bump and i'm really grateful that so many people are trying to help me work thru this..
                Are you aware of this book? -> Inside the METAL DETECTOR - Second Edition - Published 2015
                It will answer a lot of your questions.

                Comment


                • #23
                  Originally posted by Panchito View Post
                  A fourier transform of a single frequency is of the form A*sin + i*B*cos.. so in effect it will give us the in phase and quadrature components. the arctan(B/A) is the phase shift. ( I assume as long as we compare relative phase shift from when nothing is in front of the coil to when a metal is in front of the coil we'll be ok)... And any offset in the raw signal would only show up as frequency 0.
                  You can calculate the amplitude and phase as you describe with a processor-based detector. What Skippy is referring to is the analog method of achieving the same thing. In that case you take two samples of the RX waveform - one at (or close to) the zero-crossing, and a second at (or close to) the peak. These are the I (in-phase) and Q (quadrature) components of the waveform. You can then simply wire-AND the I and Q channel outputs together to achieve both ground balance and discrimination. GB and DISC are achieved by adjusting the two sample points. If you want to add VDI to an analog detector, you can connect each of the two channel outputs to the ADC of a PIC (for example) and calculate the square root of the sum of the squares to get the amplitude (signal strength), and use the arctan equation to derive the phase-shift.

                  Comment


                  • #24
                    Lots of questions....
                    "When a silver coin is in the center of coil, RX amplitude shoots up and phase goes close to zero/so it moves back about 20 degrees,"
                    You're describing a phase change relative to whatever random phase comes off the nulled coil. You need to ignore the unchanging nulled coil signal, and base every phase change relative to some KNOWN reference. Such a reference is a piece of ferrite, giving a Zero degrees signal, as described in my earlier post. As a PC nerd, I imagine you can find an interference suppression bead on some junk computer cable, eg. USB, old power supply output leads, they stick em everywhere... Bring it end-on to the coil, not 'laying flat'. I suspect your silver coin's '20 degrees' shift is actually 160 degrees, see my earlier post.
                    "Skippy: Is your example based on analog demodulation?"
                    Yes, but digital demodulation should mimic analogue, so the example is still valid.
                    ".. the end result is we want to determine the phase offset between the TX voltage and the RX voltage. Correct?"
                    No, you want to find the CHANGE in phase caused by the target. And what you are using as your reference TX phase needs some thought. I doubt that using the zero-crossing point of your sine-wave is going to work as a Zero or 90 degree reference. All sorts of phase shifts occur from TX drive through to front-end pre-amp output. Which is where your ferrite lump enables you to calibrate your phase - it only affects the zero degrees channel, and has NO quadrature component. Presumably you can tweek you timings easily in software, if you can get your ferrite to read somewhere within 2 degrees of Zero you should be fine. Commercial machines tend to better 1 degree, coil-to-coil variability tends to limit what is possible - if you tuned a coil and electronics together, then 0.1 degrees error is achievable.

                    Comment


                    • #25
                      Originally posted by Panchito View Post
                      When i made the schematic i didn't know one side of the coil needed to be tied to ground. I have modified the board and wired the outside connector of J2 to ground.

                      I'm not exactly clear on why one side has to be tied to ground, why we cant just measure the voltage across the inductor. I don't remember why i picked the instrumentation amplifier i did, but my original thoughts were that i could just use a diff amp with a high enough allowable common mode voltage in case the signal would drift, since it would not be tied to ground..
                      The instrument amplifier input needs a path to ground for bias current. I would try a 1k resistor to ground on each input instead of grounding one side to start with. Maybe not the best way.

                      Comment


                      • #26
                        Panchito, the approach you're taking fundamentally should work. It's been discussed here and elsewhere a number of times but, to my knowledge, no one has ever actually implemented the idea.

                        Most detectors (SF or MF) use analog I/Q demods and digitize/DSP the resulting signals. A few detectors do direct sampling of the RX signal but I believe they all perform digital I/Q demod. The DFT will give you complex array outputs from which you can calculate magnitude & phase but it may be computationally slow compared to even digital demodulation. You probably will want to carefully sync the ADC so that it grabs 2^n data points in an even number of TX cycles so you don't have to window-filter the data.

                        Current MF designs use square wave voltage drive (triangle wave current) because it's easy and, in some cases, fairly fuel efficient. You can fiddle with the duty cycles to emphasize one frequency vs another, and switch frequencies pretty easily. No one (I'm aware of) has ever mixed sinusoids for an MF transmitter. I threw the idea out there many years ago but decided it was a bad idea; lots of hurdles and no up-side. Once upon a time White's designed a 4F-MF using sequentially switched sinusoids, they got 2 patents on the design (look for Don Shoemaker). It was squirrely and difficult to keep working so they abandoned it.

                        My suggestion before you wade neck-deep into DFT-land is to either build a traditional analogish metal detector, or at least get a commercial unit and understand everything about the target responses. Right off the bat, you hit a wall because of a lack of this knowledge. A good analog detector is an older Tesoro, a White's Classic, or a Fisher 12xx. On any of these you can put the demod outputs on a 'scope and see what targets do.

                        --Carl

                        Comment


                        • #27
                          Originally posted by Carl-NC View Post
                          Panchito, the approach you're taking fundamentally should work. It's been discussed here and elsewhere a number of times but, to my knowledge, no one has ever actually implemented the idea.

                          Most detectors (SF or MF) use analog I/Q demods and digitize/DSP the resulting signals. A few detectors do direct sampling of the RX signal but I believe they all perform digital I/Q demod. The DFT will give you complex array outputs from which you can calculate magnitude & phase but it may be computationally slow compared to even digital demodulation. You probably will want to carefully sync the ADC so that it grabs 2^n data points in an even number of TX cycles so you don't have to window-filter the data.

                          Current MF designs use square wave voltage drive (triangle wave current) because it's easy and, in some cases, fairly fuel efficient. You can fiddle with the duty cycles to emphasize one frequency vs another, and switch frequencies pretty easily. No one (I'm aware of) has ever mixed sinusoids for an MF transmitter. I threw the idea out there many years ago but decided it was a bad idea; lots of hurdles and no up-side. Once upon a time White's designed a 4F-MF using sequentially switched sinusoids, they got 2 patents on the design (look for Don Shoemaker). It was squirrely and difficult to keep working so they abandoned it.

                          My suggestion before you wade neck-deep into DFT-land is to either build a traditional analogish metal detector, or at least get a commercial unit and understand everything about the target responses. Right off the bat, you hit a wall because of a lack of this knowledge. A good analog detector is an older Tesoro, a White's Classic, or a Fisher 12xx. On any of these you can put the demod outputs on a 'scope and see what targets do.

                          --Carl



                          Carl, your suggestion to get an old detector and probe it as an aid to understanding how the coil reacts to a target is a great idea.

                          as far as getting neck-deep into DFT-land, i'm way beyond that. The DFT part of my design is the the only thing that appears to be working and what i finished first before even designing the A/D board.. The firmware uses a Goertzel algorithm, not an FFT, so i don't need 2^n samples. And i use a ping pong buffer, so while i collect a buffer of data, i am processing the previous buffer. The current firmware supports real time proceesing of 10 unique frequencies. Yeah, the frequency needs to be selected so that there are integer multiple cycles in the buffer length, but the buffer length is variable, and with the 1 MHz sample rate, you can get close to any frequency you want. And since the FPGA samples the data and outputs the waveform at the same time i never loose synchronization..

                          funny that i thought the analog front end would be the easy part...

                          Thanks for your help. there are still a few things i can try based on the other responses i received.

                          Comment


                          • #28
                            Hi Panchito

                            If you haven't already done it I suggest you look at a few VLF detector schematics (such as the ones Carl mentions) to get an idea of basic front end architecture.

                            F'rinstance http://www.hobby-hour.com/electronic...tesclassic.php

                            They're all different but they're all the same - amplifier, sync. demodulator, filter.

                            Good luck,

                            Gwil

                            Comment


                            • #29
                              Originally posted by Panchito View Post
                              The firmware uses a Goertzel algorithm, not an FFT, so i don't need 2^n samples.
                              Not familiar with that so I did a quick look, very interesting. If I had time I'd dive into it and see how it works. Once upon a time I scratch-wrote a Windows FFT in C++ for evaluating ADCs at Analog Devices. That was the days of Win95 & before the Internet made that kind of stuff free.

                              Comment


                              • #30
                                For anyone else interested in the Goertzel algorithms, this page has some info:
                                http://www.embedded.com/design/confi...tzel-Algorithm

                                Comment

                                Working...
                                X