Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

Android Phone Based Metal Detector - FCMD

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

  • #31
    Originally posted by moodz View Post
    The reason that phase references are not needed is because time does not exist in software code. Its just code ... it has no time dimension. However time does exist once it comes outside the CPU where a real time TX and RX signal is generated. Just because you tell the Codec to produce 20 KHZ .. does not mean that the RX will sample at the same rate. So testing the hardware showed phase rotations occurring due to this problem.

    We just use the real TX signal as the demodulation Local oscillator signal. This compensates for the problem with the phase rotations due to CODEC clocking differences between TX and RX.
    But the phase reference IS needed, or you would not have added it. That's my whole point: you need to know what you are doing in order to be successful using AI. And it's funny that your solution is exactly how all VLF metal detectors do it, yet AI missed that point entirely -- it's a really basic element of synchronous VLF designs. And, yes, time does exist in code, in the same manner that signal voltages exist in code. Maybe not as literal time or voltage, but as coded representations.

    This is truly an impressive demonstration of what AI can do, but if it was not for you, it would not have worked properly.

    One other point: the narrowband demod method suggested by AI is an excellent solution, but it is covered by Minelab patent US7579839. Although the Australian version of this patent has lapsed, the US version has not, and there may be an active WIPO version. Personally, I view the patent as bogus -- the technique has been used for 100 years, so it's just an application of existing tech specifically to metal detectors, i.e., there was no inventive step -- but so far the courts have not.

    Comment


    • #32
      Carl, while we're on the narrow band demodulator subject. Could you verify if t = 1/fs in the equation. And is this a syncronise demodulator, assuming regular sampling interval at a rate 2x higher than the frequency of interest?

      Thanks

      Comment


      • #33
        Originally posted by Carl-NC View Post

        But the phase reference IS needed, or you would not have added it. That's my whole point: you need to know what you are doing in order to be successful using AI. And it's funny that your solution is exactly how all VLF metal detectors do it, yet AI missed that point entirely -- it's a really basic element of synchronous VLF designs. And, yes, time does exist in code, in the same manner that signal voltages exist in code. Maybe not as literal time or voltage, but as coded representations.

        This is truly an impressive demonstration of what AI can do, but if it was not for you, it would not have worked properly.

        One other point: the narrowband demod method suggested by AI is an excellent solution, but it is covered by Minelab patent US7579839. Although the Australian version of this patent has lapsed, the US version has not, and there may be an active WIPO version. Personally, I view the patent as bogus -- the technique has been used for 100 years, so it's just an application of existing tech specifically to metal detectors, i.e., there was no inventive step -- but so far the courts have not.
        You are absolutely right Carl .... the AI did actually come up with an elaborate autotracking scheme using a reference tone at 20Khz being fed back from the TX to produce a phase error signal that would be applied to the demods internally and I did suggest that maybe a more simple solution was possible and it went with that. This is just an exploration of AI capability and I am not actually that interested in making a detector based on a phone.
        However the fact that it got it working at all without any coding input other than "conversational instructions" is very impressive IMHO also.

        Here is the patent report : Oh I can see the future is in machine written patents !

        Attached Files

        Comment


        • #34
          Originally posted by Altra View Post
          Carl, while we're on the narrow band demodulator subject. Could you verify if t = 1/fs in the equation. And is this a syncronise demodulator, assuming regular sampling interval at a rate 2x higher than the frequency of interest?
          No, t is continuous time. In the equations

          I(t) = s(t) × cos(2πft)
          Q(t) = -s(t) × sin(2πft)​

          f is the TX frequency of interest, that is, you demodulate the signal (which might contain several other frequencies), low pass filter, and the result should be a quasi-DC value that represents the amplitude & phase of that frequency only, at that particular instance in time. That's why t drops out in the end:

          I = (A/2) cos(φ)
          Q = (A/2) sin(φ)

          fs is the RX sample rate which needs to be high enough (fs >= 2*f) for Nyquist but can be much higher. Assuming a typical 44kHz audio sample rate, you will just meet Nyquist for a 20kHz TX component but will be way above it for a 1kHz TX component. You will normally want to demodulate at the sample rate so that successive calculations:

          I(tn) = s(tn​) × cos(2πftn​)
          Q(tn​) = -s(tn​) × sin(2πftn​)​​

          I(tn+1) = s(tn+1​​) × cos(2πftn+1​​)
          Q(tn+1​​) = -s(tn+1​​) × sin(2πftn+1​​)​​

          happen where (tn+1​​​ - tn​)​​ = 1/fs. But even this is only necessarily true for, say, the 20kHz content. For the 1kHz content, you could throw out 19-of-20 data points and demodulate at 1/20th of fs. But I don't know why you would do this.

          Comment


          • #35
            Excessive math and formulas always ruin the topic!
            That's too much "swearing" for my refined sensibilities!
            I'm going to do something productive!​


            Comment


            • #36
              Carl, thank you for taking the time to explain. I'm not using the AI code. I have a dual frequency circuit that I want to program and test. That equation had me confused.after reading the Nokta patent.

              https://patents.google.com/patent/US11914095B2/en

              Comment


              • #37
                99.99% of all VLF and MF designs use synchronous demodulation, whether it is done with a discrete analog demodulator or done with direct sampling in software. For the software demodulator, it becomes simple to multiply by cos/sin to produce narrowband demodulation instead of the usual square wave used in the analog demod, which is a wideband method. But Minelab got a patent on narrowband demodulation so Nokta got around the patent by using asynchronous narrowband demodulation, where the f in the prior equations are no longer the TX frequency but slightly offset. This means the demod outputs are no longer quasi-static DC values but are now slowly rotating vectors that must be un-rotated, which can be done using another software demod. Asynchrounous demodulation has been used before in analog detectors, the Fisher Gemini is an example.

                Comment


                • #38
                  Altra, don't give the man a shovel!

                  Comment


                  • #39
                    Click image for larger version  Name:	IMG_0891.jpg Views:	0 Size:	422.9 KB ID:	442410Click image for larger version  Name:	IMG_0892.jpg Views:	0 Size:	412.0 KB ID:	442411

                    Not that I'm too happy with this solution... but it's certainly more acceptable.
                    My son is in charge of Android but now he has a lot of work to do.
                    When he has time; I'll tell him to correct the first code.
                    I liked the first version better.
                    But this one is not bad either.
                    Okay.
                    It's a matter of taste.


                    ​​

                    Comment


                    • #40
                      Originally posted by Carl-NC View Post
                      99.99% of all VLF and MF designs use synchronous demodulation, whether it is done with a discrete analog demodulator or done with direct sampling in software. For the software demodulator, it becomes simple to multiply by cos/sin to produce narrowband demodulation instead of the usual square wave used in the analog demod, which is a wideband method. But Minelab got a patent on narrowband demodulation so Nokta got around the patent by using asynchronous narrowband demodulation, where the f in the prior equations are no longer the TX frequency but slightly offset. This means the demod outputs are no longer quasi-static DC values but are now slowly rotating vectors that must be un-rotated, which can be done using another software demod. Asynchrounous demodulation has been used before in analog detectors, the Fisher Gemini is an example.
                      patenting a software algorithm is difficult because patent offices generally consider algorithms and abstract ideas unpatentable, and you must demonstrate that the software provides a specific technical solution to a technical problem. ( modulation / demodulation/ phase detection is well known - its not a problem specific to metal detectors to be solved ). To make an algorithm patentable, it must be implemented in a way that shows a tangible, inventive contribution beyond just automating a known process​. Its arguable that narrowband and wide band demodulation techniques were already being done ( certainly for many years in radio circuits ) in analog hardware for metal detectors. Just because it is now done in software is not an inventive step ( moving from hardware to software ). If wooden houses are built with nails .... I can not ( reasonably ) claim a patent for building a wooden boat with nails.
                      Ferinstance if I "really" wanted to get around the BS patents published by some metal detector companies I would use a high precision programmable SDR circuit with some frontend adaptation circuitry to do exactly the same thing ( if not better ) without infringing patents as using an SDR for this purpose would not be inventive ( for modulation / demodulation / phase detection).

                      Comment


                      • #41
                        Further to the kind of unstated purpose of this project ( developing metal detector code with AI ).

                        I asked the AI what language it would use if two AIs were working together. Somewhat surprisingly it came up with a complete specification for a language simply called 1 ( ie the number "1" )
                        It also told me that because computer languages were written for humans they are somewhat confusing :
                        So the "1" language has implicit defined blocks ( input, output, requirements, implementation ) and all of the syntax code can be treated as program variables ( that means the code can modify itself ... if it wants to )

                        In about 1 hour it developed the complete toolset :

                        Theres a python bootstrap compiler, native compiler, VM, documentation and examples on my github site :

                        https://github.com/haxidermist/1lang

                        Click image for larger version

Name:	image.png
Views:	292
Size:	67.5 KB
ID:	442420

                        Comment


                        • #42
                          ....getting somewhere .. porting the FCMD into a STM32H750 chip with onboard 16 bit ADCs operating in oversampling mode.
                          Here is a pic of the ADC performance at ( 3.6 Mhz smps at 16x oversample ).

                          The DAC is outputting frequency tones.

                          The tones shown are 14 Khz 28 Khz and 42 Khz ... everthing is synchronous.
                          The noise floor is -96 db ... I can live with that.
                          The chip is connected via its USB port to a PC running a python script to show the FFT. Python is not fast so it is giving the wrong SPS rate ( its much faster ).

                          AI wrote all the code .. I just told it what to do.

                          Click image for larger version

Name:	image.png
Views:	233
Size:	600.9 KB
ID:	442972

                          Comment


                          • #43
                            Beware Paul!

                            Click image for larger version

Name:	image.png
Views:	204
Size:	212.8 KB
ID:	442975

                            Comment


                            • #44
                              CEO ?

                              Click image for larger version

Name:	image.png
Views:	203
Size:	151.4 KB
ID:	442977

                              Comment


                              • #45
                                multitone quadrature waveforms implemented ...

                                Click image for larger version

Name:	image.png
Views:	199
Size:	479.7 KB
ID:	442979

                                Comment

                                Working...
                                X