Announcement

Collapse
No announcement yet.

DemineUA.org MD V1 - free and open source PI metal detector based on RP2040

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

  • DemineUA.org MD V1 - free and open source PI metal detector based on RP2040

    Hello everyone,

    We are a collective of engineers from Europe who have set out to create a recipe for a very low-cost (~35€) metal detector to aid in clearing war-torn lands of dangerous artifacts, helping to bring some semblance of normalcy to a very bleak reality.
    We are publishing the first release of this metal detector here to spark discussion about the design choices, gather suggestions for improvements, and support replication efforts by collectives of volunteers or makerspaces.

    We have sought EOD evaluation, and the device has been deemed "good enough." However, we would like to improve it further with the help of this experienced community.
    End-user feedback has included remarks such as, "anything better than a long stick helps," but given the serious nature of the subject, we are committed to doing everything within our abilities to improve the design.

    None of us are hobby metal detectorists, so the immense amount of knowledge gathered here, along with the book "Inside the Metal Detector", has greatly aided us in working on this design. As an expression of gratitude, we are publishing the design here for anyone to build upon, remix, or recreate.

    The current bill of materials, PCBs for ordering, KiCad source files, binary firmware, source code for the firmware, configuration software, and STEP files can be found on the project website: https://demineua.org

    Click image for larger version

Name:	md-1-overall-view.png
Views:	436
Size:	824.9 KB
ID:	432007
    Here is a rough outline of the metal detector design:
    • Unipolar, high-side FET-based, fixed damping.
    • ADS7052 14-bit, 1MSPS ADC controlled by an RP2040 PIO state machine. MCP6022 (Chinese clone) op-amps with controllable gain. (Schematic provided.)
    • Various compute-intensive statistics implemented, but currently using a relatively simple amplitude-difference algorithm for target detection.
    • "Dynamic" and "Static" modes somewhat implemented.
    • PCB-based, small-size search coil: 4 layers, 2 Oz copper, 276 µH @ 1.7 Ω at the coil connector. Not shielded. Size rationale for cluttered soil use.
    • Mostly 3D-printed construction for ease of replication. Rod made from a wooden rake and bent aluminum tube.
    • 2A onboard battery charger with 2x18650 battery holders.
    • USB-C port for flashing firmware, communication, and charging.
    • RGB WS2812B LED front panel with 4 buttons for parameter/mode configuration menu.
    • Speech-based menu structure, vibration motor, and headphone socket.
    • Onboard low-cost accelerometer for potential future signal filtering use.
    • Python-based GUI tool for debugging and parameter configuration. The tool can be used with a USB-C connection or over Wi-Fi via a connector on the PCB for an ESP-01 (ESP8266 module).

    Known Issues So Far:
    • Mechanical:
      • RG58 cable is too stiff for field use in low temperatures. SMA may be not rugged enough and almost exceeds the rated voltage.
      • Overall build should be more ruggedized for better durability in challenging environments.
    • Sensitivity: Limited sensitivity for low Tau targets due to long sampling delay.
    • Temperature Instability: General temperature instability caused by MCU/frontend temperature fluctuations.
    • PCB Coil Construction: The PCB coil design's effectiveness remains unconvincing, raising concerns about its performance.
    • Firmware Update Risk: There is a risk of "bricking" the device during the firmware update process. The user must manually hold the power-on soft switch while pressing and holding the power button instead of relying on the MCU.
    ​Here are some more photos:
    Click image for larger version

Name:	md-front-panel.png
Views:	332
Size:	618.3 KB
ID:	432008 Click image for larger version

Name:	md-pcb.png
Views:	332
Size:	573.7 KB
ID:	432010 Click image for larger version

Name:	md-rear-ports.png
Views:	331
Size:	463.3 KB
ID:	432011 Click image for larger version

Name:	md-pcb-front-view.png
Views:	332
Size:	971.8 KB
ID:	432012 Click image for larger version

Name:	coil-pcb-view.png
Views:	334
Size:	877.4 KB
ID:	432014 Click image for larger version

Name:	pigui.png
Views:	329
Size:	323.1 KB
ID:	432015
    Attached Files

  • #2
    • Sensitivity: Limited sensitivity for low Tau targets due to long sampling delay.
    • Temperature Instability: General temperature instability caused by MCU/frontend temperature fluctuations.
    • PCB Coil Construction: The PCB coil design's effectiveness remains unconvincing, raising concerns about its performance.
    • Firmware Update Risk: There is a risk of "bricking" the device during the firmware update process. The user must manually hold the power-on soft switch while pressing and holding the power button instead of relying on the MCU.
    ​Skim look, sorry for asking, i don't have time right now to dive deeper into design, just a few questons:

    1) What is the sampling delay now? Adjustable? Range?
    2) Any thoughts on using wire coil instead a pcb coil?
    3) Firmware Update Risk... not sure I understood this. Consider this question not so important by now.
    4) Any video showing live performing? Any kind of video?


    By the way; I like the initiative, I like the design of the box and mechanical parts.
    I like the idea of ​​using RP...think there's some hobbyist material here!
    Thanks for posting!

    Comment


    • #3
      Before deciding to make a PCB according to your project
      (JLPcb makes a PCB but also has a soldering service for all components, which makes life much easier for someone like me,
      who has poor eyesight, restless hands and a chronic lack of materials... but JLPcb conditions the production at least 5 sets,
      which is sometimes not cheap, depending on the BOM)

      is there any serious argument against prototyping an experimental set using this module
      (besides the S/N problem that can occur to a significant extent):

      Click image for larger version

Name:	image.png
Views:	319
Size:	232.5 KB
ID:	432020​​

      Comment


      • #4
        You have a nice start on this project. I would re-evaluate the coil as Ivconic pointed out. The pcb coils tend to have a higher resistance. I am not sure it's the best idea to have the windings enclose the center. A center void is a better geometry . This has been discussed here. I think under spiral or flat wound coils.

        Thanks for posting and hope you can make this a viable detector.

        Comment


        • #5
          Originally posted by ivconic View Post
          1) What is the sampling delay now? Adjustable? Range?
          Delay is adjustable via config tool, with the limitation that only 64us are sampled after the end of pulse (but first N us can be ignored)
          Originally posted by ivconic View Post
          2) Any thoughts on using wire coil instead a pcb coil?
          We assumed, that with the dumping level prices on low cost PCB production - a time and labor intensive step (winding a coil) can be avoided by compromising some of the performance to get a "ready made" coil is well worth it.
          Our first prototypes had a more of a donut shaped 2 layer coil designed around to fit on a ender3 style 3d printer, which, suprisingly performed similarly to a more expensive 4 layer 2Oz copper, but with center section filled up. Most certainly the coil needs a redesign, but after spending close to 1k€ on coil PCB prototypes we decided to ship the latest version we had in tens of units, instead a couple of previously made prototype coils.

          Originally posted by ivconic View Post
          3) Firmware Update Risk... not sure I understood this. Consider this question not so important by now.
          When or if a user is required to update the firmware - it is done so in the field by long pressing the power button and holding it to enter "firmware update mode", a mass storage device shows up in the computer, in which you are supposed to drag in the new UF2 firmware file. If a user releases the power button during this process - the flash memory may be corrupted and to revive it you need to open up the enclosure to short out a boot selection jumper. Bad design, but it is what it is at the moment.

          Originally posted by ivconic View Post
          4) Any video showing live performing? Any kind of video?[/FONT]​
          Not at the moment. The performance is a bit better than clonePI or similar detectors with the same coil and a lot of "unnecessary peripherals" added around it. To test with mine surrogates we used a CEIA CMD V2 as a reference and I must say that the CEIA is twice as good with most targets. The current performance is almost on par with Garrett AT PRO VLF with the smallest DD coil they offer on most targets, but no discrimination and somewhat worse performance on non ferrous targets due to the long sampling delay we are able to achieve at the moment.
          Originally posted by ivconic View Post

          Before deciding to make a PCB according to your project
          (JLPcb makes a PCB but also has a soldering service for all components, which makes life much easier for someone like me,
          who has poor eyesight, restless hands and a chronic lack of materials... but JLPcb conditions the production at least 5 sets,
          which is sometimes not cheap, depending on the BOM)

          is there any serious argument against prototyping an experimental set using this module​​
          We designed this MD to be "mass produced", even using a low cost pick and place machine to assemble a few prototypes was very painful and led to a lot of QC errors, consuming a lot of time to diagnose and rework.
          The price becomes very friendly once you order at least a few tens or hundred PCBs assembled. It may go against the spirit of this community, but we conciously decided for this not really to be hand assembled in single quantities.
          Ordering minimum component multiplier quantities (say you need one flash memory, but they are sold in qty5), makes this financially unreasonable as well.
          We made the first few revision prototypes by hand on a JLC PCB. We made the last revision PCBs by ordering them in qty of multiple tens already assembled.
          It is hard not to risk with possible design issues, as doubling the order quantity reduces the price almost logarithmically. Assembling them with JLC at qty 100+ gets not much more expensive than just the price of buying full reels of components required and acquiring the stimulants needed to endure a week long assembly process in house, and instead of reworking each board you get pretty much flawless and assembled boards.


          Originally posted by Altra View Post
          You have a nice start on this project. I would re-evaluate the coil as Ivconic pointed out. The pcb coils tend to have a higher resistance. I am not sure it's the best idea to have the windings enclose the center. A center void is a better geometry . This has been discussed here. I think under spiral or flat wound coils.

          Thanks for posting and hope you can make this a viable detector.

          Thank you for the kind words! Yes, as we also noticed in electromagnetic simulations of different coil designs - a central donut shape should be left open for larger electromagnetic field propogation. Our first prototypes did this, but had much higher resistance made in 2 layers and it was a spiral in-spiral out design. The one posted above uses a PCB jumper to return the center to the outside and parallel running traces in each layer to minimize cross capacitance. The resistance aspect and parasitic capacitance here is good, unlike the previous designs we tried.
          Current design has a flaw, where it requires a larger print bed size for the coil enclosure, where most printers are limited to 220x220 or 225x225 mm, whereas this design requires a bigger bed.
          For future production runs we will definitely redesign the coil.

          Comment


          • #6
            Thanks for the detailed answers!

            "...Delay is adjustable via config tool, with the limitation that only 64us are sampled after the end of pulse (but first N us can be ignored)..."

            I'm trying to figure out the "Configuration Tool" options. Does "...N us can be ignored..." refer to the "Num. samples to skip" field?
            In that case "Num. samples to analyze" are within the "only 64uS" that are sampled, right?
            So... as I understand so far (probably wrong), according to screenshot you posted: first 18 samples are skiped (ignored) and next 44 samplest are taken, right?
            18+44=62, "only 64" - 62 = 2. What happens with those 2?
            In order words; does "Configuration tool" allow "out of limit" input of parameters and what happens then?
            Sorry if the question is stupid, I'm just trying to understand some of the parameters in the "Configuration tool".

            Comment


            • #7
              Max 64 samples are taken, each sample being 1 uS. "Samples to analyze" can be also be 10 or 20, as long as the the sum of "samples to skip" and "samples to analyze" doesn't exceed 64. If we can get delay down to 10 uS - you can theorethically analyze all of the remaining 54 samples in the statistics.

              Realistically, given our limited experience or "gut feeling" on choosing the best parameters - a robotic arm or a "sweeper" should be made to "fuzz" the parameters looking for the best performance at target response optimization.

              At the moment they are something we have deemed as "kind of good enough", but certainly there is room for improvements in filtering, statistics used as well as pulse rate, pulse time and most of the other "knobs" there are to turn.
              Our current methodology to evaluate turning each "knob" may be deemed highly unscientific for the lack of a beter description.

              Comment


              • #8

                Comment


                • #9
                  Originally posted by demineua.org View Post
                  None of us are hobby metal detectorists, so the immense amount of knowledge gathered here, along with the book "Inside the Metal Detector", has greatly aided us in working on this design. As an expression of gratitude, we are publishing the design here for anyone to build upon, remix, or recreate.
                  Thank you for sharing. It looks like you've done a pretty good job with this. I'm surprised at the 35€ cost considering the PMOS alone is about 10% of your budget. But I applaud you for coming up with exactly what humanitarian demining needs: something easy to use, and dirt cheap. We discussed a solution for a close parallel to this market a while back, that of third world artisinal mining, where targets can be similar in size and conductivity and "dirt cheap" is a bonus. See the AMX project section. I think we even discussed its potential utility for humanitarian demining.

                  It would help to better understand what you are looking for and the ground conditions. Minimum metal mines were banned in 1996 but I suspect the ban means little, so if these are included you need a really aggressive detector. Anti-tank mines are designed to trigger on a change in ambient magnetic field so for these you really need to use bipolar pulsing. I would assume Ukraine is also littered with steel shrapnel and lead bullets, making false positives a real problem. Finally, does your design use any ground balance method, and is it needed?

                  Personally, I think for the goals of this project the PCB coil is the right choice, and 4 parallel spirals is probably also the best approach. The resistance will still be a bit higher that what you could get with wire but that should not be a big deal. Capacitance will be about as low as you can get. If you want a more aggressive sample delay, consider changing to a low-side switch. Everything else equal, PMOS has 2.5X the capacitance of NMOS and tends to be more expensive. Yes, it means flipping the supply domains which is a pain in the arse but it's the easiest way to pick up speed. Your RX input clamp resistor is 1.2k, increasing this (try 3k-5k) will speed up the diode clamp recovery at the expense of thermal noise, but usually the extra speed is worth the extra noise. For the TX timing, depending on the range of targets you need to find, a 90us pulse may be overkill and a 1400us period may be underkill. Do you have any target standards that you are using in development?

                  Finally, yes, the RG58 is not a good choice, and I would not use an SMA connector either. Problem is, other options get more expensive. Do you really need a coil connector?
                  Last edited by Carl-NC; 12-28-2024, 04:46 PM.

                  Comment


                  • #10
                    I converted the .STEP files to .STL and imported them into Tinkercad so I could check the details.
                    The main box is well done and quite rigid, I wouldn't change anything about it. It is up to its purpose and task.



                    Click image for larger version

Name:	image.png
Views:	293
Size:	225.7 KB
ID:	432045​​

                    Comment


                    • #11
                      Originally posted by Carl-NC View Post

                      Thank you for sharing. It looks like you've done a pretty good job with this. I'm surprised at the 35€ cost considering the PMOS alone is about 10% of your budget. But I applaud you for coming up with exactly what humanitarian demining needs: something easy to use, and dirt cheap. We discussed a solution for a close parallel to this market a while back, that of third world artisinal mining, where targets can be similar in size and conductivity and "dirt cheap" is a bonus. See the AMX project section. I think we even discussed its potential utility for humanitarian demining.
                      Thank you for the compliments, means a lot!

                      We are still contemplating if this is exactly what humanitarian demining needs in terms of ease of use - theorethically 4 buttons is probably 3 too many. It probably should have just an on off switch and a sensitivity dial, which then leads to UX issues like how do you turn down the brightness, volume or vibration without these buttons and not resorting to a large amount of potentiometers.

                      Feedback from Vallon users was that "you need a book with you to figure out the button combos", whereas the CEIA CMD is "dumb" on the outside, hiding all of the complexity within it. We made a structured menu organized in order of how often you may want to change the specific option, now consisting of "Sensitivity", "Volume", "Vibration level", "Brightness", "Backlight" and "Detection mode", all spoken over audio in either English or Ukrainian, depending on firmware build.

                      I think the 35€ was ballpark estimate with IRF9640PBF which was avalanching with a pulse longer than 30~50uS. IXTP10P50P solves this, but at a higher resistance, capacitance and cost. The number above also takes in to account possible reduced volume pricing for mechanical materials like wooden rods, free volunteer workforce and 0 regulatory compliance costs. One-off these metal detectors would probably cost the same as buying a yellow off the shelf VLF MD.

                      Originally posted by Carl-NC View Post
                      It would help to better understand what you are looking for and the ground conditions. Minimum metal mines were banned in 1996 but I suspect the ban means little, so if these are included you need a really aggressive detector. Anti-tank mines are designed to trigger on a change in ambient magnetic field so for these you really need to use bipolar pulsing. I would assume Ukraine is also littered with steel shrapnel and lead bullets, making false positives a real problem. Finally, does your design use any ground balance method, and is it needed?
                      I have no clue to what extent the intended end use fits in the spirit of this community.
                      Technically we are still discussing metal detecting technology, but some in depth knowledge may be a bit too much for public discourse, so please let me know if the discussion turns too detail engrained.

                      What I would like to avoid is any political discussion, given the polarizing nature of military conflicts, however I believe any sane person can agree that there is very little in the list of evils more evil than a long living litter in the ground, which kills or cripples indiscriminately. Area larger than the whole state of Florida is deemed contaminated, just to give a scale of the issue at hand. Given the speed of humanitarian demining in other contaminated territories - a land proclaimed as fully safe will not be achieved within our lifetimes.

                      Having a surrogate training mines is a big no go for EU citizens without the appropriate paperwork. Paperwork makes the project more complex given the non-profit, units given away for free, enthusiast driven approach so no efforts have been made to acquire any "representative samples" to work with.
                      Anything even visually resembling a mine can be classified as goods covered by the EU military goods list, with possibility to win a technical siesta for not following the law to the letter.
                      As long as the metal detector is not designed in a way to "tell apart mines from other metallic objects" it doesn't fall under the strict requirements of the law.
                      You can buy very good quality training mines in Ukraine, however bringing them in to the EU is not in the to-do list.
                      We have contacts with a legal access to a large cache of such objects, thus we have ability to test the design if needed.

                      Given that this project is aimed for humanitarian demining side where active warfare has not happened in months - risk of magnetic fuzes still persists, but is much lower than if used in active combat (page 75 -Systematic Test & Evaluation of Metal Detectors (STEMD) Interim Report Laboratory Tests Italy).
                      As told to us by combat engineers - some of newer killing technology may require to basically either clear from a distance or approach butt naked.

                      We initially did evaluate our abilities to implement a bipolar frontend based on Moodz designs, but I no longer remember why we abandoned these efforts in favor of this very simple unipolar frontend. Please see the schematic attached.

                      Regarding the most often subjects sought - this document covers pretty much most of the items found in the field.


                      Click image for larger version  Name:	low-metal-surrogates.png Views:	0 Size:	205.0 KB ID:	432073
                      For internal testing we tried to evaluate "low metal" mine surrogates published in scientific literature.

                      The most challenging soviet mine is TM62 type in bakelite and vacuum bellow fuze (UVMP) containing very little metal.

                      Latest efforts for both sides has seen large use of 3D printed anti-personnel mines, using a small screw as the triggering pin.

                      Understandably, argricultural lands can and most often need to be cleared by remote operated vehicles, leaving footpaths, irrigation and roadsides to be manually surveyed. Clearance of these areas is very challenging if dangerous objects have been there for more than a year, with distance to the object dramatically increasing as caused by overgrown grass. This is excerbated if the object was intentionally hidden, unlike scattered objects.

                      No ground balance has been implemented as of yet, if you have any direction pointers for this - please let us know.


                      Originally posted by Carl-NC View Post
                      Personally, I think for the goals of this project the PCB coil is the right choice, and 4 parallel spirals is probably also the best approach. The resistance will still be a bit higher that what you could get with wire but that should not be a big deal. Capacitance will be about as low as you can get.
                      Contamination of the land is also a very big issue, where some discrimination may help, but must not be used in such areas, requiring tedious investigation of each and every signal, given the consequences of missing anything.
                      Although our initial efforts concentrated on VLF design, we quickly abandoned it given the more tedious coil production requirements.

                      Our current mechanical design allows for discarding of the aluminum part of the rod in favor of one short wooden stick with the control box zip-tied to the rod. This produces a metal detector in form of a large "pin pointer" for ease of operation while kneeling, if clearance requires grid sectioned mine probing.

                      The ideal coil should be somewhat of a "deep seeking sniper", allowing for precise pinpointing, but not small enough to be a drawback when a large area needs to be surveyed.
                      We did contemplate "multi coil" arrangement, but this added complexity and producing high enough inductance with low resistance gets challenging in small sizes.​

                      Originally posted by Carl-NC View Post

                      If you want a more aggressive sample delay, consider changing to a low-side switch. Everything else equal, PMOS has 2.5X the capacitance of NMOS and tends to be more expensive. Yes, it means flipping the supply domains which is a pain in the arse but it's the easiest way to pick up speed.
                      This is a quick realization we made somewhat early on, while trying to find a PMOS with high enough avalanching rating. NMOS world seems a lot more forgiving.
                      Originally posted by Carl-NC View Post

                      Your RX input clamp resistor is 1.2k, increasing this (try 3k-5k) will speed up the diode clamp recovery at the expense of thermal noise, but usually the extra speed is worth the extra noise. For the TX timing, depending on the range of targets you need to find, and 90us pulse may be overkill and a 1400us period may be underkill. Do you have any target standards that you are using in development?
                      Thank you for the suggestions, we will take these in to mind before producing the next revision.
                      Originally posted by Carl-NC View Post

                      Finally, yes, the RG58 is not a good choice, and I would not use an SMA connector either. Problem is, other options get more expensive. Do you really need a coil connector?
                      RG58 was chosen because of low capacitance per meter and cost. Do you have any suggestions for a better low cost cable, with low enough capacitance and flexibility? We initially chose to add a connector to aid in "hobby use" or "field coil replacement", however, this question is very much valid, and, most likely, we do not really need a connector. Thank you for the simple idea we definitely overlooked!

                      Originally posted by ivconic View Post
                      I converted the .STEP files to .STL and imported them into Tinkercad so I could check the details.
                      The main box is well done and quite rigid, I wouldn't change anything about it. It is up to its purpose and task.

                      Thank you for the feedback!

                      What I have noticed in the past few years- most 3d printing software (apart from Cura) is now able to accept STEP files, producing much nicer final results. We should probably release STL files for usability, but STEP allows for customization in 3D CAD software, that is why it was chosen as the primary format for mechanical release.

                      The current mechanical design seems fragile, but is somewhat robust already. Initial feedback suggested more robust build, which we will take in to account for future relases. The current design is very much light weight, which is great.
                      One aspect we have not extensively covered is ingress protection of the main box - the front panel PCB has a transparent film between the main electronic board and the main board is conformally coated, but it still doesn't give much confidence for prolonged harsh environment use. Also not much thought or testing has been spent on making the coil waterproof - it is sealed around perimiter with high variance and the cable exit point is just a rubber strain relief. It is highly likely that this is not enough.

                      Comment


                      • #12
                        A few years ago a bunch of people on the forum purchased surplus Vallon mine detectors. Many came with a standard test target. It was a short metal pin maybe 7mm long, and about 2mm in diameter. Not sure what kind of metal it was made from? Maybe stainless steel? If you could find one of these in the EU it could give you a reference for development.

                        Comment


                        • #13
                          Yes, most of the EOD use aimed detectors come with some sort of "low metal" test piece, usually stainless steel, which is a challenge for most detectors. User manual always states to test the equipment with this test piece prior to carrying out any further operations. Our copy of CEIA CMD V2 did not come with it, as it was a surplus used unit.
                          Most of those devices are incredibly sensitive with tons of magic happening "behind the scenes", for example CEIA is able to detect pieces of charcoal, as it's ment to detect "carbon rod/plate boobie traps" with a distinctive auditory signal.

                          Comment


                          • #14
                            "... What I have noticed in the past few years- most 3d printing software (apart from Cura) is now able to accept STEP files, producing much nicer final results. We should probably release STL files for usability, but STEP allows for customization in 3D CAD software, that is why it was chosen as the primary format for mechanical release..."

                            In any case; the box is pretty good, I didn't feel the need to make any changes.
                            Directly importing the original box file into Tinkercad was not possible, I had to reduce the number of polygons in Meshlab.
                            After that, Tinekrcad agreed to import the file.

                            Yes, I'm using Cura but I imported the files into Tinkercad and they really look lacking in detail.
                            But it is only an illusion. After it was imported into Cura looks very well and does not look "broken":


                            Click image for larger version  Name:	image.png Views:	0 Size:	238.5 KB ID:	432083


                            ​​

                            Comment


                            • #15
                              I just found that the new Orca slicer directly opens the original .STEP file without any problems.
                              If you look at the bottom right, it has a warning about 4 manifolds and even offers an option to correct them!
                              Wow!
                              I have Orca slicer installed since yesterday and I'm discovering a lot of good options!



                              Click image for larger version  Name:	image.png Views:	0 Size:	275.2 KB ID:	432085

                              Comment

                              Working...
                              X