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

  • Just remember that a computer simulation is "A LOT" different that actually building a working detector!! What looks good on paper usually ddoes not work in the real world. I know Aziz is a smart guy, but have yet seen a actual detector that beats any detector already on the market. But that is no reason to stop trying for sure. I hope Aziz,or any of you blokes come out with something that beats any thing on the market. But a computer idea does not count.

    Aziz, I am sure you have built a detector by now. Why not compare it to a detector already on the market and show how good it is?

    Comment


    • Originally posted by Davor View Post
      Gladly, but last time I checked there were no easy ways to enter, and no free platforms to play with. I'm not a bit inclined to code some odd functions into some soon-to-become-obsolete device by means of typing in the raw code. No way! Life is too short to waste it on some very temporary devices.

      If you can finger some open platform I'd be delighted to play with it. Otherwise I'll stick to analogue and do my "coding" there. It is basically the same thing.
      As far as open platforms, are you guys aware that there is already published on the internet a working "Software Designed Metal Detector" (SDMD) released as GNU GPL that can be obtained from the following link?

      https://launchpad.net/qsdmd

      It is written as a mixture of C and C++ (as Aziz uses) so should be easy to read once you get past the Russian comments.

      If you want to try this, I would suggest that you use Ubuntu linux, the same as the original author (Alex Zorg) did. The way it is setup on launchpad.net you need ubuntu to be able to download it automatically, although you can read individual files from there without Ubuntu.

      After getting Ubuntu installed, I would suggest setting up the JACK audio kit along with qjackcnt to control it. Play with qjackcnt and make sure you get that working first, then follow the instructions from launchpad.net/qsdmd

      For a lot more documentation on the design of this, I would suggest that you follow through all of

      http://www.microsofttranslator.com/b...9ef70f68130fcc

      or if you understand Russian then

      http://www.md4u.ru/viewtopic.php?f=1...a84271fd1df642

      I don't understand Russian and reading the full thread was a bit of slog. Regardless, it was quite interesting. It even includes video of the author demonstrating the final working machine. You can also download older versions of the code from the thread but the one on launchpad.net/qsdmd seems to be the most up to date.

      One part that I find very odd is that the diagrams seem to indicate that the coils, both Tx and Rx, are directly connected to the inputs and outputs of the sound card! No further amplification, no filters on input, no overvoltage protection, no nothing but coil wire going straight to the sound card!!! I understand this for the sound card input from the Rx coil as I would expect the sound card to provide filters and overvoltage protection on its inputs but I would have expected at least an audio amplifier between the sound card output and the Tx coil.

      Using google I have found no references in this forum or any part of the English speaking internet to this project yet it seems to be complete along with sufficient documentation to implement easily.

      I am doing a similar project and expect to also use JACK audio connection kit plus qjackcnt on linux so I am just in the process of learning these. For the GUI interface he used Qt4 (as would most linux people programming in C++) libraries where I expect to use GTK++ and do almost all my programming in plain old C.

      If anybody tries this, I would like to hear how they got on.

      Ken

      Comment


      • Originally posted by WM6 View Post
        As I understand your preferred design is centre tapped (as on drawing).

        But you are onto build VLF, so to make coil, we need to know working frequency to tune it properly.
        Or better working frequency and TX and RX tank data (to incorporate and tune LC tank in coil).
        If you only purchase some in general suitable factory coil, your VLF will probably work, but with poor performance, cause of not precisely tuned (balanced).
        Hi WM6,

        the TX oscillator resonant frequency ( f(tx) ) is given by:

        f(tx) = 1/(2*pi*sqrt(Ltx*Ctx) ) , where
        Ltx = inductivity of the total TX coil (at both ends measured)
        Ctx = capacitor connected to the both TX coil ends

        The transmitter operating frequency can be easily measured in the FFT spectrum (with the highest spectrum energy density).

        The RX resonant frequency ( f(rx) ) is given by:
        f(rx) = 1/(2*pi*sqrt(Lrx*Crx) ) ,
        Lrx = inductivity of the RX coil (at both ends measured)
        Crx = capacitor connected to the both RX coil ends

        You have to make the RX resonant frequency either left or right the TX resonant frequency ( f(rx) = f(tx) +/- x ) to have a shallow phase shift. At f(rx) = f(tx), you have a very steep phase shift, which isn't convenient for us. Well, I usually make f(rx) = f(tx) +0.5 kHz .. +2 kHz (it depends on the Q of RX), which works quite good.

        And you need some residual signal on the RX line (not perfectly balanced) to minimize the phase noise for very faint signals.

        Yes, I prefer the center-tapped TX coils. It gives more power to the TX coil and hence more bang to the targets.
        And I prefer high frequency VLF, well, actually called LF (>30 kHz), which is more power efficient and more sensitive to small targets.

        More bang to targets can be achieved with simple TX coils, if you use very low inductivity TX coil (<150 µH). But commercial coils do have a much higher TX inductivity I think. They will work either of course.

        The only difficulty is the correct balancing of the damn coil.

        Aziz

        Comment


        • Thanks Ken! It is really very interesting and I didn't know it.
          (I will look at it later as the weather is fine here and I need some fresh air. )

          Cheers,
          Aziz

          Comment


          • Ultimate Target Banging.

            Hi all,

            how to get the ultimate strong target banging?
            Fact: We need more current flow through the TX coil.
            This is dependent on it's impedance (Z) or more dominant the inductive reactance (XL = w*L).

            How to get more current through the coil?
            1. Increase the source voltage (no go for the USB version, we have only +5V)
            2. Decrease the reactance of the TX coil
            XL -> 0, w*L -> 0
            w -> 0 (no go, we want to have more frequency, more frequency -> more induction)
            L -> 0 (ok, let's do it now)

            Solution: Auto-transformer TX coil with tap (1:N)

            Tp1 ----- TX-coil less turns ------Tp2-------Tx-coil more turns------highvolt
            Tp2 connected to TX coil tap. Tp1 and Tp2 connected to the full-bridge transmitter (all 4 mosfets in action).

            Tuning TX Capacitor:
            Tp1 ------------------------------CTx-----------------------------highvolt

            You can use for N = 2,3,4,...

            That's giving the ultimate bang to the targets. The LC oscillator is keeping power efficient too.

            Aziz

            Comment


            • Bugger me! The auto-transformer coil is making the detector controller the most powerful VLF detector (while consuming less power). I'm sure, I have to reduce the gain of the RX-amplifier.
              *LOL*
              Aziz

              Comment


              • You could use a Clapp configuration without taps too. A minor problem of such power boosting techniques is that they tend to reduce the tank Q and amplitude stability gradually becomes an issue. Since you can compensate this in software, just go for it.

                Comment


                • Originally posted by Davor View Post
                  You could use a Clapp configuration without taps too. A minor problem of such power boosting techniques is that they tend to reduce the tank Q and amplitude stability gradually becomes an issue. Since you can compensate this in software, just go for it.
                  Davor, no I don't think, that the Clapp configuration is flexible enough. The full-bridge mosfet version is much more elegant, power efficient, flexible and robust.

                  Oscillator instability/regulation isn't an issue with the software coding anymore. All negative effects can be compensated.

                  Bugger me!, the full-bridge version could also be fed by a single turn tap!!! But we don't have to exaggerate it. Even a low power transmitter achieves an impressive result. Generally speaking, the low inductivity TX coils have advantage over the high inductivity TX coils.
                  Cheers,
                  Aziz

                  Comment


                  • Aziz,

                    I notice that you have a resister and capacitor between the Rx coil and the sound card. I presume that this is a simple filter to help with the Nyquest / anti-aliasing requirements. The problem is that this RC filter adds a phase change / delay to the input signal and it is simply not needed. There is a filter on the input to the audio card and it does the filtering a lot better than what you can reasonably do. That is, it implements a sharp cutoff filter without the delay that you would normally expect from such a filter. The following is a simple description of an audio card's input filter:

                    "
                    Since aliasing is such a serious problem, and since we often have input signals with lots of upper harmonics, sound cards always incorporate anti-aliasing filters to drastically reduce any components above the Nyquist limit.
                    ......
                    Anti-alias filters must be carefully chosen in order to avoid other problems with your data. A filter which sharply reduces frequencies above its "cutoff" will usually also cause phase shifts which can alter the appearance of the waveform, even if they don't affect the spectrum. Further, transient inputs may provoke waveform overshoot and ringing behavior.

                    Naturally, the types of filters that are least prone to these problems also don't have very sharp cutoffs unless they are made very complex. Here complexity is measured by filter "order", which is the number of tuned stages required. Since each tuned stage requires precision components, and since the required precision (and stability over time) increases with the filter order, sound cards that used such filters would be quite expensive.

                    Fortunately, there is a way to use a simple, inexpensive filter together with more sophisticated digital processing to get results superior to even the most complex hardware filters. Modern sound cards typically use a sigma-delta ADC (formerly known as delta-sigma) that runs at a very high input sample rate, but with low initial bit-resolution. This high-speed, low-bits digital stream is then filtered and resampled by purely digital means to yield the final output, with high resolution at the stated sample rate (like 48000 Hz).

                    Because the initial sample rate is so high, in the hundreds of kilohertz to megahertz range, the Nyquist frequency will be far removed from the region of the input signals. A simple analog filter is all this type of ADC may need at its input, since there are usually no input signal components near these extreme frequencies.

                    The real work of removing problem frequencies (those that would have caused aliasing in a conventional ADC) comes during digital resampling to the lower rate. By then the signal is already in digital form, so a very sharp digital filter can be employed right in the ADC chip. In fact, it may be an inherent part of the resampling process, at "no extra charge".
                    "
                    The above was extracted from http://www.daqarta.com/dw_0haa.htm

                    hopefully helpful
                    Ken

                    Comment


                    • Originally posted by Humanise View Post
                      Aziz,

                      I notice that you have a resister and capacitor between the Rx coil and the sound card. I presume that this is a simple filter to help with the Nyquest / anti-aliasing requirements. The problem is that this RC filter adds a phase change / delay to the input signal and it is simply not needed. There is a filter on the input to the audio card and it does the filtering a lot better than what you can reasonably do. That is, it implements a sharp cutoff filter without the delay that you would normally expect from such a filter. The following is a simple description of an audio card's input filter:
                      ...
                      hopefully helpful
                      Ken
                      Hi Ken,

                      no, not at all. It hasn't to do with anti-aliasing filter at all.

                      LRX || CRx with Rx-resonance frequency set off the Tx-resonance frequency (frx = ftx +/-x) does cause a phase shift. The op-amp amplifier is doing it too.

                      The 100 Ohm series resistor with the anti-parallel diodes (1N4148 ) is just protecting the input of the sound card or the op-amp. There is some resistance required to limit the possible high EMI current in the diodes. The sound card should have its own high voltage protection circuit. But do you trust in the other engineers? No, I don't.

                      BTW, an additional phase shift on the RX/TX signal does not really matter. The detector software can handle it with ease.


                      I'm currently soldering the USB powered VLF controller version. I hope to report about it soon.
                      Cheers,
                      Aziz

                      Comment


                      • WTF!!!

                        Hi all,

                        I'm screwed! I'm totally screwed! *LOL*

                        Ok guys, the LC oscillator part is finally working. But I had to unlock the magic(tm) and great invention (yep, eat this: the "Aziz-Davor Oscillator(c)(r)(tm)" is one of the "big invention" in oscillator design *LOL* ).

                        Well, it didn't work the first time until I have realized, that the magic(tm) emitter inductor didn't work as specified. During the winding of the inductor, I must have made a short-cut and it didn't have its functionality finally. So I was badly disappointed about its high power consumption of 26 mA @ 5.2 V (full-bridge simple TX coil version) and the deformed TX coil sine wave voltage (highly distorted sine wave). The magic(tm) half-sine voltage at the emitter inductor wasn't there too.

                        Please don't make the same mistake as I made. Be gently and careful when winding the toroid inductor. The insulation of the wire must not be damaged (sharp edges of the toroid ferrite core can peel the insulation of the wire during the winding process, which in turn can cause a short-cut).

                        I have wound a new magic(tm) emitter inductor and it finally worked as specifed. The power consumption dropped to almost 7 mA @ 5.2 V (in the full-bridge simple TX coil version). That's a big difference.

                        The half-bridge version with the center-tapped TX coil consumes about 24 mA @ 5.2 V but has more bang to the targets of course. (with the fault inductor, it was around 82 mA!!!)


                        Cheers,
                        Aziz,
                        the magician

                        Comment


                        • Originally posted by Aziz View Post

                          The insulation of the wire must not be damaged (sharp edges of the toroid ferrite core can peel the insulation of the wire during the winding process, which in turn can cause a short-cut).
                          With some lacquer on ferrite body or adhesive tape around it before winding we can overcome this problem.

                          Comment


                          • USB Version Finished

                            Hi all,

                            I have finished the USB version finally. But I had to change some parts value:
                            The TX reference voltage attenuator: 100 kOhm -> 47 kOhm, 10 kOhm -> 4.7 kOhm.
                            Reason for this: the difference amplifier got high frequency oscillations. It even worked with it as the low-pass filter in the sound card didn't see it and the demodulation didn't get disturbed.
                            With lower impedances at the difference amplifier, the TX reference is now very clean (perfect sine).

                            But I can tell you, that the USB power source is highly noisy. The high frequency noise can be easily blocked by the power input inductor and the 10 µF capacitor but the low frequency noise (regulation noise) does modulate the TX oscillator and it can't be filtered with low dimensioned parts value (the capacitive load is limitted to 10µF in the USB specification however and we can't make the first inductor very big).

                            The only chance to tame the USB power source noise is best done in the demodulation part. I'll test a new code example and will see how its working. But the battery powered case is very very quiet (only the battery voltage diminishing drift is there and can be tamed in the demodulation part easily too).

                            Oh yes, the detector sensitivity went up!
                            Power consumption:
                            ~23 mA @ 5.1 V (USB) for simple TX coil version
                            ~42 mA @ 5.1 V (USB) for center-tapped high power TX coil version

                            The op-amps and DC/DC converter are consuming some power.

                            Cheers,
                            Aziz

                            Comment


                            • USB VLF Controller Pics

                              This is the running USB VLF Controller. Actually operated with 4 x Ni-MH battery pack.
                              Click image for larger version

Name:	USB VLF-OSC-DetectorController-prototype-01.jpg
Views:	1
Size:	182.2 KB
ID:	334028

                              (It's the center-tapped TX coil configuration. The lower section (n-mosfets) of the TX oscillator isn't working - the jumpers aren't shorted. )


                              This is the scope output of the controller outputs:
                              Click image for larger version

Name:	USB VLF-OSC-DetectorController-prototype-Scope-02.jpg
Views:	1
Size:	120.7 KB
ID:	334029

                              (I have just filtered the output of the RX amplifier by connecting a parallel capacitor to the 1 kOhm feedback resistor in the amplifier. ) .

                              Cheers,
                              Aziz

                              Comment


                              • Do you remember my external 8.5V voltage regulator module?
                                I have connected it into the power chain and plugged a 9-10 V battery pack to it.

                                The sensitivity....

                                The VLF controller can be operated at high input voltages as well of course.
                                Power consumption:
                                77 mA @ 10 V (8 x Ni-MH battery pack) with the center-tapped TX coil configuration (more bang to the targets) . Oh yes, the TX reference/RX voltage diminishing effect isn't visible with the 8.5V voltage regulator of course. Only noise and temperature drift effects.

                                Aziz

                                Comment

                                Working...