Announcement

Collapse
No announcement yet.

chipKIT uno32 Arduino MD experiments

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

  • #61
    10 bit experiment

    well i did the 16 bit vs 10 bit experiment,

    in setting up the experiment i did my best to make it fair.

    same TX pulse, same fly back delay, running average at 100. Most important adjustment was the value i call the "threshold offset" i had to "hand dial" these in by usuing a trim pot hook up to another adc port.

    well here's the code:
    Code:
    void profile_CK()  // this is an event, it's basically an idea for the
                        // sequencing of pulses in order to make a metal detector work 
                        // this is usuing the Chipkit's 10 bit adc 
    {
     mosfetC();           // tx pulse length
     adc_fly();           // fly back delay
     CK_sample();         // sample from Chipkit's 10 bit adc
     running_average ();  // running average for target sample
     GB_delay();          // delay for ground balance  
     CK_Bsample();        // sample from ground balance
     Brunning_average (); // ground balance running average
     
     averageS = averageS - CT_offset;  // threshold offset
     
     if (averageS > BaverageS)         // simple logic
    {
      mPORTDToggleBits(BIT_0);         // RED LED ON
    }
    else
    {
      mPORTDClearBits(BIT_0);          // RED LED OFF
    }
    }
     
      void CK_sample(){     // target sample
      adc_on();
      adcvalue = analogRead(signal_input);
      sample_1=adcvalue;
      adcvalue = analogRead(signal_input);
      sample_2=adcvalue;
      adc_off();
      average=(sample_1+sample_2)/2;
    }
    void CK_Bsample(){    // ground balance sample
      adc_on();
      adcvalue = analogRead(signal_input);
      Bsample_1=adcvalue;
      adcvalue = analogRead(signal_input);
      Bsample_2=adcvalue;
      adc_off();
      Baverage=(Bsample_1+Bsample_2)/2;
    }
    The results:

    the air test show about a 4 to 5 inch (10 to 12 cm) increase for the 16 bit adc over the 10 bit adc. for both the metal plate and small box of gold nuggets

    metal plate 15" to 20"

    box of nuggets 4" to 9"

    conclusion:

    moodz is correct.....
    That experiment is pretty much like comparing a 3 digit voltmeter with a 4 digit one. So you will measure 1.00 volts vs 1.000 volts. ... Pretty much like dropping a brick on your foot to see if it hurts.
    10 bits is hobbyist grade
    16 bits is a "good start"

    for those of you wanting to use the on board ADC in the chipkit, do it you'll have a great starting point, and its easy to work with

    I have some real encourgement to step up to an 18 bit adc in the near future


    comments and questions?

    Philip


    next experiment:
    Auto Calibration of the threshold offset
    Auto Calibration of the Fly back delay
    Last edited by hdphilip; 07-28-2012, 11:56 PM. Reason: typo

    Comment


    • #62
      Auto Cal

      Here's my reason for Auto Cal,

      When I've been doing my testing, I would connect a trim pot to one of the analog input in order to "fine tune" my timing algorithm's.

      As I would adjust the trim pots, I would see the values changing on my LCD screen, these values would also be adjusting the software. When the software is adjusted correctly, I'd take the shown value, and program it into the corresponding variable.

      This method works fine, but, if I can have the micro controller do it, it would be more precise, also it would be more consistent.

      This calibration data may be important in designing the front end and evaluating different coils.

      It's always best if the equipment your building can help design itself

      Philip

      Comment


      • #63
        Board noob monitoring this thread with interest.

        2 questions...

        1. Would it be worth offloading the LCD updates to a 2nd Arduino to get rid of that delay?

        2. Could you measure the target response delay to estimate the depth of the target, and display that on the LCD too?

        Comment


        • #64
          oroplata,

          Thanks for the reply,

          1. Would it be worth offloading the LCD updates to a 2nd Arduino to get rid of that delay?
          insteresting idea, I've have thought about it, but i'm thinking it might be a little easier
          to only display information on the LCD screen after a target has been detected, the software would look for "peak" in signal amplitude and switch to oscilloscope mode, basically just take a snapshot, display it for a few seconds, and reset.

          2. Could you measure the target response delay to estimate the depth of the target, and display that on the LCD too?
          i don't think so, that would be pretty neat. even looking at the target curve as mention above would just be a gimmick, ah' something to look at for fun.

          i figure if their some information in the computer, might as well be able to see it.

          Philip

          Comment


          • #65
            ADC

            Hello hdphilip,

            With your 16 bit ADC, what is the schematic and how have you hooked it up to the UNO32?

            If you increase the sample rate (say to 1MSPS) which chip would you use and how would you change the schematic for it?

            chudster

            Comment


            • #66
              hi chudster

              I'll post my diagram a little later tonite

              right now i'm usuing the ads8319 ref voltage 4.096, i'm going to change to a AD7980 with a 2.5 volt reference

              yes they are both 16 bit, but the AD7980 will cut about 1us time between conversions

              schematic is about the same, except i'll be going with all analog design components.

              it might be as easy as a chip swap too.

              Philip

              The Auto Cal for the threshold is coming along. If i get it right, it'll automaticly move the first sample window right up to the base of the flyback, pulse....

              Comment


              • #67
                Here's a wiring diagram to wire up a Nokia 5110 to a chipkit

                Philip
                Attached Files

                Comment


                • #68
                  Originally posted by hdphilip View Post

                  i don't think so, that would be pretty neat. even looking at the target curve as mention above would just be a gimmick, ah' something to look at for fun.

                  i figure if their some information in the computer, might as well be able to see it.
                  Yes. It would be interesting to see if it worked.

                  One advantage of designing a detector using an Arduino (or similar) is that once you've got the important bit running properly, you can easily add all sorts of features that can make the detector so much better than normal joeblow detectors.

                  Such as adding a few more components allowing the Arduino to smart charge your NiCad/NiMH/LiPo/LiFe/NiZn batteries. You just put the detector in the back of the car at the end of the day and hook detector into the cigarette lighter, leaving the arduino to charge and float the batteries.

                  And of course GPS to help you grid search without missing anything.

                  Comment


                  • #69
                    Originally posted by oroplata View Post
                    Yes. It would be interesting to see if it worked.

                    One advantage of designing a detector using an Arduino (or similar) is that once you've got the important bit running properly, you can easily add all sorts of features that can make the detector so much better than normal joeblow detectors.

                    Such as adding a few more components allowing the Arduino to smart charge your NiCad/NiMH/LiPo/LiFe/NiZn batteries. You just put the detector in the back of the car at the end of the day and hook detector into the cigarette lighter, leaving the arduino to charge and float the batteries.

                    And of course GPS to help you grid search without missing anything.
                    How much power does the Arduino consume?
                    Tinkerer

                    Comment


                    • #70
                      oroplata

                      One advantage of designing a detector using an Arduino (or similar) is that once you've got the important bit running properly, you can easily add all sorts of features that can make the detector so much better than normal joeblow detectors.

                      Such as adding a few more components allowing the Arduino to smart charge your NiCad/NiMH/LiPo/LiFe/NiZn batteries. You just put the detector in the back of the car at the end of the day and hook detector into the cigarette lighter, leaving the arduino to charge and float the batteries.
                      very true

                      thats what i like about the chipkit, I haven't ran out of digital I/O pins, seems with my arduino i'd almost run out before i start.


                      Philip

                      Comment


                      • #71
                        hello tinkerer



                        I'm not sure what the power draw is, I'll have to measure it , can't be much


                        Philip

                        Comment


                        • #72
                          Originally posted by hdphilip View Post
                          hello tinkerer



                          I'm not sure what the power draw is, I'll have to measure it , can't be much


                          Philip
                          I have an UNO32. The specifications say 75mA typical power consumption. Not bad for such a fast beast.

                          Chudster

                          Comment


                          • #73
                            Originally posted by chudster View Post
                            I have an UNO32. The specifications say 75mA typical power consumption. Not bad for such a fast beast.

                            Chudster
                            Most metal detectors are used in the field, where the power consumption is a very important factor.
                            We can look at the power consumption from different angles, but basically we have set a maximum.

                            Then we can divide this maximum into the several parts, by priority.

                            Most of the time, the TX will be the largest percentage.

                            If the audio uses a speaker, this will be a considerable percentage.

                            The signal processing, bells and whistles consume the rest.

                            It could be interesting to see how different designers define the priority of the various power consuming blocks.

                            Any opinions?

                            Tinkerer

                            Comment


                            • #74
                              hello tinkerer

                              i really haven't put much thought into power consumption yet,
                              I'm looking at it this way, will the performance of the metal detector be worth carrying a few extra battery packs out in the Field?

                              one of the challenges i'm thinking about is powering the CPU from the -12 supply, maybe it will start with it own oscillator then be in sync with the TX pulse,
                              or maybe we can use the flyback pulse to help power the CPU.

                              I just finished a new front end PCB (last night) this board will replace the 3 boards i have now, it will also have a few circuits to try out. a few new ideas .


                              Philip

                              Comment


                              • #75
                                hello chudster

                                so you have a uno 32 also,

                                If your planning to follow the thread, a big Welcome Aboard!



                                hopefully i can be some help to ya.

                                Philip

                                Comment

                                Working...
                                X