Announcement

Collapse
No announcement yet.

My design finally works!

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

  • #16
    Take a look at its behavior on this video. It shows how it works as today.



    I am starting to encounter a few problems:

    1. Temperature derating: the detector needs recalibration every 5minutes or so
    2. Noise in the test room and presence of metal everywhere

    But I am still happy with the results.

    Comment


    • #17
      As promised, here's the GitHub repository where you can find the code for the STM32 and the KiCad files.
      It is constantly being updated, so do not expect to remain the same, it will change day by day.

      I am now working on a self-calibration procedure at power up and in the meantime I built a simple structure to hold it properly.

      Tomorrow I will perform the first ever test on ground.

      https://github.com/GiuseppeTrainiti/MetalDetector
      Attached Files

      Comment


      • #18
        I need your help with this one guys.
        It appears that anything solid makes the detector scream. It is like there is no shielding, even tho i connected the shield (the white wire on the coil calbe) to GND.
        Even my hand makes it beep. I am afraid that the ground test of tomorrow will fail if I don't get this right.

        Comment


        • #19
          UPDATES: the ground test gave good results. As expected when the coil is lowered on the ground there is no phase shift on the received signal, just a slight increase in amplitude. Unfortunately this increase is constantly varying when swiping the coil, so I modified the code in order to trigger the sound when a phase shift is detected, but the tone depends on both I and Q signals. It is quite stable now.
          I also tried to implement the derivative of the amplitude but it did not gave good resuls for now.

          The first batch of test PCBs has been put into production. The circuit will be uC independent but coil dependent. It is only equipped with a cross coupled oscillator for center plugged TX coils.
          Once it arrives I will test it and when I am sure it is ok I will pubblish the gerbers. The PCB is populated with only THT components and has 4 layers. I payd 5 of them only 10€, shipping included.

          Attached Files

          Comment


          • #20
            Nice...
            But one fundamental part is missing in your design and these are mounting holes for the PCB. How do you want to fix it in an enclosure? Maybe with "air-hooks"?

            Comment


            • #21
              Hi,
              as of today the circuit is supposed to be plugged in a breadboard to perform all the necessary connection to the MCU of choice, so there was no need to enlarge the board to include mounting holes, risking to increase the prize of the manufacturing process for a feature not yet needed.

              The final version will have the MCU embedded in the design (STM32F303) sacrifycing microcontroller independency. This is because I found out that the layout of the nucleo board is really not that good, and cross talk between signals is an issue, even when nothing is attached to the board. Then there will be not only mounting holes, but also proper connectors for the batteries, power supplies and coil.

              The main goal of this production batch is to measure any differences in terms of noise and performance with respect of the breadboard version, which I hope will be significant.


              Comment


              • #22
                Okay, it's good to hear you're aware of all the other things that are still missing. When I create a PCB design, I usually always pay attention to all the things you mentioned earlier first. Taking care of them right away saves time and money. It also makes the final design very close to the final product.

                Comment


                • #23
                  Hi

                  Here's a sample board I sent to production today. If everything works, this is already the final product design. All connectors, LEDs, switches, potentiometers, mounting holes for additional boards, and brackets for slot-in mounting for the intended finished electronics housing have already been prepared.

                  Click image for larger version

Name:	TX-Pulse Mode Detector - Mainboard (2) (15-04-2025).png
Views:	463
Size:	134.8 KB
ID:	436631
                  Click image for larger version

Name:	TX-Pulse Mode Detector - Mainboard (15-04-2025).png
Views:	451
Size:	196.8 KB
ID:	436632

                  Comment


                  • #24
                    Your design is very tidy and compact, very well organized. I would suggest you to make it a 4 layer board and use the inner layers as ground planes, it should really help with signal integrity and it will not cost much more.
                    Would you like to share the schematic? I am curious about it. My schematic is attached.
                    Attached Files

                    Comment


                    • #25
                      Hi,

                      During the initial planning phase, there was an idea to create a 4-layer board. However, this was rejected because no microcontroller is used. The original initial circuit diagram can be found here in the Geotech forum (see below). The detector is a design by Detectorist#1, and I created the circuit board for this project. The plan is to publish the entire project in the Geotech forum after final testing. We chose a Through-hole design because it makes the project easier for people to assemble.

                      Hobby Hybrid MD1 - Geotech Forums

                      Comment


                      • #26
                        The PCBs finally arrived and I just assembled one. They look fantastic and perfectly fit in two breadboard. Tomorrow I will perform all the tests comparing side by side the breadbord version and the PCB version. In the meantime the STM32 code has been subjected to substantial changes, making the I and Q clocks much more stable and precise, as well as performing a slower ADC conversion in order to reduce noise.
                        I will keep you updated.

                        In the meantime, if someone from Turin (IT) or nearby wants a board I am willing to give 2pcs away for free, so that you can also test it. No deliver.

                        When I will be sure that there are no errors I will share the gerbers. If it works then it becomes a matter of tweaking the component values (especially on the demod integrator) in order to achive the best performance for the given design.

                        Attached Files

                        Comment


                        • #27
                          Originally posted by Carl-NC View Post
                          Excellent! Your breadboarding is a work of art, easy to follow & troubleshoot. Unlike what Bob Pease used to make.
                          Click image for larger version

Name:	image.png
Views:	600
Size:	1.01 MB
ID:	435883
                          rotflmro. YUP.

                          Comment


                          • #28
                            The device is now fitted into a nice plastic box. I wish I could go back in time and not make those holes—they were supposed to be used as a sound output for the speaker, but turned out awful. You can find an on/off switch, a reset pushbutton, the coil connector, and an I2C OLED display.

                            Performance-wise, please see the screenshots of the oscilloscope attached. That is the Q channel fed to the 12-bit ADC of the STM32F303. See those nasty spikes that go down to about 1V? No worries—I came to the conclusion that those spikes are generated by the ADC switching on and off somehow, but they do not in any way affect the signal. The remaining noise is about 40mVpp, which is consistent with the numbers I am reading from the ADC. Right now, it works well with a threshold of 80 (which corresponds to 64mV for the 12-bit ADC).

                            That noise floor is the one I will work with in the next version, using more modern op-amps and precision components. I am afraid it won't do much at this point though... Please keep in mind that a breadboard is in the way, and 40mVpp noise on a breadboard is absolutely considered extremely low noise. But anyway, since that noise is also present on the bare PCB without connecting it to the breadboard, it is worth a try.

                            PS: Those nuts on the side of the enclosure are going to hold a belt to "wear" the detector


                            PERFORMANCES: 50c EURO COIN DETECTED @18cm IN OPEN AIR

                            Please let me know what you think
                            Attached Files

                            Comment


                            • #29
                              Nice job... and an interesting assembly approach. One question: Why didn't you omit the breadboards and move the microcontroller board directly onto the actual circuit board?

                              Comment


                              • #30
                                Thanks! That is because I was not sure about the optimization I was going to perform on the digital section. For example, in the breadboard version I used some random pins to generate the demodulator clocks, and they had a lot of jitter. Now I use pins tied to an hardware timer of the microcontroller, offering me a lot less jitter. This has been done by simply rewiring, and it would have been impossible on a PCB, I would have needed to make another version. Not complaining about the costs of manufacturing, but waiting for it to be delivered is a torture!

                                Comment

                                Working...
                                X