Announcement

Collapse
No announcement yet.

My AGD analog detector work

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

  • #61
    I use STM micros but have never used the HRTIM. Most timers have 4 channels so it's quite easy to create 4 synchronized clocks. Ferinstance, you should be able to create TX and RX1-3 with one timer. I use the DMA burst feature to create complex waveforms, see Ch 5 in the app note below. In some cases you can simply edit the CCR registers on-the-fly and move edges. In other case you may need to do the editing during a DMA interrupt to avoid glitching. The STM timers are quite powerful and flexible, almost ideal for metal detector timing.
    Attached Files

    Comment


    • #62
      Thank you for pointing me to the Timer Cookbook. I will read the section you mention and do some testing.

      I mostly wanted to use HRTIM so that I could generate very fine pulse edge movement for adjusting internal required delays. I hoped that by doing this with 100% digital logic that it might be able to overcome any potential drift due to temperature changes that could effect the alignment between the received signal and the gates closing and opening times. Along with such a change I would replace the high grade linear audio pots that handle most of pulse width settings with rotary 270 degree rotation digital encoders. The internal offsets required for handling signal routing delays would be preset to a default value or measured upon power up at some intervals and set automatically. The internal pulse delays are the most critical and times required there are quite small and thus require very fine pulse position adjustment ability in order to obtain the best possible detect sensitivity.

      As far as being able to adjust the timer pulse edge times I was hoping to get a absolute minimum of 0.01us steps but really looking for 0.003us. Such a small time period is required to allow for setting of the internal delay times which I expect will run from 0.05us for the first signal gate to 0.3us for the final two gates before heading into the sample and hold function block.

      Shifting the pulse leading edge to the required time positions in such small steps seemed like a good job for the STM32G/F HRTIM timer and think that it would be close to ideal if I could obtain pulse adjustment steps of 0.003us when adjusting for the expected internal time offsets of 0.05us to 0.3us. I think that the HRTIM timer is likely capable doing this or better when used with its internal 170Mhz clock multiplier, which if my memory serves me right is up to 32x or up to 5.4Ghz. I actually like to run the SMT32G474 right now at 160Mhz for the ease of frequency division and pulse width calculations.


      Comment


      • #63
        @ Auto-Mation-Assist,
        from everything seen so far, what have you published; it is clear that you are very dedicated, meticulous and thorough in your work.
        Why not use all those good qualities at a higher level?
        Direct sampling PI, all in code, almost nothing (except necessary) in hardware.
        I think that this would lead to an easier and better solution.

        Because just looking at your work so far is "terrifying"!
        Too much hardware, a lot of components that are not easy to get anywhere and even less cheap.
        A lot of delicate "points" on the design that have to be adjusted very precisely. A very complex and demanding job.
        It seems discouraging and repulsive even to a more experienced self-builder, let alone to the majority of beginners or not too experienced hobbyists.
        With such works, only the author and someone who is personally involved in parallel can reach satisfactory results at the end.
        On the other hand, modern technology provides a lot for a little.
        There are advantages to everything.
        Saving time, materials, money, work, nerves and in the end you always get exactly what you wanted (within the limits of the technology used).
        This is a really nice attempt, worthy of interest.
        But not in tracking and trying to replicate.
        Anyone who is even more experienced in self-builds like this; he knows how many obstacles and pitfalls there are and that there is always a
        much higher chance that the results will be disappointing in the end.
        I first like the analog approach.
        But with projects like this, I think the requirements are too high to work with that technology nowadays.
        When at the same time we have very accessible development systems with which everything is done easier,
        faster and much cheaper and the final result is always predictable.
        ​​

        Comment


        • #64
          Yes I agree with most of what you say but that was not the point of this project. This project was for me, to see how well a analog PI detector can perform. All three of the detectors I have built work fine for me and I'm happy with the results. -- But always thinking about the next project.

          Right now I'm working on developing code my proposed display using STM32CubeIDE, freeRTOS, and 240x320 TFT display.

          Comment


          • #65

            Comment


            • #66
              Dear Auto,
              Thank you Sir for sharing this beautiful analog detector. I have a question, with so many channel I don't see manual adjustment for ground balance purpose or do I miss it? How it perform in real ground?

              Comment


              • #67
                Originally posted by Op04 View Post
                Dear Auto,
                Thank you Sir for sharing this beautiful analog detector. I have a question, with so many channel I don't see manual adjustment for ground balance purpose or do I miss it? How it perform in real ground?
                Ground balance is done automatically by the feedback loops that adjust the DC offsets from several points in the receive signal chain and applied to the front end to establish a zero reference point under any normal operating condition. I have not found the need to have any sort of manual adjustment which I think would actually degrade performance. This method is not without difficulties due to the time constants required by the the normal coils sweep rate of the round. When very large changes in receive signal due to large buried material is encountered a detector overload may develop. In such a condition there is no way to apply compensation until the overload condition is cleared and things settle down to normal. This may take 20 seconds. The detector is very sensitive but if it proves to be too sensitive the the front end gain and detect sensitivity controls can be adjusted to lower the overall gain. It also has to option to adjust the percentage of the signal from each channel that is sent on to the VCO. The second channel signal can be added or subtracted.from the primary channel.

                The OP amps operate from +/- 10vdc precision regulated power supplies and thus have considerable headroom. Due to the sensitivity of the detector it is possible to cause a severe overload which of course will take some time to settle back down, typically around 20 second if I recall correctly due time constants of the compensation circuitry. Under normal operating conditions this is not a problem.

                I have a bit of a problem with logging on since I run into the message trying to do so "The administrator has banned your IP address". I was thinking about just posting to my own web site if this continuous to be a problem. Been working around this problem for a while.

                Comment


                • #68
                  I have been slowly working on a concept for the next generation of this the AGD detector. I have more or less decided to break the main board of the detector into two separate circuit boards that would be mounted back to back. One board will handle the transmit circuity. the RX front end, present sample and hold detectors , power supplies and microprocessor to hand the gate timing and multichannel DA conversion. I don't see a real need to any complex digital signal handling, perhaps just a phase difference measurement between the two channels. This proposed circuit could be used by itself to feed its signals to other kinds of boards. One thing that I have been thinking about a bit, and being the designer of high quality audio amplifiers in the past is a push pull drive to the coil and use center tapped coils. I Most the circuitry that I presently use has already been laid out for the proposed circuit board to see how it would fit. Only the processor related parts needs to be added which will likely require a lot of changes.

                  Since the majority of the AGD detectors parts are related to signal handling after the sample and hold circuits they will be placed on the second board but handled by a second microprocessor. Thus all the functions that are presently all analog, such as low pass filters, VCO drivers, the VCO itself and metering circuit would be handled by the processor. It would also have the ability to route signals to a display and display those similar to a multichannel oscilloscope. Typically a class D audio amps are used these days and may be beneficial if it does not create a interference problem. But an audio amp may no be required since to can be replaced by wireless connectivity and use remote amplifiers. One of the big draw backs has been dealing with the combined power/headphone cable and keep and being tied to it.

                  I'm working on this proposed project mostly to implement a reduction in parts count to make assembly much easier. I do not believe that this will make substantial difference in performance.

                  I'm interested the the CCPI coil driver that has been developed and will likely do some experiments with it and may even try to recall the circuity that I developed for my capacitor discharge ignition system in the early 70's. I have been doing a lot of preliminary work on getting to know the STM32 processors and the tool chain required to do the programing and have it all set up now. My plan is to use register based C programming where ever possible since I think that this will give faster processing times when compared to using HAL functions. I have also experimented with freeRTOS and Azure but will likely not use either. If later on I decide to use a real time operating system it would likely be freeRTOS.

                  Comment


                  • #69
                    Originally posted by Auto-Mation-Assist View Post

                    Ground balance is done automatically by the feedback loops that adjust the DC offsets from several points in the receive signal chain and applied to the front end to establish a zero reference point under any normal operating condition. I have not found the need to have any sort of manual adjustment which I think would actually degrade performance.
                    Wow.. Amazing Sir, I understand why it need such specialty chips, many thanks for delivering this project for us! I also tried thin sampling you did it was more detailed "eye" I believed you've took plenty hours experiments and sharing with us here, may God bless you Sir.

                    Comment


                    • #70
                      I decided to see what it takes to utilize a standalone 24 bit ADC in to the AGD detector and developed a preliminary new front end to satisfy the differential input requirements of the 24 bit ADC that I choose to experiment with. It is the AD4030-24BBCZ that came out several years back and plan to stream its output via SPI interface to a STM32 based MPU. I think that this is workable and I'm working on getting my test set up completed to determine if this would actually be the best way to digitize the voltage levels of the received signal.
                      The AD4030-24 or its dual version AD4630-24 are both 2MSPS devices but the drawback to me is all the power supply voltages that are required to make this work.

                      It does not take much DC offset or noise at the inputs of a 24 bit ADC before accuracy starts to get lost. I my goal is to try to reach 24 bit accuracy by using the built in features of the AD4030-24 2MSPS ADC. I expect that the sampling period will have 40us to do its sampling with 160us between sampling periods. Values written to an array and sorted out into the two or more desired channels in a STM32 MCU

                      My original ADG detector uses two precision low noise +/- 10 Vdc regulators. To make a good interface for the ADC it looks like +/- 6 Vdc, + 5 Vdc, 2 ea at 3.3 Vdc, +2.5 Vdc, -1.6 Vdc and -6 Vdc. Thus power supply complexity is increased but the potential of eliminating most of the analog stages that follow the current sample and hold circuits could be eliminated. The control panel would also need changes since the controls on it are also analog based. So it looks like a complete new design is going to be in the works for the receive board.

                      A simpler option is not to use the 24 bit stand alone ADC and to just digitize the outputs of the two present sample and hold circuits since they are plenty good enough to use as is. Then it becomes much easier to digitize the much slower moving signal and any 12 bit ADC with at least 2 channels could be used. Many STM32 chips would be suitable. But I got 24 bits running around in my head and want to investigate that further.

                      It is also important to define what the goal is to turn the receive signal into something that can actually be used as an alert signal that something resembling metal has been found. In my opinion the alert signal should not be to slow to build up, or linger on past the pin point to long, or be a unintelligible mess of various tones or noises.

                      1: For a alert signal I have found that a simple audio tone is the best for me. Presently a fairly low distortion analog VCO takes care of this in the AGD detector but this would need conversion to a PWM filtered signal if an ADC is used.

                      2: In conjunction with the alert tone the second best being an old style mechanical signal strength meter with adjustable gain. The AGD detector has built in circuitry to drive such a meter movement and can switch between two gain settings. Tying to use LED's for this purpose is useless but simulation of a meter scale in a LCD display may not be if the update rate is fast.

                      For my present development setup for working with the 24 bit ADC I decided to invest in the Analog Devices Eval-AD4030-24 24bit 2MSPS evaluation board and also the ZedBoard which in conjunction with Analog Devices ACE software should allow me to see what is going on inside the AD4030-24 chip along with other functions. The AD403-24 eval board comes with a microSD card and adapter to plug into the ZedBoard and contains ADI Kuiper Linux configured to communicate with the AD4030-24 bit ADC. The ACE software installs on a PC.

                      Recently Micro-Cap spice simulator has become free and QSPICE is a newly developed simulator prototype is also available for download and has many features. I understand it will be released in July but presently available for testing as a proto version. It may well become the new standard for simulation. The designer is a well know for his prior work with spice type simulators. Check it out.

                      This is my development board setup for this 24 bit project. Now waiting for test cables to arrive.

                      Click image for larger version  Name:	24-Bit-Dev.png Views:	0 Size:	409.0 KB ID:	418035

                      Comment


                      • #71
                        I'm still waiting for cables to arrive before using the development board in the picture above and have run many simulations using available ADC drivers including some of my own design an not happy with any of them in regards to DC offsets and differential signal balance to picro volt levels. The requirement to do level shifting in order to interface with the ADC present additional problems with signal stability. Within the ADC that I choose to work with there are features that I think that are specifically designed to overcome performance issues with ADC drivers and I think that this actually points to a interface incompatibility between the design of the ADC and any proposed driver.

                        The ADC is very sensitive and adding anything in front of it de-gradates the ADC performance. Since there is circuitry required to be added it front to utilize the ADC which all adds noise it is a down hill slope and thus the useful range of the ADC will likely just be limited to 16 bits under the most favorable conditions. On the development board for the ADC (the small board in the picture above) there are actually two types of ADC drivers that are delectable via jumpers. There main function is to do signal level shifting of the signal to what the ADC requires but neither is appears to be good enough to truly maintain 24 bit accuracy.

                        In my case I need a ADC that operates from plus and minus 10 volts and has its zero input value actual ground level potential. This is already built into the detector in the form of a sample and hold circuit and its output can be run into a lower bit count ADC.

                        The most important thing of the AGD detector to be able to detect very small gold is how fast the coil decay voltage is brought down to a usable level and further amplification to a usable levels without issues of saturating any amplification stage and to also mainlining a zero volts reference point to make level comparisons to. It you look at the TX board of this detector you will see that it has a adjustment that is used to slide up and down on the coils decay waveform. It is adjusted to the point that the decay waveform presents as being the best in relation to decay time for maximum sensitivity to detect small objects. In order to have maximum sensitivity the coil needs to provide a decay curve that is fast and with slight under damping. A decay near 3us has shown to be good for me. A fraction of a microsecond here can reduce small particle detection capability substantially. The second thing that effects sensitivity is time alignment of the received signal as it is being past through the receive signal chain. The part of the receive signal must arrive at same time as we look for level changes the time the gates close. Refer to the supplied diagrams for this. An additional thing to consider is the stability of the trigger signal for the gates. Jitter here will increase noise levels due to the jitter changing the automatically established detect zero reference point.

                        I drifted away from my 24 bit idea since I want o try to improve the control of the coil decay time. Early on in this project I made some tests of using various methods to control the decay time of the decay of the magnetic field of the coil. Considering all I found that the best was still just a resistive load, but found that for best result the value was quite critical and that a very small change in resistor value can make a significant difference in the ability to detect small gold. Temperature related changes also effect the value of the required resistor as the system as a whole, including the coil warms up. It would be nice if coil decay current or voltage could be controlled in a more controlled fashion and have tried this in the past but was never completely satisfied with the results. I plan to revisit this now and see is any improvements can be made by using some electronic circuitry to control the decay waveform and minimize the time it takes to do so. One of the problems with this is that the control must release itself before the receive signal is to be looked at by the receive circuits. This will require injecting a test signal into the coil with ad sine wave at about 100 Khz and looking at the time when that signal becomes available after the decay control circuits release control. Its easy to make it look like a circuit reduced decay time when in actuality it is also loaded down the desired receive signal. That would be anti productive.

                        I recall that there has been some work done in the past in regards to constant current coil decay by others as well. I will see if I can find some info on their work.

                        I'm going to park the 24 bit project for now since all indication are that it would be limited to 16 bits at best using currently available parts.

                        Comment


                        • #72
                          Originally posted by Auto-Mation-Assist View Post
                          I'm still waiting for cables to arrive before using the development board in the picture above and have run many simulations using available ADC drivers including some of my own design an not happy with any of them in regards to DC offsets and differential signal balance to picro volt levels. The requirement to do level shifting in order to interface with the ADC present additional problems with signal stability. Within the ADC that I choose to work with there are features that I think that are specifically designed to overcome performance issues with ADC drivers and I think that this actually points to a interface incompatibility between the design of the ADC and any proposed driver.

                          The ADC is very sensitive and adding anything in front of it de-gradates the ADC performance. Since there is circuitry required to be added it front to utilize the ADC which all adds noise it is a down hill slope and thus the useful range of the ADC will likely just be limited to 16 bits under the most favorable conditions. On the development board for the ADC (the small board in the picture above) there are actually two types of ADC drivers that are delectable via jumpers. There main function is to do signal level shifting of the signal to what the ADC requires but neither is appears to be good enough to truly maintain 24 bit accuracy.

                          In my case I need a ADC that operates from plus and minus 10 volts and has its zero input value actual ground level potential. This is already built into the detector in the form of a sample and hold circuit and its output can be run into a lower bit count ADC.

                          The most important thing of the AGD detector to be able to detect very small gold is how fast the coil decay voltage is brought down to a usable level and further amplification to a usable levels without issues of saturating any amplification stage and to also mainlining a zero volts reference point to make level comparisons to. It you look at the TX board of this detector you will see that it has a adjustment that is used to slide up and down on the coils decay waveform. It is adjusted to the point that the decay waveform presents as being the best in relation to decay time for maximum sensitivity to detect small objects. In order to have maximum sensitivity the coil needs to provide a decay curve that is fast and with slight under damping. A decay near 3us has shown to be good for me. A fraction of a microsecond here can reduce small particle detection capability substantially. The second thing that effects sensitivity is time alignment of the received signal as it is being past through the receive signal chain. The part of the receive signal must arrive at same time as we look for level changes the time the gates close. Refer to the supplied diagrams for this. An additional thing to consider is the stability of the trigger signal for the gates. Jitter here will increase noise levels due to the jitter changing the automatically established detect zero reference point.

                          I drifted away from my 24 bit idea since I want o try to improve the control of the coil decay time. Early on in this project I made some tests of using various methods to control the decay time of the decay of the magnetic field of the coil. Considering all I found that the best was still just a resistive load, but found that for best result the value was quite critical and that a very small change in resistor value can make a significant difference in the ability to detect small gold. Temperature related changes also effect the value of the required resistor as the system as a whole, including the coil warms up. It would be nice if coil decay current or voltage could be controlled in a more controlled fashion and have tried this in the past but was never completely satisfied with the results. I plan to revisit this now and see is any improvements can be made by using some electronic circuitry to control the decay waveform and minimize the time it takes to do so. One of the problems with this is that the control must release itself before the receive signal is to be looked at by the receive circuits. This will require injecting a test signal into the coil with ad sine wave at about 100 Khz and looking at the time when that signal becomes available after the decay control circuits release control. Its easy to make it look like a circuit reduced decay time when in actuality it is also loaded down the desired receive signal. That would be anti productive.

                          I recall that there has been some work done in the past in regards to constant current coil decay by others as well. I will see if I can find some info on their work.

                          I'm going to park the 24 bit project for now since all indication are that it would be limited to 16 bits at best using currently available parts.
                          The diodes reverse recovery plays a role in ultra-early sampling.
                          There are other factors, like Litz wire, low number of turns in the TX coil, low power TX etc. that can help achieving a very short delay to the first sample.
                          The shielding of the coil, the right kind of cable, the choice of Mosfets are other factors.
                          The main qquestions are: how small a gold nugget do you want to find and how deep?

                          Then there are the possibilities to look at more advanced PI technologies, like bipolar CCPI etc.

                          Comment


                          • #73
                            Thank you for your input. I'm very familiar with all the requirements.

                            Some months back when I started thinking about adding a MPU to handle some functions in my detector I decided to change the input voltage clamp on my receive board. The reason for this was the part that I used was very small and extremely difficult to install and I also wanted a part that was able to handle higher pulse currents. The coils that I'm using provide a kickback voltage near seven hundred volts and are not flat topped since the mosfet coil driver on the TX board is rated for a higher voltage than 700 volts. To drive the coil I'm using my TX board version AGD23.3. Its diagram is available in prior posts.

                            I have spent many days over the past years testing all sorts of methods to reduce coil decay time and nothing has worked better than just a properly selected resistive load when all other things are also correct and proper parts are chosen. The one that is hardest to work around is the voltage protection clamp itself. Coils do not like to see their load changed in the last few hundred millivolts of their decay slope due to the diodes no longer conducting and this can be clearly seen even on simulations. I presently only work with factory coils but would love to change the cables going to my COILTEK Mono Elite coils someday to potentially reduce capacitance but not bad enough right now to take the coils apart or to cut the cables off. Perhaps someday as they age more.

                            I'm still doing all my testing with my 0.015 gram piece of gold swinging on a golf ball and the modification I proposed for the next generation of the AGD has proved to be worthwhile. The sensitivity increase was substantial. Picture my test piece of Alaskan gold is below and it swings about 0.75 inches above my 9 inch Elite Mono coil that I use for most of my testing. I have two of these coils and both give similar results. Removing the gold and swinging the ball has no effect.

                            Click image for larger version  Name:	TheGold.png Views:	0 Size:	290.5 KB ID:	418989

                            The modification on the AGD.23.4.A receive board involve changing the present diode array voltage clamp to two separate MMBD452LT1G diode arrays in parallel. These diodes clamp at a lower voltage. Under normal operating conditions with TX pulse width set to 36us and the coil driver operating from a 14.4 VDC source. The first stage recovers from its inductive kickback overload 0.700 us before the RX gate at its output is enabled as measured at TP4 on the attached diagram. The replacement diode arrays are labeled DA1 and DA2. Below are some pictures on the old diode array and the test new ones. My diagram shows it as I would install it on the next generation PCB.


                            The old DA1 diode array

                            Click image for larger version  Name:	Old-DA1.png Views:	0 Size:	629.6 KB ID:	418990

                            The replacement test diode arrays - Not pretty but good enough for testing

                            Click image for larger version  Name:	New-DA1-DA2.png Views:	0 Size:	608.4 KB ID:	418991

                            New schematic for page 2 of the AGD.23.4.A receive board is attached below. There are three parallel 20K 1 Watt metal film resistors before the diode arrays and have a loss of about 0.03 dB on the receive signal. Very high quality metal film resistors are used for minimum noise contribution. On future generations there will be four resistors in parallel.

                            Comment


                            • #74
                              0.015 gram = what is the size of this piece of Alaskan gold. Take Look at this video

                              https://www.youtube.com/shorts/vUPJmrlSTlg

                              I think I can get 1 1/4 inches.
                              ---------------------------------------------------
                              Alaska Gold Detector.​ = it does mean it is respond only to gold ?

                              Comment


                              • #75
                                Pito,

                                My micrometer indicates that the approximate diameter is about 0.06 inch with thickness of about 0.01 inch and is a good size for testing with a 9 inch diameter coil at 3/4 of an inch. I look at the amount of deflection on an mechanical meter movement and also need to hear a loud and clear change of pitch in the audio signal. The 3/4 inch is not the detection limits for this particular piece of gold with a 9 inch diameter coil. Alaskan gold is usually very small and my detector is able to find very small hot rocks, super small junk metal and fairly small gold. Mostly in that order. For real small gold panning is by far the best but not real productive. I usually keep a small piece of gold like this in my detectors cover for checking that the detector is working as expected while in the field.

                                The do see that the sensing head you show in your video is not like the 9 inch flat wound coils that I primarily use for testing. I'm always interested in circuit design and wonder if you posted the schematics of the design of your detector and coil construction? If you have posted can you give me a link to your project?. Nothing is better then having all of our own projects completed and performing very well.

                                Comment

                                Working...
                                X