Announcement

Collapse
No announcement yet.

VLF MD with digital signal processing : Bee-Buzz 1

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

  • ivconic
    replied
    I think I understand the reasoning behind some of your views.
    Keep in mind that 40 years ago you didn't have super low power opamps with super good S/N ratio available.
    Today the situation is different.
    Nowadays you can do much more with 24bit if you have a high end opamp frontend with incredible speed and S/N in front of it.
    You can literally "hear" signals below the noise level.
    ​

    Leave a comment:


  • Atul Asthana
    replied
    Originally posted by ivconic View Post
    When I translate some of the statements into my simple practical language from experience with detectors in the field; I can see that most of your points are actually very accurate.
    ...............
    Some time ago we had an extensive debate and various thoughts on the topic of choosing a processor and ADC for a PI detector on another thread.
    In the end, the conclusion is the same; good performance also requires good hardware.
    I have not told you anything new with this!
    ​
    My old signal processing notes, 40 years old, tell me that :

    Sampling a 70 dB dynamic range signal with a 24-bit ADC is a massive overkill. It provides no significant advantage in terms of signal accuracy and comes with the cost of increased data size and processing load. A 12-bit or 14-bit ADC is a more appropriate and efficient choice for this application. The focus should be on minimizing noise in the analog front-end rather than increasing the ADC's resolution beyond what is necessary.

    Consequences of Oversampling with High Bit Depth:
    1. Wasted Resolution: You are using far more bits than are needed to represent the signal's dynamic range. The extra bits will essentially represent noise or insignificant variations in the signal.
    2. Increased Data Size: 24-bit samples require significantly more storage space and processing bandwidth than 12-bit or 14-bit samples. This increases memory usage and computational load.
    3. No Improvement in Signal Accuracy: Since the signal's dynamic range is limited to 70 dB, the extra bits from the 24-bit ADC do not provide any additional information about the signal itself. The signal is still limited by the noise floor, which determines the smallest detectable change in the signal.
    ​Thus,
    Sampling a 70 dB dynamic range signal with a 24-bit ADC results in quantization of the signal with significantly more precision than is necessary. You cant improve the quality of the 70 dB signal this way. Here's a breakdown:

    Theoretical Dynamic Range:
    • A 24-bit ADC has a theoretical dynamic range of approximately 6.02 * 24 + 1.76 ≈ 146 dB.
    • Your signal has a dynamic range of only 70 dB.
    ​For a 70 dB dynamic range signal, a 12-bit or 14-bit ADC is sufficient. Using a lower-resolution (than 24 bits) ADC will:
    • Reduce data storage and processing requirements.
    • Simplify the hardware design.
    • Potentially reduce power consumption.
    ​And these ae some goals of this project.

    Leave a comment:


  • Atul Asthana
    replied
    Originally posted by Carl-NC View Post
    The first digitizing detectors placed the ADC after the demods, so that it sampled a baseband signal which had additional gain besides just the preamp. All of the designs I'm aware of used an ADC with an ENOB of 14-16 bits. When you direct sample, you need an ADC with even higher precision because you no longer have the demod and extra gain stage. You can do it with a 12b ADC but you will either lose faint targets or you will overload on both strong and moderate targets. If you want good depth, then you use extra preamp gain and overload on more targets. But that also means you will overload on bad ground. I don't know of a single modern direct sampling design that is not using a 24b ADC.

    Personally, I think it's a good idea to start with the micro's 12b ADC. It's much easier to work with. But don't expect it to do much more than demonstrate feasibility. It's probably not gonna make a good field hunter.
    Yes, this is the reason its called an experimental concept.

    it will not rival the commercial detectors, but I feel, it will be better than the analogue ones.

    With stm32, I csn not go below the noise floor, however, as time passes and better processors become affordable fo hobbyists, I can try out techniques for low noise systems.

    I was also searching for documents on maths and physics of the vlf metal detectors, but couldnt find much in public domain, may be I mssed out on some patents.

    Leave a comment:


  • ivconic
    replied
    When I translate some of the statements into my simple practical language from experience with detectors in the field; I can see that most of your points are actually very accurate.
    I'm primarily focused on the last couple of posts from Carl and Atul Asthana. Lots of truth in the last few posts and good thinking.
    What I mean specifically, I will translate it into "my language".
    Quest Q40 which I recently got and really like; it goes into saturation quite often even with medium targets. Directly for the reasons Carl just wrote. It works well on medium and large coins, but it practically does not see small coins.
    And on the other hand I have the ML Vanquish 340 which is superior (even to the Deus 1) on the smallest coins. But it is difficult to recognize some irons with it.
    Atul... I think you mentioned somewhere earlier that you would like to take a closer look at the ML Equinox (or maybe I'm wrong, maybe I got it mixed up)... I think it would be a very good idea to get either the Equinox or the Vanquish
    on one side and some detector like Quest (X5 is a good choice, Q40 is even better but rarer). Because that's where you'll best see in practice the two solutions mentioned here.
    As for the audio codec... the ML X-Terra of the older series (I don't know if this is the case in the newer series) uses exactly the audio codec of the older generation WM8731.
    I used the WM8501(DAC) and WM8738(ADC) audio codec circuits a few years ago for some audio applications.
    The WM8738 (ADC) circuit, although old, impressed me with its performance. (I don't mean what is written on paper, but what I saw in reality.)
    What is a big obstacle for me, as an amateur with limited possibilities, is the interface modes at that chip, which limits the choice of modest processors that I have.
    If you devote a modest processor to the connection with the codec; you don't have many resources left for other jobs (driving an LCD, TFT, scanning a keyboard, etc.)
    Not to mention that there is practically no chance to implement any of the "harder" filters in the code.
    Some time ago we had an extensive debate and various thoughts on the topic of choosing a processor and ADC for a PI detector on another thread.
    In the end, the conclusion is the same; good performance also requires good hardware.
    I have not told you anything new with this!
    ​

    Leave a comment:


  • Atul Asthana
    replied
    Originally posted by Carl-NC View Post
    The first digitizing detectors placed the ADC after the demods, so that it sampled a baseband signal which had additional gain besides just the preamp. All of the designs I'm aware of used an ADC with an ENOB of 14-16 bits. When you direct sample, you need an ADC with even higher precision because you no longer have the demod and extra gain stage. You can do it with a 12b ADC but you will either lose faint targets or you will overload on both strong and moderate targets. If you want good depth, then you use extra preamp gain and overload on more targets. But that also means you will overload on bad ground. I don't know of a single modern direct sampling design that is not using a 24b ADC.

    Personally, I think it's a good idea to start with the micro's 12b ADC. It's much easier to work with. But don't expect it to do much more than demonstrate feasibility. It's probably not gonna make a good field hunter.
    Sure, no harm trying. I did not aim this design to do wonders, thats why its ecperimental concept.

    However, in this methodology, I cant go below the noise floor.

    After we try this one out, I will try other methodologies, specially focussed on winning over the noise. But of course, the stm32 will be insufficient.

    Leave a comment:


  • Carl-NC
    replied
    The first digitizing detectors placed the ADC after the demods, so that it sampled a baseband signal which had additional gain besides just the preamp. All of the designs I'm aware of used an ADC with an ENOB of 14-16 bits. When you direct sample, you need an ADC with even higher precision because you no longer have the demod and extra gain stage. You can do it with a 12b ADC but you will either lose faint targets or you will overload on both strong and moderate targets. If you want good depth, then you use extra preamp gain and overload on more targets. But that also means you will overload on bad ground. I don't know of a single modern direct sampling design that is not using a 24b ADC.

    Personally, I think it's a good idea to start with the micro's 12b ADC. It's much easier to work with. But don't expect it to do much more than demonstrate feasibility. It's probably not gonna make a good field hunter.

    Leave a comment:


  • Atul Asthana
    replied
    the ADC debate :

    I have a feeling that the audio codecs are being used because they are mass produced, cheap, very well documented and are available a plenty, ond not because this grade of vlf md needs such a high resolution and such a large dynamic range.

    the dynamic range of the response from the target, and thats what I was trying to calculate with 100 mW of power, remains not better than 1 micro volt to 4 mV (for a very large target, physically visible on the surface) as response in the receiving coil, this is around 70 dB, thats 12 bits. Even if you were to consider an error of 4, that makes it 14 bits.

    Actually, careful design and alignment of the coils + amp in a commercial detector, still has a noise floor of around 1 microvolt or above. provided the opamp is very low noise and adds minimum of its own noise, the ground is very quite and temperatures are low + there are no electrical power lines nearby.

    This low noise floor is crucial for detecting weak target signals, enabling greater detection depth, smaller target detection, and improved target discrimination. Factors influencing noise include detector design, operating frequency, ground conditions, environmental EMI, and coil design. Minimizing noise is a key design consideration for maximizing detector sensitivity and performance.

    So, there isnt much to gain by increasing the dynamic range of the digitisation, when the signal itself has, at best, a dynamic range of 12-14 bits above the noise floor.

    Kindly opine.

    Leave a comment:


  • ivconic
    replied
    I have a few blue pills in the pile, they have been unused for a long time.
    The technology at that moment when I got them; developed too fast, there was no time, I immediately came to a couple of ESP32 modules and immediately after that to a couple of Nucleo 144.
    So I don't know where I will go first and what I will do first!
    How to choose the right development platform?
    None of the processors I have, despite their great features, have a good enough ADC.
    And that is a stumbling block when I think about using such a processor for these purposes.
    However, I will always welcome any initiative based on one of the processors I already have.
    Because they are sitting in a pile unused anyway.
    ​

    Leave a comment:


  • Marchel
    replied
    Hi

    I am also working on a metal detector with STM32, initially I used STM32H7A3 processor in my project which has 16bit ADC but then I upgraded to STM32L476 which has faster ADC and I didn't notice much difference between 12 and 16bit ADC. In my metal detector I do 16 samples and the resampling is 64 times.



    Leave a comment:


  • Atul Asthana
    replied
    yes, you are right,
    The entire process will have to be interrupt driven, since like you say, all the sampled points have to be binned separately.

    in writing my own task manager, I will know the overhead and will be able to synchronise everything. with rtos, I dont know the load and the synchronicity.


    From what I know,
    Unless a certain amount of power is transmitted, no current will be induced in the target or its surrounding medium.

    In fact, in an md, most of the transmitted power is wasted, being absorbed by the surrounding medium. This is why detecting deeper targets is challenging—most of the transmitted energy and the target-generated response is dissipated in the medium.

    The surrounding medium is typically resistive, with minimal phase shift—this constitutes the ambient response. When modeling the target and its surrounding medium, it can be represented as a combination of an inductor, capacitor, and resistor. For this combination to affect the receiving coil, it must generate energy, which originates from the magnetic field created by the transmission.

    In its simplified form, The system can be understood as a transformer with a very lossy core, the transmission (Tx) coil acts as the primary winding, the medium and target function as the core, and the receiving (Rx) coil serves as the secondary winding. In this analogy, the Tx coil is the source, and the Rx coil is the load, where in all of the transformer principles apply.

    [ actually knowing the effect of interaction of the generated alternating mag field (AMF) with the soil + target is of value, forming the essence of the generic theory of detection.
    The modeling of an alternating magnetic field effect on a buried metal piece involves analyzing electromagnetic induction and eddy currents within the metal. The AMF induces currents in the metal, causing energy dissipation as heat and generating secondary magnetic fields. Soil conductivity and permeability influence the field's penetration and attenuation. Simultaneously, the AMF generation coil experiences energy loss due to resistive heating and coupling inefficiencies with the buried object. The model requires solving Maxwell's equations, accounting for soil and metal properties, coil geometry, and frequency. ]

    ​
    however, this is a moot point. the fact is that the target produces a response, and thats what is of interest
    Last edited by Atul Asthana; 12-25-2024, 03:43 AM.

    Leave a comment:


  • Carl-NC
    replied
    Originally posted by Atul Asthana View Post
    The 60 dB and 18 dB figures I mentioned earlier were in the context of different oversampling scenarios (averaging 8 samples per cycle to get from 12 bit to 15 bit resolution), not averaging multiple cycles.
    You can't average the 8 samples in the TX cycle together, they have to be binned separately. You can only average each one over multiple cycles.

    Since every transmitted wave is being oversampled and each sample is being integrated over 8 cycles, using dma may make it easier. An interrupt driven, software managed process will probably be a simpler approach. Both approaches can be tried out.
    DMA will make it faster. Since you have to bin 8 separate sample points you will have to retrieve those samples and bin them manually. An interrupt procedure is about the only way that makes sense. You sure don't want this in a polling loop.

    RTOS : Though, I did consider this, but I am not very sure about the overheads. I may have to reduce number of cycles and samples to fit everything in the slot.
    Whether you use RTOS or roll your own task manager, there is overhead. RTOS is nice in that is has truly autonomous tasks and uses time slicing with priority levels, which makes task management simple.

    100 mw transmitted power refers to the power with which we illuminate the target. its used as a reference just to calculate the likely voltage generated on the receive coil.
    Metal detectors don't transmit power, just a magnetic field. The TX coil is a reactive element so if the resistance is zero, then there is zero power loss no matter how big the signal is. The TX energy that went into the coil gets completely recycled via the tank capacitor. So it makes no sense to say you want 100mW of TX power.

    Leave a comment:


  • Repwoc
    replied
    Wow. That must really hinder commercial and industrial innovation.

    Leave a comment:


  • Atul Asthana
    replied
    Originally posted by Repwoc View Post
    not in India
    most of the chinese business sites are banned in India.
    and so are most of the imports.

    Leave a comment:


  • Repwoc
    replied
    You can't buy here?


    Leave a comment:


  • Atul Asthana
    replied
    Originally posted by Repwoc View Post
    I am interested in this project because I have a similar project in the making, also based on a STM32 microcontroller.



    Why have you decided on this chip? It is pretty low spec compared with other STM32 devices. I would say you would be much better off choosing one based on a Cortex M4 or M7 processor.rather than the Cortex M3 in the blue pill. The M3 doesn't have a math co-processor and the blue pill ADC is quite slow. Even the STM32F401CCU6 black pill has M4 processor, single precision floating point unit, much more memory (flash and SRAM), a much quicker ADC (2.4 x faster than the blue pill ADC, but still only 12 bits) and, significantly when you want to do DSP, dedicated DSP instructions using the CMSIS-DSP library. On the flip side, the black pill has only the one ADC whereas the blue pill has two and the black pill costs a little more. The STM32F411CCU6 is similar but has twice as much flash + SRAM and runs at 100 MHz. The STM32 Cortex M7 microcontrollers include a double-precision floating point unit and some have 16-bit ADCs.



    Could you tell us where you read this? It looks more complex than a single-cycle instruction.
    https://www.st.com/resource/en/desig...lectronics.pdf .​
    oh, its single cycle of sine wave, not single instruction cycle.
    goertzel algorithm takes quite a few instruction cycles.

    Processor :
    bluepill is low priced, easily available in India unlike other variants and will do the needfull in this case, by not aiming to include all possible functionalities.
    ​​​​Alternatively other low priced boards could be looked at based on availability and price.

    ​​Other stm32 boards are high priced and slightly difficult to procure, making it a hard task for a hobbyist.

    Leave a comment:

Working...
X