Announcement

Collapse
No announcement yet.

Moodz' Awesome Gold Pulse Induction Version 3 - MAGPI V3 Project

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

  • Just a thought but when you consider that the switching fet in this case the IRF9640 has an Rds of 0.5ohm that in order to ensure maximum power transfer the coil resitance should also approximate to this value also.
    If your coil resistance is too low then you should add some series resitance to your coil or alternativley if the coil reistance is too high then you would need to look at how you can make a coil with lower resitance.
    Remember also that the frequency of the pulse in your case is approximatley 12us on and 12us off or period of 24us or approximatley 42kHz.
    When switching the current through a 300uH coil at 42kHz the AC impedance will be 6.7 ohms compare that to if you would use 30us on and 30us off, f = 17kHz and will have an AC impedance of 4.54 ohms.
    Also depending on the parrallel capacitance of the coil the higher the switching frequency the more losses in the coil as the capacitance impedance decreases as the frequency increases.
    So for example if the coil capacitance is say 100pF the parralel resitance at 42kHz would be 159 ohms while at 17kHz it would only be 6.3k ohm so a big difference.
    In other words the losses at lower switching frequencies are much better than at higher frequencies.
    If you wish to reduce the flyback voltage and maintain the original 17kHz frquency then it will probably be better to introduce some resistance in series with the coil to reduce the DC current.

    Comment


    • I've still got the TX loop running at 60us period, just a shorter duty cycle.

      Comment


      • Hi all,
        Been playing around with the Lilygo T-Display module based on the ESP32 S3 (240MHz) processor with 170x320 display.
        Using the Arduino IDE and OpenAI to help with the code have produced a menu similar to Moodz PIC with the variables that can be modified with the encoder and are saved to EEPROM when pressing the selection key.
        This took me the best part of three nights to get working as the code provided by OpenAI is not perfect and normally requires some editing before it works properly.
        Check out the video and remember that this is a processor with built in Wi-Fi and Bluetooth so there is a lot more that can be done like over the air updating.
        By the way the reason the TSW value was not saved properly is because I failed to press the selection key again before powercycling.
        This module is available from Aliexpress for only AU$32.
        My intention is to complete the V3.1 design first with the PIC with the idea of maybe migrating to the ESP32 for a future revision.

        https://www.dropbox.com/sh/scrh5edlq...0pgeFOSta?dl=0

        Cheers​

        Comment


        • Nice Work
          I've been using an SSD1306 OLED screen over I2C with some fiddling in the library to get high frame-rates and a visual indicator.

          Ignore the diagonal lines as they are a rolling shutter artifact from the camera.
          https://www.dropbox.com/s/38a6u4pwic...81%29.mp4?dl=0
          these screens are tiny though! yours would be much easier to read.

          how does the ESP32 S3 go with hardware pulse generation?

          I was trying to get multiple pulses per cycle on the same pin using the pic32 by DMAing new OCR values after an OCR trigger, however it seems that its only possible to trigger the OC channels once per timer cycle, so i was able to cycle though a series of pulse times, but only one pulse per tx cycle.
          I was thinking of using an RP2040 in the future and its PIO modules to allow arbitrary pulse trains to go to the S+ and S- integrators.

          Comment


          • I havent tried multiple pulses per cycle on the same pin but given that this would be more of an issue for the compiler I dont think it would be impossible.
            I have already generated the sampling pulses and can adjust the timing with the encoder and they are extremely fast and clean especially considering the 240MHz clock as you can imagine.
            The reason I am interested in using the ESP32 is because of the higher clock rate which allows for a resolution of 4ns per clock.
            What this means is that it should be relatively easy to set up a fast comparator or schmidt trigger that is set when the flyback is active and cleared as it falls to a set value say 2.5V.
            The idea is to save the time it takes between the start and finish of the flyback and then to compare this with the timing of a detected signal to check the phase.
            If the phase is positive then it will likely be ferrous and if the phase is negative it is likely to be non-ferrous.
            If you have a particular type of pulse you would like me to try let me know and I will post the video if I can get it working.

            Comment


            • Originally posted by Dean Sarelius View Post
              in order to ensure maximum power transfer the coil resistance should also approximate to this value also.
              This is not applicable to metal detector transmitters. Both the coil resistance & circuit resistances are usually undesirable and the power they consume is power we don't want to consume; it is all wasted. What we usually want is a purely reactive circuit with no resistance, thus no power losses. In a traditional PI we sometimes manipulate the series resistance to achieve a certain turn-on settling characteristic but whether that resistance is in the coil winding, the switch, or just an added resistor makes no difference; it's all power wasted in heat.

              Comment


              • ​​
                I've been playing around with figuring out how to GB and characterize this detectors waveform
                It seems that the signal is a combination of:
                • phase shift applied to the waveform slope changing the values at a given sample time.
                • actual signal from target.

                Because of overshoot around 13uS where the slope changes from positive to negative, the signal produced by a phase shift in inverted.


                I've come up with a way to measure the waveform on weak targets. as the change in the pre-amp out is in the millivolts and most scopes don't have the resolution to measure this when zoomed out to the entire response.

                It involved 2 channels (2v per div and 100mV per dive) on my oscilloscope for better resolution in the later part (> 8us),steps follow :
                • setting the scope (1054z) to average 256 samples (reducing noise)
                • set up 2 channels (2v per div and 100mV per div)
                • retrieving 50 of those waveforms over a couple minutes from the memory using python and Ethernet cable (1ns*8bit per sample)
                • splicing the data from the two channels together at 8us
                • getting the mean of the 50 waveforms
                • subtracting data from one target to another
                • applying heavy Gaussian smoothing.

                Targets are blobs of solder (60/40)
                The ground is a sticky wet brown clay from coastal far north Queensland. I'm having trouble separating it from the signal of small nuggets.
                damping sample was taken at 1.9 -2.0 us.

                in some of my other runs by taking the X sample later, some interesting signals appeared before the X sample that potentially distinguished the ground.

                EDIT: i'm thinking my plots are predominantly just showing the phase shift instead of the target signal,if so maybe we need to account for phase shift?

                I've plotted the change in response for a number of targets below.
                x axis is uS since TX stop,
                y axis is byte values in scope memory equivalent to about 80mv per unit
                Left y axis is change in signal, Right y axis is waveform values

                Some response values are scaled to keep the peaks at the same height



                Click image for larger version  Name:	outside_50_2.jpg Views:	0 Size:	951.5 KB ID:	411814Click image for larger version  Name:	outside_50_2_zoom.jpg Views:	0 Size:	979.2 KB ID:	411813



                samples where placed directly on the coil to maximize signal.





                Click image for larger version  Name:	PXL_20230425_111805672 - Copy.jpg Views:	0 Size:	587.8 KB ID:	411815 Click image for larger version  Name:	PXL_20230425_111820519 - Copy.jpg Views:	0 Size:	596.1 KB ID:	411816 Click image for larger version  Name:	PXL_20230425_111829629 - Copy.jpg Views:	0 Size:	623.6 KB ID:	411817 Click image for larger version  Name:	PXL_20230425_112326669 - Copy.jpg Views:	0 Size:	632.2 KB ID:	411818

                Comment


                • Originally posted by tpet93 View Post
                  Yep, adding the 10R resistor in series with the gate of the damping mosfet fixed the ringing.

                  still getting some warbling and bouncing around in the final output signal, unsure how much is expected during normal operation.
                  This is my first venture into high performance metal detectors so i don't really have a baseline to compare to for noise and sensitivity.


                  I was getting some significant dc offset in the output signal coming from the INA125 (capacitor leakage or amplifier input current leakage?) swapping to another INA125 reduced it.
                  swapping out the LM6171 with a fresh chip seemed to reduce some of the warble/bouncing.

                  I'm still running quite a short 12us tx pulse until i get some spare bsp230s so perhaps a stronger transmit signal will make the signal more consistent?

                  As a note for others troubleshooting, when using a speaker and 2*18650s, as the battery's got low, the output started to slowly oscillate at ~0.5hz. I put this down to the speaker drawing more current at low frequency's and causing one of the voltages to drop creating a feedback cycle.
                  could be tricky to troubleshoot without headphones or a screen attached.
                  Hi tpet93,

                  I think your problem is the Detech coil cable I have been doing some testing with various coils and find with all the Detech coils tested when the detector is switched on it is slow to initiate and has a low continuous tone and the coil is very insensitive and the Magpi V3 display reads in the SIG450 area the Detech coils run resistances in the mid 0.3's ohms where where as the Minelab coils usually run in the 0.4's ohms and the display SIG.240 area with high tone I also tried some of my own coils with varying resistances from 0.33 to 0.45 ohms and like wise as the Minelab ones ran in the display SIG.240 range and high tone.

                  Regards, Ian.

                  Comment


                  • Originally posted by IBGold View Post

                    Hi tpet93,

                    I think your problem is the Detech coil cable I have been doing some testing with various coils and find with all the Detech coils tested when the detector is switched on it is slow to initiate and has a low continuous tone and the coil is very insensitive and the Magpi V3 display reads in the SIG450 area the Detech coils run resistances in the mid 0.3's ohms where where as the Minelab coils usually run in the 0.4's ohms and the display SIG.240 area with high tone I also tried some of my own coils with varying resistances from 0.33 to 0.45 ohms and like wise as the Minelab ones ran in the display SIG.240 range and high tone.

                    Regards, Ian.
                    Hi Ian are those tests with a scope and adjusting the x sample timing?
                    my understanding is that the resistance is not so critical as long as it is low, what is more important is the self resonance of the coil which is a product of its inductance and capacitance. Stray capacitance being the biggest variable between coils.

                    If the coil has too much capacitance it might not be possible to dampen it properly by the 1.6us damping sample programmed in the default firmware.
                    This can result in a weird waveform and cause high or low signals at rest ( i still dont know how the dc signal gets through the film capacitors)


                    My coil had an srf of around 540khz, measured using another coil to excite it.
                    I was able to damp it using the magpi at 2.13us but no earlier. If your x sample is at 1.6us that may be why its not working.

                    As far as the detech cable goes: it uses a pair of coax cables one of which is unused and unconnected in the mono coil. I find that bending the cable near the ends causes the two coaxes to slide, changing the distance of the unused cable end to the connector which seems to vary the capacitance and causes a signal from the speaker.

                    I cut 30cm of the cable away and my min damping time reduced to 1.9us. I would like to shorten it a bit more and try soldering the unused coax to gnd.

                    Comment


                    • UPDATE, I increased the TX time to the full 15us and the warbling has significantly reduced, sensitivity to small nuggets after tuning out ground is better now.
                      I will need to re-do those graphs.

                      Tony

                      Comment


                      • Originally posted by KingJL View Post
                        There are a couple of things to note and understand... the current version of the "MAGPI Probe" circuit has some differences from moodz's MAGPI V3...

                        Having said all this, when I finish verifying the PCB layout, I will publish/post the Kicad project (including Gerber's) as as a zip. It will probably be done in a separate thread so as not to interfere/confuse with moodz's MAGPI development...

                        But remember this is NOT MAGPI V3 (so don't inundate moodz with questions/problems of the "MAGPI Probe") and as of now the MAGPI Probe "DEFINITELY is NOT just "BUILD/FLASH/and GO"!
                        The new thread:
                        The MagPI Probe is based on the MagPI V3 design provided by moodz in the “Moodz' Awesome Gold Pulse Induction Version 3 - MAGPI V3 Project” thread. There are some changes to the original design. These changes are to permit operation with a 2 cell Li-ion batery pack, provide a measure of safety to the damping circuit if TX

                        Comment


                        • Originally posted by tpet93 View Post

                          Hi Ian are those tests with a scope and adjusting the x sample timing?
                          my understanding is that the resistance is not so critical as long as it is low, what is more important is the self resonance of the coil which is a product of its inductance and capacitance. Stray capacitance being the biggest variable between coils.

                          If the coil has too much capacitance it might not be possible to dampen it properly by the 1.6us damping sample programmed in the default firmware.
                          This can result in a weird waveform and cause high or low signals at rest ( i still dont know how the dc signal gets through the film capacitors)


                          My coil had an srf of around 540khz, measured using another coil to excite it.
                          I was able to damp it using the magpi at 2.13us but no earlier. If your x sample is at 1.6us that may be why its not working.

                          As far as the detech cable goes: it uses a pair of coax cables one of which is unused and unconnected in the mono coil. I find that bending the cable near the ends causes the two coaxes to slide, changing the distance of the unused cable end to the connector which seems to vary the capacitance and causes a signal from the speaker.

                          I cut 30cm of the cable away and my min damping time reduced to 1.9us. I would like to shorten it a bit more and try soldering the unused coax to gnd.
                          Hi Tony,

                          No the testing has been done with the default settings and judgement by audio and coil response to a set of known gold targets the only parameter I can change is the volume my code version is 1.1 I am waiting on Moodz to publish the enabled code.

                          Tony I think you are correct I did notice that where as the Minelab and my own coils have a SRF of from 550khz to 789khz the Detech ones are in the 400khz to 500khz range.

                          I would be interested if anyone does a SMD version of the Magpi V3 with a board size of 100mm wide by up to 75mm deep as I have a Hammond enclosure with a fabricated screen enclosure all set up waiting.

                          Regards, Ian.

                          Comment


                          • ....sorry about the delay ... but my clock has days of the week not hours on it

                            MAGPI008.X.productionV1.2.zip

                            Here is the HEX file V1.2 for the MAGPI ..

                            Default audio volume is set to 10 not maximum.

                            Fixed bugs on audio causing mosquito sound. ... PWM distortion.
                            Added tone control for audio niceness. ( shifts the tone ... let me know if it needs more range )
                            Can set Sample starts and widths. ( X sample . S2 and S3 )
                            X sample is adjustable ( careful ... damping mosfet can overheat in some configurations if you adjust this way outside some timings ).
                            Improved debounce performance on the rotary encoder :=)

                            All the LCD readings for timings are in microseconds.

                            moodz ...
                            Attached Files

                            Comment


                            • Originally posted by moodz View Post
                              ....sorry about the delay ... but my clock has days of the week not hours on it

                              MAGPI008.X.productionV1.2.zip

                              Here is the HEX file V1.2 for the MAGPI ..

                              Default audio volume is set to 10 not maximum.

                              Fixed bugs on audio causing mosquito sound. ... PWM distortion.
                              Added tone control for audio niceness. ( shifts the tone ... let me know if it needs more range )
                              Can set Sample starts and widths. ( X sample . S2 and S3 )
                              X sample is adjustable ( careful ... damping mosfet can overheat in some configurations if you adjust this way outside some timings ).
                              Improved debounce performance on the rotary encoder :=)

                              All the LCD readings for timings are in microseconds.

                              moodz ...
                              Thanks Paul I will see if I can program it with out letting some smoke out you know what I am like with digital stuff LOL.

                              Regards, Ian.

                              Comment


                              • Originally posted by moodz View Post
                                ....sorry about the delay ... but my clock has days of the week not hours on it

                                MAGPI008.X.productionV1.2.zip

                                Here is the HEX file V1.2 for the MAGPI ..

                                Default audio volume is set to 10 not maximum.

                                Fixed bugs on audio causing mosquito sound. ... PWM distortion.
                                Added tone control for audio niceness. ( shifts the tone ... let me know if it needs more range )
                                Can set Sample starts and widths. ( X sample . S2 and S3 )
                                X sample is adjustable ( careful ... damping mosfet can overheat in some configurations if you adjust this way outside some timings ).
                                Improved debounce performance on the rotary encoder :=)

                                All the LCD readings for timings are in microseconds.

                                moodz ...
                                Hi Moodz
                                Would you be willing to share the source code also..? Reason I am asking is because I have provided extra pin functionality and may wish to use these in the future.
                                Cheers

                                Comment

                                Working...
                                X