Announcement

Collapse
No announcement yet.

DSP in commercial prospecting and treasure hunting metal detectors ... and GPZ 7000 speculation

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

  • #91
    For the time being here we have downright poisonous environment to start any kind of enterprise, and I don't wish to risk my family starve on my whim to run a business. I have some other things to attend to, so it will wait. Unless of course I get some solid support in it and it happens sooner.

    Comment


    • #92
      Ok Davor sorry if I offended you, I was only offering you some good hearted support with your experiments.

      Comment


      • #93
        No offence taken. Some things are just as they are. With a little luck...

        Comment


        • #94
          Originally posted by Davor View Post
          Total overkill. You need only 4 samples to obtain any phase shift you want. A little bit of trigonometry is all you need. With single frequency rig all you need to do is a way to increment/decrement phase shift in small steps, say 1°. You only need a shifted Q phase such that it remains at zero while bobbing a coil. You can achieve that by two buttons, or a single button for semi-automatic solution.

          As for multifrequency, you may use coil in resonant mode, or non resonant, and you may use various waveforms. CZ uses a simple square wave and observes the 3rd harmonic. It can be made incredibly simple, but I'm not sharing as yet. I need to try it first.
          I think we are not on the same frequency
          There would be NO phase shift in a fully sampled detector. The phase shift is done by altering the spot in the digitized data that you are looking a.
          So lets say you had only 4 samples. You have 0 90 270 and 180 degrees.
          No way can you examine 74 degrees (this is one angle referenced in the whites patents).
          If you have a full 180 samples over the full wave, then you can "phase shift" the information, by simply indexing to index 37 in the buffer. So you can then sample and integrate the signal at
          74 degrees.
          So no, it is not overkill, it is actually underkill. If you want to discriminate out a pop tab, and you know what the phase shift is, you index into the received buffer at the index that corresponds to the phase shift on the transmit buffer.
          So lets say a pop tab comes in between 20 and 25 degree phase shift relative to the transmitted signal. You have both the transmitted and received signal in memory, at 180 degree resolutions.
          That says that position 10 in the transmit buffer would be 20 degrees phase shift from the transmit, so you can look in the received buffer at position 10 -13. If the integration of that is under a threshold, then you don't have a pop tab in the field. At least that is essentially what my whites does. It does it by using a phase shift to create a sample window on the real time signal, which
          is the same as changing the index on a digitized copy of the realtime signal. It then integrates, or produces a voltage proportional to the amount of energy within that sample window. You do that by adding up the magnitude of the digitial samples in the buffer under the same window, but in the micro processor world, you don't have to generate a sampling pulse by using a pot to control a phase shift that causes an opamp to generate the sample pulse.

          Comment


          • #95
            Patent #6911823 describes 3280 khz 13120 khz 52480 khz which kind of puzzles me. Cause the way I read that it would be 5248000 hertz or 5.2 mhz? I can conceive of them running that kind of frequency. I am sure they meant 3.280 khz 13.120 khz and 52.480 khz. especially since page 4 says about 3 khz to about 15 khz. I find interesting, the stacked coil arrangement shown in the patent as well. I'm trying to understand the math in that patent. And wonder how they are doing this with 1 coil.
            3.280 * 16 = 52480 and 3280*4=13.120 So obviously they are generating a frequency and tapping a divider chain to get the frequencies. Not sure what they are starting with but obviously
            one tap gives 52khz, and the other two are subsequent taps.

            So I don't know if these are harmonics or are driven.

            Comment


            • #96
              I'm using a STM32F411re nucleo board. It is cheap. 10.33 A fairly new processor, and frankly, at 10.33 you could buy a whole bunch of them, and actually use them to make a commercial product. I'm certain that mouser or some of the others will sell you 10 or 20. Especially for some "educational program." They have the added bonus of taking arduino shields.
              It does not have a DAC however.

              Comment


              • #97
                I can only imagine the problems in Croatia. But that being said, I want to see an open platform, open source so anyone can make and sell them if they desire.
                Starting a business is one thing. Enabling technology is a different thing, and growing the knowledge base is still a different thing.
                And starting a business is daunting.
                Perhaps between CAS my self and some others this can be a reality.
                I'm still having issues getting a development enviorment running.
                keil has a free license through ST for two of ST's lines. STM32F0 and L0 After downloading it and getting the key, I was really disappointed to learn that it doesn't support *my* processor on the free unlimited version.
                openSTM32 is the one I'm trying to get going....
                I can't even find a blinky program that I can compile and download though. Sigh.

                I have worked out a very generic pinout for the F411 that should support pretty much anything from a VDI to a IB to a PI detector.
                Uses a sainsmart 2 x16 shied OR the 1.8 tft adafruit shield. That is, the I/O lines are set up such that either one can be used. Supports 1 rotary encoder, 4 analog inputs, some pulse outputs,
                USB, I2C and RS-232 for communications in and out. For debugging, or logging, and it does support a SD flash on the adafruit shield. Has a couple of toggle switches, a pinpoint switch etc.

                Comment


                • #98
                  pinout STM32

                  Attached is a zip file of the pinout for the nucleo F411 using STMCUBE.... and some generated source files.
                  This supports the following:
                  This is laid out for the NucleoF411 and takes into account the arduino pinout as well as the Morpho connector. That is, the template platform is the 411 nucleo board, with the pins locked
                  in that it by defualt locks. Then other pins were picked for the displays so they matched what those displays use on the arduino.
                  The the rest of the functions were placed around those.

                  The clocks are not set correctly though. Just found that....so the clocks will have to be set.....
                  specificaly the clock is set to the 16 mhz internal but with divisors for 8 mhz.
                  using the internal clock and setting the divisor for /16 things will be right.
                  Using the external HSE clock and setting the divisor for 8, things will be right.
                  But using HSE with a divisor of 16 won't work and using the internal with a divisor of 8 won't work.
                  when correct, the clock will run at 96 mhz to enable the USB clock to be correct. I think there is a combination that also works with the processor overclocked a bit. 103 or 108 I don't remember. I have a question in for Luca as to whether the processor can run at that speed reliably. I'm guessing it should, since that is around 3% tolerance...




                  2 x 16 sainsmart (4 bit interface)
                  1.8" adafruit lcd shield SPI interface
                  USB for data logging out or detector setup

                  1 pinpoint switch
                  2 toggle switches
                  1 rotary encoder with pushbutton
                  1 PWM out for PI stim pulse
                  1 input capture to use for timing whatever.
                  3 sample out signals for use in generating sample signals for an IDX for example.
                  2 spare GPIO outs to be used for whatever. In the case of both the SD card AND the ADFRUIT display, you would need a chip select for each device.

                  Uart used for debugging
                  SPI used for SD Card and 1.8" adafruit 1 1 pin for the ChipSelect for the display


                  1 analog input for looking at the transmitted signal
                  1 analog input for looking at the receive signal.
                  1 analog input for the joystick on the adafruit shield
                  1 analog input for the pushbuttons on the sainsmart shield.
                  1 analog input for the X channel if used to provide VDI for an existing analog detector such as the IDX PRO
                  1 analog input for the Y channel if used to provide VDI for an existing analog detector such as the IDX_PRO
                  1 analog input for the G channel on a whites detector
                  1 spare analog input

                  Tying to be flexible enough for the following applications:

                  Pi detector with UI
                  VDI add on for existing detectors (yes it is overkill for that purpose)
                  Platform for IB detector with UI, and direct sampling of the transmit and receive pulses.
                  Platform for a hybrid IB detector that works with the TGSL or IDX to provide timing, and VDI

                  Platform for a PI that uses external sampling.
                  Platform for a ground mapping (detector that logs data into flash on a transect for later processing)

                  Not set in stone...
                  Attached Files

                  Comment


                  • #99
                    Originally posted by scrungy_doolittle View Post
                    So lets say you had only 4 samples. You have 0 90 270 and 180 degrees.
                    No way can you examine 74 degrees (this is one angle referenced in the whites patents).
                    Well, you'll need to put a little more effort in trigonometry. Phase shifting is a sort of coordinate system transform, and so far it was an easy task.
                    From two signals in quadrature you CAN get any phase shift you want. Simple as that. And I've given you the recipe to do it.

                    I'm a bit disappointed you can't get programming tools for your micro. Hope it does not vanish from market soon.

                    Comment


                    • Originally posted by Davor View Post
                      Well, you'll need to put a little more effort in trigonometry. Phase shifting is a sort of coordinate system transform, and so far it was an easy task.
                      From two signals in quadrature you CAN get any phase shift you want. Simple as that. And I've given you the recipe to do it.

                      I'm a bit disappointed you can't get programming tools for your micro. Hope it does not vanish from market soon.
                      It won't. It's a new one. The tools will come along. Not to worry. And ARMs are ARMS, and sure there are differences, but in peripherals.
                      Grin. trig. sigh. I'll try to understand it, but if you don't have the sampled data to look at you are just guessing at it. Given 4 samples in a half cycle and only having a voltage measurement at
                      0 45 90 and 135, you absolutely cannot know the actual voltage level between 25 and 30 degrees, because you don't know what the curve looks like between these two points. All you can do is guess, and I'm not talking about a perfect sinewave here.... you transmit a perfect sinewave, but the received plots that I've seen coming back sure are not clean sine waves.
                      ST Thompson has been around a while and so have arms.
                      You see, it is this way. There are dozens of flavors of 8051's out there. There will be some version of 8051's floating around for the next 30 years or more. It is to ubiquitous. Arms are
                      taking over a large share of the market. Wonderful old chips like the 6809,6502, the 68000 are gone. But for the most part, these were sole source parts.
                      Company mergers come and go.
                      As long as you write it in C, and make a reasonable effort to segregate the processor specific sections, you can move it pretty freely between arm processors. Yes there will be differences. Lik
                      a part with 1 ADC or 2 ADC's. But if they are using a cortex M4, well the code other than the processor specifics can migrate.
                      We started out with a Silabs 'F320. Ten years ago. It is still in production. We decided we did not need USB, so I migrated the code to a F310, 7 years ago, and just for giggles, I ported it to a F361 which is a 32K drop in for the F310. Of course it had a different mix of peripherals, but the core 8052 peripherals were still there, the timers, the PCA etc. Then we needed more horsepower, so I ported the code to a F120, decided I did not like that part, mostly because of cost, so ported it to a F040. Over 5 years I've finally maxed that puppy out. None of the initial
                      ports took more than a couple weeks. The roughest was the port to the 361 and 040 because they have a pages Special Function Pages section. They added new peripherals, and ran out of
                      ports in the 8050 SFR address space, so created a paging mechanism to allow for more. Now Port 5 is on Page F, so if you have to access port 5, you have to save the old sfr, change the SFR to page F, access port 5, then restore the SFR.
                      But you could easily port that to a device that did not have the sfr register, by simply doing a define and redefining SFRPAGE to be a ram location somewhere. Or create a macro that takes it out completely. So disappearing processors are not a massive concern, especially if you are using a multiple source CPU.

                      It is more a problem of getting a properly configured sample project that I can load, compile and debug. Once that is done, the tools will be easy. I just can't use my first choice (Keil ARM suite) because I can't afford to buy it. But the openSTM32 is a capable tool set, and it is just a matter of figuring out the details. I'm hoping Luca Spelgatti (the ST FAE for Texas, will be able to help me accomplish that.....and then it's off to the races.....

                      Comment


                      • Your implementation path seem like shooting your foot with a BB gun and a lot of ammunition. I for start do not have that much time at hand to burn on porting this to that and all the guesswork in between.
                        Originally posted by scrungy_doolittle View Post
                        Given 4 samples in a half cycle and only having a voltage measurement at 0 45 90 and 135, you absolutely cannot know the actual voltage level between 25 and 30 degrees, because you don't know what the curve looks like between these two points. All you can do is guess, and I'm not talking about a perfect sinewave here.... you transmit a perfect sinewave, but the received plots that I've seen coming back sure are not clean sine waves.
                        Oh but they are! Even if they are not perfectly shaped, by eliminating the first 6 harmonics you are pretty certain the harmonics will do very little to spoil your fun. Besides, you are rotating a phase of a known vector, not sampling at that angle and you don't have to guess anything. From x y coordinates (two phases, not 4) you simply go to r ϕ, keep r and rotate to ϕ', turn back to x' y'. The formulas i gave you previously get your x' and y' values directly.

                        Comment


                        • Originally posted by Davor View Post
                          Your implementation path seem like shooting your foot with a BB gun and a lot of ammunition. I for start do not have that much time at hand to burn on porting this to that and all the guesswork in between.

                          Oh but they are! Even if they are not perfectly shaped, by eliminating the first 6 harmonics you are pretty certain the harmonics will do very little to spoil your fun. Besides, you are rotating a phase of a known vector, not sampling at that angle and you don't have to guess anything. From x y coordinates (two phases, not 4) you simply go to r ϕ, keep r and rotate to ϕ', turn back to x' y'. The formulas i gave you previously get your x' and y' values directly.
                          Now you really have me confused . If you are not sampling over some angle then why are the whites detectors, using a phase shifter to generate a sample pulse starting at some phase angle and ending at another one, and integrating the voltage in between?
                          For example, there are two phase shifters generating sample pulses at different phase shifts relative to the transmit signal. These wind up turn on a switch that allows a portion of the wavefom
                          that corresponds to that particular phase, to be gated into an integrator and or filters. When the transmitted sine wave drops to the comparator point, then the gate is closed.
                          So that corresponds to starting a sample at some number of degrees relative to the transmit wave, sampling over some set of phase angles, and then ignoring the signal until the next part of the sine wave where the voltage at the particular phase angle, exceeds the comparator, which starts this all over again. one is supposed to be 90 out of phase with the transmit.
                          They synch rectangular pulse which is used to eliminate earth magnetic fields, is generated based on the RECEIVED signal phase and is relative to that. Again, they turn a switch on, integrate
                          the voltage, send it to a sample and hold etc.
                          The voltages after filtering, (and I *REALLY* want to know what that bandpass filter center frequency is, and it's bandwidth, Q and Gain) gets send to a sample and hold.
                          The X and Y signals from the first two comparators are the voltages that give the phase id values. OF course you know all of this, but I fail to understand exactly what you are saying.
                          In what way are you not sampling a signal between two time points (phases angles) and summing the values to get the voltage.

                          I have precious little time as well. I guess I don't understand "rotating a phase". I'm trying to duplicate the X and Y signals on the sampling detectors.

                          Comment


                          • Originally posted by scrungy_doolittle View Post
                            Now you really have me confused . If you are not sampling over some angle then why are the whites detectors, using a phase shifter to generate a sample pulse starting at some phase angle and ending at another one, and integrating the voltage in between?

                            I'm all for simplicity, and actually there are two threads here, modifying Mr. Crockers code to do ground balance, and
                            creating a full digitial clone of the Whites 6000 DI series 3, and then improving it.

                            For example, there are two phase shifters generating sample pulses at different phase shifts relative to the transmit signal. These wind up turn on a switch that allows a portion of the wavefom
                            that corresponds to that particular phase, to be gated into an integrator and or filters. When the transmitted sine wave drops to the comparator point, then the gate is closed.
                            So that corresponds to starting a sample at some number of degrees relative to the transmit wave, sampling over some set of phase angles, and then ignoring the signal until the next part of the sine wave where the voltage at the particular phase angle, exceeds the comparator, which starts this all over again. one is supposed to be 90 out of phase with the transmit.
                            They synch rectangular pulse which is used to eliminate earth magnetic fields, is generated based on the RECEIVED signal phase and is relative to that. Again, they turn a switch on, integrate
                            the voltage, send it to a sample and hold etc.
                            The voltages after filtering, (and I *REALLY* want to know what that bandpass filter center frequency is, and it's bandwidth, Q and Gain) gets send to a sample and hold.
                            The X and Y signals from the first two comparators are the voltages that give the phase id values. OF course you know all of this, but I fail to understand exactly what you are saying.
                            In what way are you not sampling a signal between two time points (phases angles) and summing the values to get the voltage.

                            I have precious little time as well. I guess I don't understand "rotating a phase". I'm trying to duplicate the X and Y signals on the sampling detectors.
                            "A transmit-receive type buried metal detector is described employing wide gating pulses to transmit a portion of the received signal through a gate means to an averaging means for reducing any noise in the signal. The gating pulses are centered on the received signal waveform at a centering position where a background signal component of such received signal is of minimum amplitude. As a result, equal positive and negative polarity portions of the background signal component are transmitted through the gate means during each pulse and are averaged to zero in order to eliminate such background signal from the output voltage of the averaging means."

                            [ this can be done by digitizing the entire wave form, looking through the received signal for point to start adding the values up and to quit adding them up. However
                            it seems a bit cleaner to simply *ignore* the data in that area. Or you could just set this portion of the signal to 0. Which does the same thing, and further processing would not see those
                            data.]

                            "phase adjustment means coupled to the gate circuit for moving the gating pulses and received signal relative to each other to center said gating pulses at a centering position on the received signal waveform where the background signal componentof said received signal is of minimum amplitude, and for causing substantially equal positive and negative polarity portions of the background signal component on opposite sides of said centering position to pass through said gate means during the gating pulse; and
                            "
                            [Here the phase adjustment is simply a set of coordinates in the digitized array]

                            "phase shift means for adjusting the phase of the gating pulses and the received signal relative to each other to center said gating pulses at a centering position on the received signal where the background signal component of the received signalis of minimum amplitude, and for causing substantially equal positive and negative polarity portions of the background signal component on opposite sides of said centering position to pass through said gate means during the gating pulse; and

                            noise reduction means for reducing noise, including random noise of high frequency and 60 hertz noise signals and harmonics thereof, in said output voltage and connected to the output of said gate means to cause said positive and negativeportions to cancel, said noise reduction means including an inverter amplifier having an inverting input connected to the output of said gate means and an averaging capacitor connected in a negative feedback path between the output of said inverteramplifier and said inverting input so that any random frequency noise component of said gated portion of the received signal averages to zero in said averaging capacitor to produce substantially no change in the output voltage."
                            from http://www.patentgenius.com/patent/4249128.html

                            In a digital world, one would digitize both the transmit and receive signals, and the phase shifts and sampling times would just be indexes into the digitized voltage range, and you sum the data between them to get an integration, would they not?

                            Comment


                            • You are right about sums in discrete time being equal to integration in continuous time.
                              Originally posted by scrungy_doolittle View Post
                              For example, there are two phase shifters generating sample pulses at different phase shifts relative to the transmit signal. These wind up turn on a switch that allows a portion of the wavefom that corresponds to that particular phase, to be gated into an integrator and or filters. When the transmitted sine wave drops to the comparator point, then the gate is closed.
                              True, but you are talking about analogue solution that is free to shift a phase to your heart's desire. In digital world you do it a little different. Since you are familiar with Whites detectors, observe the IDX schematic and see how Disc phase is manipulated by adding a portion of a GEB phase. Both are demodulated baseband channels, approximately 90° apart. Now, imagine you have I and Q channels (also by negation I̅ and Q̅ if you need) and to rotate (shift) I to I' and Q to Q' you simply add or subtract the desired portion of the I to Q and the other portion of Q to I to a desired effect. You may find the exact formulas in a post above.

                              Comment


                              • Originally posted by Davor View Post
                                You are right about sums in discrete time being equal to integration in continuous time.True, but you are talking about analogue solution that is free to shift a phase to your heart's desire. In digital world you do it a little different. Since you are familiar with Whites detectors, observe the IDX schematic and see how Disc phase is manipulated by adding a portion of a GEB phase. Both are demodulated baseband channels, approximately 90° apart. Now, imagine you have I and Q channels (also by negation I̅ and Q̅ if you need) and to rotate (shift) I to I' and Q to Q' you simply add or subtract the desired portion of the I to Q and the other portion of Q to I to a desired effect. You may find the exact formulas in a post above.
                                Are the I and Q channels the same as the X and Y of whites? Davor, the problem is I don't really understand enough about analog to understand how the disc phase is manipulated by adding in part of the geb phase, what it is doing. I am utterly confident that if I could understand them, then I could implement them in firmware. The other thing I still do not understand is exactly how a synchronous demodulator really works. Mr. Crockers code implements them, and I can see what he is doing, but in the analog world I am lost.

                                Some things are beginning to gell, I have managed with the help of another forum member, to figure out the filters on the 5900 by using ltspice. He get the model working, and I will
                                be modifying it. Those filters have a center frequency of 15.3 hz, and a gain of 42 db, a bandwidth from 13.61 to about 18 hz. Not sure why they are down there, when the signal is a 6.592 Khz signal. They do reject 50 and 60 cycle hum, but I would have expected to find a bandpass filter that blocked 50-60hz hum.
                                The other thing, is LTSPICE also shows a degree on the other end of the cycle. Probing says that the bandwidth is from 77-85 degrees, so I am thinking that maybe they are actually trying to look specifically at the voltage level between 77-85 degrees. The ultimately are the Xf and yf signals and are used in the VDI among other things.

                                Comment

                                Working...
                                X