Shop OBEX P1 Docs P2 Docs Learn Events
Metal detector running on BS2px — Parallax Forums

Metal detector running on BS2px

P!-RoP!-Ro Posts: 1,189
edited 2008-06-23 03:06 in BASIC Stamp
I want to make a metal detector that can measure how far away metal objects are. I'm planning on using two coils and measuring the electromagnetic induction that occurs when it goes near a metal object. I've done some experimentation with it by using two coils of wire, one connected to a 16v AC outlet supply and another to an led. When I used a coil with a much smaller diameter, it worked really well at lighting up the led, so much I didn't even push the rod in all the way to make sure I didn't burn it up. After doing this I tried making the coil bigger, using the·same length of wire (each piece is at least 20' long) and changed the diameter from about half an inch to 3 inches. When I did this, it barely picked up any electricity in the second coil even when I put a lot of metal in the center. For some reason, the best object I found was a tin can. If I wanted to get it to light the led though, I had to put it in the center. If I use it with the Basic Stamp, I'm going to want much more voltage coming out but I don't know how.
·
I've also been wondering how to calculate the voltage with the Basic Stamp. I could change the voltage to DC by using a diode and a capacitor to even out the fluctuation, but diodes also reduce the voltage making it even lower, and even when I do get it converted I wouldn't know how to calculate the voltage in it. I was thinking of using a capacitor and rctime, but I don't think that will work if I am already using a capacitor to steady the power fluctuation.
·
My third problem is trying to get the metal detector to work off of battery power. I was thinking of using a transistor to turn the power on and off, changing the poles 60 times a second to get AC, but I'm not sure if that's the best way to do it. Also, I thought of just turning the power on and off rapidly, increasing the speed the stamp can do it, but there might be some problems with that. I'm not sure why, but I noticed that when I place a diode on the AC power supply coming in it worked just like the normal AC did, but before I did this I noticed whenever I turn it on the led will flash briefly, even if I don't have a metal core. Since I don't have any transistors that operate at the voltage I want, I decided to go the manual way and attach DC voltage to a motor, setting it up so the gear attached to it was connected to a pin. If I touched the wire to it the metal gear would make a connection with the motor and it would spin. Since the gear has spacing in it, as it rotates it would make a connection then disconnect it as it spun. When I tried this, I found the led would light without any metal being even near the coils. I'm guessing this has something to do with the fact that AC increases to a peak then decreases switching poles, and the circuit I made goes form suddenly power to none and back to power again. If this is the reason, I may have trouble getting AC power by using batteries.
·
Thanks in advance for your help.
·

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Pi Guy

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-21 00:57
    Have you checked the Wikipedia? See: en.wikipedia.org/wiki/Metal_detectors. I'm sure you could find some sample circuits with a simple websearch. You don't need a lot of power to drive a metal detector. A Stamp could easily do it using an external driver like a ULN2803 which Parallax sells and has lots of documentation on its use.

    You could use RCTIME to measure the output voltage, but that's a relatively slow process. You'd be better off using a simple analog to digital converter like the ADC0831. There's plenty of documentation on using this with a Stamp. The tutorial "Basic Analog and Digital" has a chapter on it.

    Here's another link: http://geotech.thunting.com/cgi-bin/pages/common/index.pl?page=metdet&file=projects.dat


    Post Edited (Mike Green) : 6/21/2008 1:09:41 AM GMT
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2008-06-21 05:04
    I LIKE PI,

    There are a few ways to detect metal quite easily with any variety of Basic Stamp, SX, or Propeller. A better description of what you are hoping to accomplish might help. Creating AC from a DC source is not terribly difficult. Your description in reference to 60Hz sounds more like an adjustable air-gap AC coupled transformer. A metal detector of sorts, but probably not what you are really looking for.


    Here is an example I posted some time ago of a quick and dirty sensitive metal detector for the BS2... should work just fine with a BS2px
    http://forums.parallax.com/showthread.php?p=467144

    Keep in mind this is not a one size fits all solution, just an example, and there might be something more suitable to your application.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • P!-RoP!-Ro Posts: 1,189
    edited 2008-06-23 03:06
    Thanks Mike and Beau, it's just what I'm looking for! If all works out well, I'm hoping to attach it to a robot that can map metal objects in the ground using the propeller.·Since·I'm·new to the propeller,·I decided I would first try it with a language I'm more comfortable with first. Thanks for your help!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Pi Guy

    Post Edited (I LIKE PI) : 6/23/2008 3:12:10 AM GMT
Sign In or Register to comment.