Announcement

Collapse
No announcement yet.

My New Pi Metal Detector (ATTiny 25)

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

  • #31
    As far i can understand, this is some sort of software controlled integrating analog to digital converter, using external RC circuit and internal uC comparator, does it? Nice approach, but many other issues have to be addressed before this can be full blown PI detector project.
    (I will replay to your other topics ASAP)

    Comment


    • #32
      Originally posted by Tepco View Post
      As far i can understand, this is some sort of software controlled integrating analog to digital converter, using external RC circuit and internal uC comparator, does it? Nice approach, but many other issues have to be addressed before this can be full blown PI detector project.
      (I will replay to your other topics ASAP)
      Thanks for getting back to me!

      Yeah pretty much

      the microcontroller's internal comparator continually monitors the coil voltage (protected by two bi-directional diodes)
      when it catches a rising edge it clears the counter, when it catches a falling edge it gets the the time and adds it to a array of around 32 samples, that is averaged, when the average rises above or below the value set by the varible resistor, read via the adc it begins making sound, freq proportional to the target's signal

      I personally think that the comparator in the attiny series is limited and digital noise is a broblem.
      My latest idea is to use a analog reciever and digital transmitter,
      the transmitter will output two signals, one to drive the mosfet and another do try to closly match
      the output of a deticated external high speed comparator, then (with analog electronics) amplifiy that phase shift and maybe feed it back into the tx microcontroller for the tone generation

      in the end it would actually simplify the circut and reduce noise

      Why I think this is better than the conventional voltage sampling method?

      Essentially all that is happening is a phase shift, whether we pick it up as voltage or time dosn't matter.
      If we pick it up as voltage we have alot more sources of noise,
      A. amplification (not necessary on a time based solution)
      B. delay time (inaccuracy in the delay time produces noise)
      C. ADC Noise, Error and Resolution (if applicable)
      D. Noise (Lots more noise)


      I purchased the LT1016, I'll see how it dose for an external comparator, it will connect to the coil with the same bi-directional diodes and compare it with a variable reference voltage (equivalent to delay time on a conventional unit)


      Thanks guys!

      Comment


      • #33
        Originally posted by jon-ecm View Post
        I took a video explaining the core concepts behind this machine.

        http://www.miymd.com/files/6513/0245/5784/IMG_2342.MOV

        I very much enjoyed watching your video. keep up the good work
        I hope this starts a trend in video documentation of project development!

        Could it be that your noise problems with the built in comparator are due to layout & grounding? I've had quite a bit of experience with the Microchip PIC comparators built into 16F series devices and found them to be very stable with good layout and psu regulation & decoupling.

        Comment


        • #34
          Originally posted by AdrianM View Post
          I very much enjoyed watching your video. keep up the good work
          I hope this starts a trend in video documentation of project development!

          Could it be that your noise problems with the built in comparator are due to layout & grounding? I've had quite a bit of experience with the Microchip PIC comparators built into 16F series devices and found them to be very stable with good layout and psu regulation & decoupling.


          Glad you enjoyed the video.

          It's very possible that my problems are due to in-proper ground and layout, I'm using a socket and just a cruddy
          bread board, I did put tape and tin foil on the bottom of everything for a ground plane but I'm sure it would be
          better if I made a dedicated pcb, but I personally think that an external comparator will be more precise and have less noise, the mcu makes it's own noise from the cpu, ports etc...

          Comment


          • #35
            PCB obviously the way to go when you're design's perfected, but have you ever tried "carving" one with a hobby knife to get the benefits early on?

            I take double sided FR4 and trace out "lands" for parts then cut narrow strip channels to isolate them. Make two parallel scores about 1mm apart, lift the copper with the blade then grab with tweezers and pull up to remove. It usually comes away like magic! Drill through lands to link to the back side (ground plane) and then surface mount parts on the lands. DIP packages can have legs splayed out (or DIP sockets) and proper SM or leaded components can be added at will. I find this a great way to knock up simple(ish) circuits for development while retaining low-impedance ground and switching paths.

            Attached Photo shows Mosfet and driver front-end for rapid test and development on a carved PCB as described. 0.1" header goes off the bottom edge on to breadboard for more circuitry in groups of two or three for easy carving
            Attached Files

            Comment


            • #36
              nice!

              Originally posted by AdrianM View Post
              PCB obviously the way to go when you're design's perfected, but have you ever tried "carving" one with a hobby knife to get the benefits early on?

              I take double sided FR4 and trace out "lands" for parts then cut narrow strip channels to isolate them. Make two parallel scores about 1mm apart, lift the copper with the blade then grab with tweezers and pull up to remove. It usually comes away like magic! Drill through lands to link to the back side (ground plane) and then surface mount parts on the lands. DIP packages can have legs splayed out (or DIP sockets) and proper SM or leaded components can be added at will. I find this a great way to knock up simple(ish) circuits for development while retaining low-impedance ground and switching paths.

              Attached Photo shows Mosfet and driver front-end for rapid test and development on a carved PCB as described. 0.1" header goes off the bottom edge on to breadboard for more circuitry in groups of two or three for easy carving
              That sounds like a really good idea.

              I've spent hours trying to file out traces for smd components in double sided 2oz pcb's and would often cut to far and ruined the things, I'm a perfectionist and it seemed I could never get it perfect, The only thing i ever completed using the filing method was a lipo charger (3 attempts later) .

              Cutting sounds like a MUCH better idea then filing though, I'd never thought of that

              Before moving to etching with muriatic acid and h2o2 I would do the toner transfer and the use electrolysis in salt brine to eat the bare copper up. worked ok but acid is way cleaner, I just put tape on the other side if it's double sided

              Comment


              • #37
                Give it a try then! Like I said, the magic ingredient is the fact that the copper peels off cleanly once you've teased it up off the substrate to start it off. If you get a batch that's not so cooperative run a heat gun over it to soften the adhesive before peeling. If you're a perfectionist run your hobby knife along a straight edge, but I personally like the wavy look

                Comment


                • #38
                  Thank you for the video.
                  Can we have an official final list of components required for the project?

                  thanks again!

                  Comment


                  • #39
                    components

                    I put up a list of components on my site here

                    Comment


                    • #40
                      Something conceptually similar is already appeared on this forum:

                      http://174.132.129.189/%7Emoreland/forums/attachment.php?attachmentid=7989&d=1236810600

                      In this version whit front-end preamp (badly needed), good coil etc may be useful info. Good luck whit this project.

                      Comment


                      • #41
                        BT1

                        There are some differences,
                        First of all his uses the attiny12, this chip is has a max timer speed of 1.2mhz (.83 us) to get around that he decided to use the cpu to delay a predefined amount of time and then test to see if the comparator output is high or low, the max cpu speed is 8mhz (.125us) and the cpu is from my experience, horrible at counting time precisely.
                        mine uses a pll clock that is set at 64mhz (16ns) so it obviously will detect a smaller change in decay time

                        the front-end amp is a great idea though and I have plans to implement it into the next version!
                        also plan to convert the front-end to moistly analog and looking at the possibility of multiple comparators, less noise and simple disc.

                        Comment


                        • #42
                          Originally posted by jon-ecm View Post
                          Thanks for getting back to me!
                          ...
                          If we pick it up as voltage we have alot more sources of noise,
                          A. amplification (not necessary on a time based solution)
                          B. delay time (inaccuracy in the delay time produces noise)
                          C. ADC Noise, Error and Resolution (if applicable)
                          D. Noise (Lots more noise)


                          I purchased the LT1016, I'll see how it dose for an external comparator, it will connect to the coil with the same bi-directional diodes and compare it with a variable reference voltage (equivalent to delay time on a conventional unit)


                          Thanks guys!
                          I'm not sure about the A->D conversion using Attinys, but with my atmegas, for proper conversion, Aref pin requires a .1uF Cap to grnd and Avcc requires a filter using a 10uH choke for noise reduction. I don't see these two pins on the Attinys?

                          ADC is really awesome with the @megas. Most have 10 bit resolution (although 8 bit is appropriate for most applications IMHO)!

                          The best way ( I have found) internal noise is to poll a persistent ADCH value to lcd.

                          uint16_t adc_value =0;
                          adc_value = ADCH;
                          printf("%d", adc_value);

                          You need 8bit mode lcd though, and I dont' think attinys have enough pins. When noisy, that adc_value is unsteady...

                          In other words, from my limited experience with ADC, you're probably right about your noise issues

                          Comment


                          • #43
                            Originally posted by jon-ecm View Post
                            I put up a list of components on my site here
                            Hi jon-ecm
                            good job
                            what is the detection depth for your detector?

                            all the best
                            mehdi

                            Comment


                            • #44
                              @mario
                              Currently the adc is only used for measuring the voltage divider that controls sensitivity.
                              noise is still an issue with it though so I make sure it returns 20 consecutive readings of the same value before changing the sensitivity threshold.


                              @mehdi
                              I don't have an inductance meter but when testing with a 8" coil wrapped out 50' of 28 guage wire single strand teflon insulated.
                              I can hit a penny at 8",
                              a 0.8 gram lead pellot at over an inch.

                              Comment


                              • #45
                                Hi joa-ecm
                                thanks for reply, surely this is my next project.

                                all the best
                                mehdi

                                Comment

                                Working...
                                X