Announcement

Collapse
No announcement yet.

TINKERERS TIMING SCHEDULE

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

  • TINKERERS TIMING SCHEDULE

    Here is an initial timing schedule for the TINKERERS IB-PI.

    I would appreciate help with the writing of the code. At present it is for the PIC16F690 for TINKERERS IB-PI, V1.

    Tinkerer
    Attached Files

  • #2
    Timing Schedule

    This is the initial timing schedule. As the design progresses, there will probably be changes in so far as that we will be able to define the best timing for a specific coil and power combination.

    For the V1 we will just use one target sample and one ground sample and maybe a noise sample.

    For the V2, that has the possibility to change or upgrade the software by USB, we will use several target samples and ground samples.

    For V3, the sky is the limit.

    Explanation of the different timing pulses:

    The whole sequence has a duration of 1666.5uS This gives 600 PPS or TX pulses per second.
    Starting the sequence is actually the last sample pulse of the cycle, the noise sample. It is at a place where there is no signal left, the only thing left is the environmental noise. We can subtract that from the signal.

    Next. simultaneously we have the start of the TX pulse and at the same time the Sync pulse for the power supply. The sync pulse runs both, the ICL7662 Negative inverter capacitor charge pump and the capacitor charge pump that produces the regulated TX power.
    The TX pulse has a duration of 100uS.
    During the TX pulse we have 3 sample pulses. The first one is the most sensitive sample for small targets.
    After switching OFF, we have a sample pulse that gives the same response like any standard PI.

    The sample pulses have a duration of 5uS.

    Tinkerer

    Comment


    • #3
      Choice of PIC

      At this point it might be a good idea to look at the capabilities of the different
      PIC possibilities.

      For the V1 version I want to use a PIC16F690, because I have on and I can easily program and change the program in it. We want to keep the V1 as simple as possible.

      For the V2, I want to use a PIC18F4550 that can be programmed via USB from a laptop. This would make it possible to experiment in the field by changing programs. This could be interesting for regions where the ground is very much mineralized or salt pans etc.

      For V3, we want to go to a dsPIC30 and do some DSP. I suspect that we will be able to extract a wealth of information about the target with DSP.

      I know very little about MCU's myself, so I would be glad if someone with more knowledge would join in and explain a bit what all the possibilities are.

      For example, how much signal amplitude do we need at the input of the A/D?

      What is the S/N or Signal to Noise ratio that we need for a 10bit A/D, for a 12bit A/D and for a 16bit A/D?

      What kind of signal amplitude would we need from a gold ring at 30cm from the coil to be able to detect it with 10bits?

      Tinkerer

      Comment


      • #4
        Here are a couple of notes I've thrown together about the PIC16F690 as it relates to this project. I assume you're supplying 5V to the device and running it at 20MHz, based on your timing chart.

        You mentioned a 5us acquisition time. That should work fine, so long as the output impedance of the preceding stage is less than 10k, which should be easily doable. The lower the better. The device requires 11 TAD (time to complete one bit conversion) to perform the A/D conversion. The minimum TAD with a 20MHz clock is 1.6us, so the total minimum conversion time is 17.6us. That brings us to a total of 22.6us to sample and convert, which is around 44ksps. Keep this in mind when planning the timing.

        The resolution of the A/D converter is 10 bits. If Vref is tied to Vdd, then each bit will represent approximately 4.88mV. If Vref is set to the minimum of 2.5V, then each bit will represent half of that value, or approximately 2.44mV.

        Now for the real meat-and-potatoes, what do you want to do with these samples?

        Comment


        • #5
          Originally posted by hobbes_lives View Post
          Here are a couple of notes I've thrown together about the PIC16F690 as it relates to this project. I assume you're supplying 5V to the device and running it at 20MHz, based on your timing chart.

          You mentioned a 5us acquisition time. That should work fine, so long as the output impedance of the preceding stage is less than 10k, which should be easily doable. The lower the better. The device requires 11 TAD (time to complete one bit conversion) to perform the A/D conversion. The minimum TAD with a 20MHz clock is 1.6us, so the total minimum conversion time is 17.6us. That brings us to a total of 22.6us to sample and convert, which is around 44ksps. Keep this in mind when planning the timing.

          The resolution of the A/D converter is 10 bits. If Vref is tied to Vdd, then each bit will represent approximately 4.88mV. If Vref is set to the minimum of 2.5V, then each bit will represent half of that value, or approximately 2.44mV.

          Now for the real meat-and-potatoes, what do you want to do with these samples?
          OK, so let's look at the sensitivity first. Set the goal:
          We want to be able the detect the gold ring target reliably at a distance of 30cm. With the Vref set at 2.5V, we need to have a signal of at least 5mV or 2 Lsb. So we need to amplify the signal to that level while keeping the noise low.
          The pre-amp has already as much gain a we can manage. So we could Sample and Hold and then amplify some more.
          OR, we could use the usual differential amplifier / integrator that also amplifies. Lets look at this option first.
          Take the sample RC5 and the sample RC3 for the all metal sample.
          Then take RC1 and? here we have a problem. What do we use as the reference? As we have seen on the pictures of the ON sampling window, the whole signal wave form shifts, not just the part closest to the transient.
          to complicate matters, the signal shifts positive for FE and negative for NON-magnetic metals.

          OK so we Sample and Hold.
          RC1 = S&H #1
          RC3 = S&H #2
          We also separate the Ground Balance line.
          GB 1 = S&H #3
          GB 2 = S&H #4

          Then we pass the output of the S&H through a LP filter. For # 1+2, we make the filter 20Hz
          For # 3+4 we make it 0.1Hz, this will be a Tracking Ground Balance.

          Now we A/D #1,2,3,4.
          Then we take the difference between #1+3 and 2+4.

          How are we doing so far?

          Let;s fix what is wrong before we continue.

          Tinkerer

          Comment


          • #6
            TINKERERS_V1_600_PPS TIMING SCHEDULE

            Attached is the timing schedule with a pulse rate of about 600 pulses per second.
            There is also the Hex file to program the PIC16F690, running the PIC on the internal 8Mhz clock. No external clock or crystal needed.

            The TINKERER_V1 runs fine with that including the discrimination.

            Like every other part of the TINKERER_V1, there is a lot that can be improved.
            This is meant to be only the beginning. Try it, see how it works, then all together we want to start on the improvement.

            Tinkerer
            Attached Files

            Comment


            • #7
              Hi Tinkerer,

              Some time back I was able to GB over horrendous ground with 3 samples.
              S1-(S2+S3) (width ~2uS) with the position of S2 adjusted for fine GB. These can be jumbled around to get the correct output polarity. Because they were all over within 30uS after TX off they are in the area of the curve with the most target info re conductivity etc. The method also lends itself to very high TX rates.

              regards
              bugwhiskers

              Comment


              • #8
                DIFFERENT GROUND BALANCE METHODS

                Originally posted by bugwhiskers View Post
                Hi Tinkerer,

                Some time back I was able to GB over horrendous ground with 3 samples.
                S1-(S2+S3) (width ~2uS) with the position of S2 adjusted for fine GB. These can be jumbled around to get the correct output polarity. Because they were all over within 30uS after TX off they are in the area of the curve with the most target info re conductivity etc. The method also lends itself to very high TX rates.

                regards
                bugwhiskers
                Hi Bugwhiskers,

                thanks for the valuable feedback. Ground Balance is the key to higher sensitivity and greater depth. Nobody has as much experience with real bad ground like the Australian PI designers.

                DSP is the future of metal detectors. There are so many variables that can be played with, it is not possible to do that with analog.

                However, I noticed that it is difficult for a person to write a DSP code for a PI, without a thorough understanding of the various functions and all the possible variables that are involved.

                This is the reason for the TINKERERS_V1. It is an analog version, with only the timing digital. The purpose is to supply an experimenting platform for a discriminating PI, with the possibility to transform the analog design step by step into a DSP dominated PI.

                All the best

                Tinkerer

                Comment


                • #9
                  Hi Tinkerer,

                  Maybe I can help with the code for the PIC16F690 your using. Is there a wish list of what you would like the micro to do? I think this post should be in this thread.

                  Regards
                  PICON

                  Comment


                  • #10
                    Originally posted by PICON View Post
                    Hi Tinkerer,

                    Maybe I can help with the code for the PIC16F690 your using. Is there a wish list of what you would like the micro to do? I think this post should be in this thread.

                    Regards
                    PICON

                    PICON,

                    thanks for the help.
                    The timing code that I am using, functions, but there are important things missing like Watchdog, reset and other such. I would like to send you the source files by email so that you could add what is needed so that it is up to standard.
                    Then we could look at further improvements.
                    I have added traces on the analog board for output to the PIC from 3 TP's. Let's see what we can do with that.

                    The PIC16F690 has quite a few functions that could be used.

                    Tinkerer

                    Comment


                    • #11
                      Most recent timing schedule at 1kPPS

                      It has been some time since I posted something new. Been working on the PCB's and refining a few things.
                      The biggest breakthrough, is that the TINKERERS_V1 is now capable of discriminating small, thin, rusty, steel pieces. These are some of the most difficult targets to differentiate, so I am quite proud of my achievement.

                      Attached is the timing schedule that accomplishes that. It runs at just under 1000 pulses per second. As you can see, several samples are taken at very specific times.

                      There are still many things that can be improved, so I am very grateful for any help that I can get.

                      This is supposed to be a OPEN SOURCE PROJECT, where all and everybody is welcome to participate.

                      Tinkerer
                      Attached Files
                      Last edited by Tinkerer; 12-20-2009, 11:25 PM. Reason: Do I need a reason? Am I reasonable?

                      Comment


                      • #12
                        Hi Tinkerer,

                        I am back again. Sorry for dissappearing for such a long time. I had to stop development of Metal Detectors for a while due to the lack of space.
                        Maybe I'll get back into it again (I hope so).
                        What is the resolution of your microcontroller for the pulses (widths and delays)?

                        Best regards,
                        Nicolae

                        Comment


                        • #13
                          Originally posted by nick_f View Post
                          Hi Tinkerer,

                          I am back again. Sorry for dissappearing for such a long time. I had to stop development of Metal Detectors for a while due to the lack of space.
                          Maybe I'll get back into it again (I hope so).
                          What is the resolution of your microcontroller for the pulses (widths and delays)?

                          Best regards,
                          Nicolae
                          Hi Nicolae,

                          at present the PIC16F690 is running on the internal oscillator at 8Mhz. It gives enough precision for the timing sequence of this design.
                          The timing schedule above is fully functional and discriminating.
                          The signal processing is done in analog, so that it is visible and easy to understand.
                          The PIC could run on an external crystal up to 20Mhz which would be advisable for digital signal processing.

                          all the best

                          Tinkerer

                          Comment


                          • #14
                            Originally posted by Tinkerer View Post
                            Hi Nicolae,

                            at present the PIC16F690 is running on the internal oscillator at 8Mhz. It gives enough precision for the timing sequence of this design.
                            The timing schedule above is fully functional and discriminating.
                            The signal processing is done in analog, so that it is visible and easy to understand.
                            The PIC could run on an external crystal up to 20Mhz which would be advisable for digital signal processing.

                            all the best

                            Tinkerer
                            Hi Tinkerer,

                            Do you mind explaining a bit what are all those pulses used for (RB6, RB7, RC1, RC2, RC3, RC4, RC5)? What are their delays and widths? Are you using all of them?

                            It's great news that you can discriminate small iron.

                            Happy New Year!
                            Nicolae

                            Comment


                            • #15
                              TINKERERS_V1 TIMING

                              Originally posted by nick_f View Post
                              Hi Tinkerer,

                              Do you mind explaining a bit what are all those pulses used for (RB6, RB7, RC1, RC2, RC3, RC4, RC5)? What are their delays and widths? Are you using all of them?

                              It's great news that you can discriminate small iron.

                              Happy New Year!
                              Nicolae
                              A HAPPY NEW YEAR to you too.

                              The function of the pulses:
                              RB6 Is the sync pulse that synchronizes the ICL7662, inverting charge pump as well as the boost charge pump that takes the battery voltage from 8 to 12V, up to 15V regulated. This way no switching noise falls in the sampling window time.
                              RB7 is the TX pulse
                              RC1 is the sample for gold and other short TC targets
                              RC2 is the sample for FE targets
                              RC3 is the sample for all metal targets, but more of the long TC kind.
                              RC4 is the pulse that controls the Tracking Ground Balance
                              RC5 is not needed for the function of the detector, but I use it to sync the Oscilloscope.

                              With the help of PICON, I am working on 4 different timing schedules that can all be loaded into the PIC and chosen by a switch.

                              If you want to build the detector please ask for the latest update of all circuits. I already have too many versions on this forum, so I am trying to post only one more, the final one.

                              Tinkerer

                              Comment

                              Working...
                              X