Announcement

Collapse
No announcement yet.

Arduino based VDI!

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

  • Arduino based VDI!

    Without too much trouble I wrote an Arduino based program for an VDI module.

    I had originally posted this under the IDX section but maybe deserves a thread of it's own since it should be able to run on a variety of detectors. I just happen to be using the an IDX kit, minus his VDI module from Silverdog for this experiment.

    I struggled with this for a few days until I got the accuracy down but now works perfectly! Problems I ran into were determining how long to sample each channel and inconsistent calculations using floating point numbers.

    I used an Arduino UNO, just because it's the most popular. Documentation for the Arduino is excellent, so even a hobby guy like be could figure it out. Basically the program monitors the last stage of the GB and DISC channels, takes 50 samples of the ratio between the GB and DISC channels when both are triggered , throws out any bad numbers, averages them and displays a number that is porportional between 0 and 100.

    Details of the Arduino are here:


    http://www.arduino.cc/


    Here is a link to my experiment:

    http://www.youtube.com/watch?v=b93lf...ature=youtu.be

    Enjoy!

    Don
    Attached Files

  • #2
    Below are the hardware details. Besides the Arduino UNO, all that is needed is and LCD displays that is compatible with the Hitachi HD44780 driver. I just used a standard 2 X 16 LCD backlight.

    For the IDX:

    Pin A0 - > All metal (U3 Pin 1)
    pin A2 - > Disc Channel (U3 Pin 14)
    Ground - > Ground
    +5V power source.

    That's it!!
    Don
    Attached Files

    Comment


    • #3
      I think this is going to be a very interesting thread. I do have one question.
      Is the USB cable used to program it specific to the Arduino UNO or will any standard USB cable work?

      I ordered an Arduino UNO today and did not think about it until afterwards.

      Jerry

      Comment


      • #4
        Great work Don thanks

        Comment


        • #5
          Originally posted by Jerry View Post
          I think this is going to be a very interesting thread. I do have one question.
          Is the USB cable used to program it specific to the Arduino UNO or will any standard USB cable work?

          I ordered an Arduino UNO today and did not think about it until afterwards.

          Jerry
          Jerry,
          Just uses a standard USB printer cable that you can pick up just about anywhere.

          Don

          Comment


          • #6
            Originally posted by dfbowers View Post
            Below are the hardware details. Besides the Arduino UNO, all that is needed is and LCD displays that is compatible with the Hitachi HD44780 driver. I just used a standard 2 X 16 LCD backlight.

            For the IDX:

            Pin A0 - > All metal (U3 Pin 1)
            pin A2 - > Disc Channel (U3 Pin 14)
            Ground - > Ground
            +5V power source.

            That's it!!
            Don
            Attached is the complete .ino file.
            Also, spotted a small error above-

            Pin A0 - > All metal (U3 PIN 1)
            Pin A1 - > All metal (U3 Pin 14)
            Ground - >Ground
            +5v power source.

            Don
            Attached Files

            Comment


            • #7
              Originally posted by dfbowers View Post
              Jerry,
              Just uses a standard USB printer cable that you can pick up just about anywhere.

              Don
              Thanks Don, I have several.

              Jerry

              Comment


              • #8
                Good work dfbowers, thanks.

                Comment


                • #9
                  Originally posted by elbombaci View Post
                  Good work dfbowers, thanks.
                  Yes! I saw your video's (along with others) and that is what gave me some inspiration to write a small program for the Arduino. was thinking of downloading the code to the Arduino NANO or MIN, which would be very small but would be somewhat liimited as compared to your project.
                  Thank you!

                  I will have to translate the details of your project from the other website.
                  Thank you.
                  Don

                  Comment


                  • #10
                    nice job Don,

                    your code even compiles on Mpide 0023 for my Chipkit uno 32 !!!

                    Philip

                    Comment


                    • #11
                      Great work Don. Congratulations.

                      I cannot find nothing about power consumption?

                      Comment


                      • #12
                        Originally posted by WM6 View Post
                        Great work Don. Congratulations.

                        I cannot find nothing about power consumption?
                        Probably depends on how many pins you are driving.

                        Looks like recommended power range is 7 - 12V from an external souce. I'll have to check mine out before thinking about hooking it directly to a detectors regulator.

                        Comment


                        • #13
                          I love this. Has anyone done a full metal detector with the Arduino?

                          Comment


                          • #14
                            Hi Don. Neat work right there.

                            A question or two for you.



                            With the detector you hooked into -

                            1) what is the phase difference between the 2 Rx channels you used (GB and disc) - are they in Quadrature?

                            2)How did you get aroun the floating point mare?

                            Steve

                            Comment


                            • #15
                              Originally posted by golfnut View Post
                              Hi Don. Neat work right there.

                              A question or two for you.



                              With the detector you hooked into -

                              1) what is the phase difference between the 2 Rx channels you used (GB and disc) - are they in Quadrature?

                              2)How did you get aroun the floating point mare?

                              Steve
                              Hi Steve,

                              I'm using the IDX Kit from Andy (Silverdog). I experimented a bit with the TGSL and the channels seem much too noisy.

                              There are multiple ways that you can tie the Arduino into the IDX circuit, but mine is connected to pins 3 and 5 of U4. The only drawback is that the VDI numbers will change when adjusting the DISC. I just set my DISC and leave it anyway..

                              You are not measuring any phase directly, but the DISC and GB channels will have amplitude and timing differences. By plotting them on a graph with X & Y components, you can create a phase relationship.. all to easy to see if you plot X against Y on your scope :
                              http://www.youtube.com/watch?v=m9DuMekVwic

                              Then, just set a trigger and measure the slope of the line that you see on the scope. You CAN translate that into an angle using the ARCTAN function and I think that's what others are doing. I'm still having trouble getting the ARCTAN to work with the Arduino. I think I might have to download another math library.

                              Can you ask your question again about floating point?

                              Don

                              Comment

                              Working...
                              X