Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

Android Phone Based Metal Detector - FCMD

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

  • Originally posted by boilcoil View Post
    In practice, that's not exactly the case.

    Abstract
    "The Class E power amplifier has a big popularity because of its high efficiency. The above can be achieved in optimum class E when both soft commutation conditions have been met– zero voltage and zero voltage slope of during turn on. Meeting only the one of the above conditions is described as sub-optimum mode".

    The graph below is for three modes:
    - optimal s = 0
    - suboptimal s < 0
    - suboptimal s > 0​

    Click image for larger version  Name:	efficiency amp class E.png Views:	0 Size:	62.5 KB ID:	446187

    The actually achieved efficiency coefficient is almost 95% in optimal mode.
    ... yes that might be the case for resistive loads since most class E amps are used in RF applications with 50 or 75 ohms etc however when the class E amp was originally developed in the 70s one of the inventors aims was to drive inductive loads ( eg antennas with high inductance ) efficiently.
    Similiarly the metal detector transmit coil is mostly inductance with relatively small resistance.
    Below is the data from my transmit circuit where the supply voltage is 12 volts and the transmit frequency close to 30 Khz.
    The circuit is drawing 89 ma from the power supply but the generated current in the transmit coil is nearly +/- 1.8 amps with an inductance of 0.5 mH and Rcoil = 0.5 ohms.
    There is no resonating capacitor across the transmit coil ( except for parasitic of about 300 pF ) so the self resonance of the coil is far away from the driving frequency of the E class amp. The red voltage spikes are at the drain of the mosfet. The dark blue trace is the gate drive. The light blue trace is the current drawn from the supply and the green trace is the transmit coil current.

    The top panel traces clearly show the mosfet is operating in ZVS mode and locked to the transmit pulses from the CPU.

    The efficiency with this circuit is not really the primary concern ....but it is certainly excellent for a battery operated detector ( eg lithium ).

    At 89 ma from 12 volts it is drawing around 1 watt from the supply. A 3 cell 18650 pack would run this transmitter for about 10 hours.


    Click image for larger version  Name:	image.png Views:	0 Size:	94.0 KB ID:	446189

    Comment


    • OK.

      Comment


      • Built the E class amplifier / driver ... only uses 5 jellybean parts.

        Below is the output waveform across the TX coil. 150 volts peak to peak. @ 32Khz.
        The coil current is approx 2.4 amps peak to peak.

        It runs on 1.2 ( one point two ) volts. The power consumption is 1 watt.
        The efficiency is very high.
        Its so efficient if you lift the supply voltage the growth of current in the coil is exponential .... and it would be like having an induction cooker on a stick instead of a metal detector.


        The spectrum ( pink trace ) is clean over DC to 1.25 Mhz.
        Now I can start work on the low noise amplifier front end.



        Click image for larger version

Name:	image.png
Views:	199
Size:	1.73 MB
ID:	446491

        Comment


        • Below is the data from my transmit circuit where the supply voltage is 12 volts and the transmit frequency close to 30 Khz.
          The circuit is drawing 89 ma from the power supply but the generated current in the transmit coil is nearly +/- 1.8 amps with an inductance of 0.5 mH and Rcoil = 0.5 ohms.
          = 1W = ok


          It runs on 1.2 ( one point two ) volts. The power consumption is 1 watt. = 0.8A x 1.2V = ?

          Comment


          • Originally posted by pito View Post
            Below is the data from my transmit circuit where the supply voltage is 12 volts and the transmit frequency close to 30 Khz.
            The circuit is drawing 89 ma from the power supply but the generated current in the transmit coil is nearly +/- 1.8 amps with an inductance of 0.5 mH and Rcoil = 0.5 ohms.
            = 1W = ok


            It runs on 1.2 ( one point two ) volts. The power consumption is 1 watt. = 0.8A x 1.2V = ?
            I am using one of those common chinese switchmode supplies ... it runs of 12 volts at the moment but this project will probably be running off a 5 volt source eventually.
            The minimum voltage from the o/p of the supply is 1.2 volts ... I measured the current and it was 840 mA @ 1.2 volts = 1.008 watts.
            The switch mode is running around 96% efficient ... so I am pretty happy.

            If I run the E class in its other ( super resonant ) mode then I get 400 ma peaks in the coil but the supply only draws 10 ma from 12 volts.

            Comment


            • Hi Moodz - Are you still planning for this project to be a multi-frequency detector?

              Comment


              • I measured the current and it was 840 mA @ 1.2 volts = 1.008 watts.
                And voltage on Tx coil is ?
                It is not clear, you say that you don't use resonance capacitor and have 150V ?

                Comment


                • Originally posted by pito View Post
                  I measured the current and it was 840 mA @ 1.2 volts = 1.008 watts.
                  And voltage on Tx coil is ?
                  It is not clear, you say that you don't use resonance capacitor and have 150V ?
                  The E class amplifier was designed for RF ... its exactly the same here ( no new physics ) ... if the load matches the output impedance of the amplifier then maximum power is transferred.
                  So if you have an RF amplifier what do you do to transfer maximum power to the load ? At maximum power you have maximum voltage.

                  This circuit is not an oscillator ... if you stop the input clock ...the circuit dies immediately ... If you add extra R to the tx coil it keeps going - the power increases - but this is not good for battery consumption.

                  I cant tell you all the details yet as I have a patent on it.

                  Comment


                  • Originally posted by Repwoc View Post
                    Hi Moodz - Are you still planning for this project to be a multi-frequency detector?
                    The software supports multiple frequencies and harmonic mode ... where one frequency is used and H2, H3 ... H7 are used.

                    Comment


                    • doh .. spent 2 days chasing a faulty earth ( on and off ) on an ADC board and 20 minutes integrating the code into the FCMD to prototype the new ADC demod test.
                      The pic below shows the AD7177-2 chip on the bench connected to the stm32H743 and streaming from the USB port to a python plotter in the PC.
                      I going to test a demod method using this chip instead of using the 16 bit internal ADCs.

                      Click image for larger version

Name:	image.png
Views:	155
Size:	188.0 KB
ID:	446551

                      Comment


                      • Hey Moodz, I looked at your post again.
                        I would use a lot fewer elements from your circuit in the "E" amplifier circuit.
                        I personally, would use only the following elements:
                        -L1;
                        -Q1;
                        -C1;
                        -Cs ;
                        -LT ;
                        I would drastically increase the value of L1 to achieve a relatively constant smooth/non-pulsating DC consumption (this is one of the most important things), would choose Cs and LT for the required frequency and in accordance with RLT - possibly a higher quality factor (the other important thing) and, of course,the shunt capacitor C1.

                        That what you are offering is realy new and innovative in metal detecting.
                        I sincerely wish you success.​​

                        Comment


                        • Originally posted by boilcoil View Post
                          Hey Moodz, I looked at your post again.
                          I would use a lot fewer elements from your circuit in the "E" amplifier circuit.
                          I personally, would use only the following elements:
                          -L1;
                          -Q1;
                          -C1;
                          -Cs ;
                          -LT ;
                          I would drastically increase the value of L1 to achieve a relatively constant smooth/non-pulsating DC consumption (this is one of the most important things), would choose Cs and LT for the required frequency and in accordance with RLT - possibly a higher quality factor (the other important thing) and, of course,the shunt capacitor C1.

                          That what you are offering is realy new and innovative in metal detecting.
                          I sincerely wish you success.​​
                          thanks bc .. I have moved on from that circuit ... but like cats theres more than one way

                          Comment


                          • It would be nice if the FCMD just runs off 5 volts ... then we can use commodity 5 volt power packs for batteries etc.

                            Just testing the STM32H743 ... with all the DSP running it draws 170 ma from the 5 volt supply. ( the board uses a linear 3 volt supply regulator - we could implement a switch mode here)

                            power wise for the CPU that is 0.17 amps x 5 volts = 0.85 watts.
                            The transmitter takes 240 ma @ 5volts which goes into a switch mode supply to power the driver @ 1.2 volts.
                            240 ma @ 5 volts = 1.2 watts. The transmitter takes 850 ma at 1.2 volts = 1.002 watts so my 1.2 volt switch mode supply is 1.002/1.2 = 83.5% efficient.
                            So the total power drawn by the detector will be 0.85 + 1.2 = 2.05 watts.
                            I have a little 5 volt jellybean usb power pack here ... the spec on the back says 5000 mAH / 18.35 watt hour. DC 5.0 volts ( its regulated ) 2.00 Amps max and
                            you can almost hide it in your hand.
                            That means the detector will run for 9 hours on this pack ( all of $10 in Kmart ) and thats with 150 volts pp and 1.8 amps pp in the coil.

                            I would expect we will be running the detector off the battery pack most of the time .. however the name of the detector is Fone (sic) Connected Metal Detector ( AKA FCMD )
                            ..so the question is can it be run from the phone USB port ( the software can talk through the USB port on the chip .. that is how I do all the telemetry to a PC )

                            Here is the AI summary ...

                            A modern smartphone with a USB-C port can reasonably supply between 2.5W and 7.5W (5V at 0.5A to 1.5A) to external peripherals via USB-OTG (On-The-Go) mode. While some high-end devices, particularly those with Samsung DeX capabilities, can output up to 15W (5V/3A), this is not typical for most smartphones.
                            Here is a breakdown of realistic power output capabilities:
                            • USB 2.0/OTG (Older/Budget phones): Generally limited to 5V at 500mA, or 2.5W.
                            • USB 3.0/USB-C (Typical Modern phones): Usually capable of 5V at 900mA–1.5A, resulting in 4.5W to 7.5W.
                            • Samsung Galaxy S/Note Series: Some can output up to 15W (5V/3A), enough to fast-charge another phone or run a portable USB hub.
                            Factors Influencing Power Supply:
                            • Battery Drain: Phones are not designed as primary power banks. High power draw will significantly drain the phone's battery.
                            • Thermal Constraints: Providing higher power generates heat, which can cause the phone to limit the output to protect its internal circuitry.
                            So the answer is YES for a phone with USB-C or older types because the detector power consumption at present is 2 Watts. ( and may improve slightly )
                            That means the detector will run off the USB of the phone ( which will be hosting the control panel app ) in a pinch.
                            Thus it is a true phone connected metal detector.
                            Free Lunch No 1



                            I did note that if the voltage drops to 4.3 volts .. the TX stops ( the CPU keeps going ) probably due to minimum supply on the Mosfet switch and/or driver chip
                            or it could be the 1.2 volt switchmode ... hmmm.
                            ... this is not an issue because the battery pack maintains 5 volts till discharged.
                            Free Lunch No 2

                            moodz

                            Comment


                            • ... all these parts are working in version 1. Just needs to be packaged now.

                              Click image for larger version

Name:	image.png
Views:	124
Size:	72.7 KB
ID:	446570

                              Comment


                              • The FCMD is a single frequency detector ( unless the TX does frequency switching ) in its simplest form.

                                I have now ported all the code to the ESP32 platform from the stm32H7. Considering I only started this yesterday its a good result.
                                The reason for this is that the H7 is overkill once you swap to an external ADC. The ESP also integrated dual mode bluetooth for Android and simultaneous audio.
                                FreeRTOS runs nicely and does all the housekeeping. The ESP32 is arguably more available and cheaper than the H7.

                                Should now be able to build a full detector from minimal parts. I am using an external ADC ( ADS1256 ) with the ESP32 and it achieves a verified 19.9 bit ENOB using my DirectIQ method to recover the I/Q stream.

                                An android app is used to fully control the Detector and the audio is available as 100Khz PWM on an ESP32 pin and 44.1 Khz @ 16bit audio on bluetooth.

                                Because all the controls are bluetooth based, the whole detector will fit into a very small plastic box that can be potted so its waterproof.
                                It will also be extremely light ( think 100 grams for the control box )
                                The code supports VLF and PI ( not at the same time ).

                                Running all the DSP / audio / bluetooth etc hardly cracks 30% utilisation in the ESP32.
                                Its all coded in C and runs under FreeRTOS internally.

                                TODOs ... add VDI display ( its in the DSP .. just not on the android )

                                My costs for hardware : ESP32 = 5 $AUD. 24 bit ADC board = 10 $AUD. TX/RX frontend ( 1 mosfet, 1 opamp, jellybean parts ) = $10 ... most of that is the low noise opamp.

                                So maybe 20 - 30 $AUD for one off ... just add a coil stick and battery ... most ppl have the phone.

                                There is only one small fly in the ointment. The DSP method is patented. So that cannot be given away for free. ( so lets add $10 for a one off non commercial licence fee ).


                                Click image for larger version

Name:	image.png
Views:	98
Size:	110.9 KB
ID:	446941

                                Click image for larger version

Name:	image.png
Views:	82
Size:	150.1 KB
ID:	446942

                                Comment

                                Working...
                                X