After reviewing several metal detector schematics, I've decided to make an Arduino-based metal detector that uses the BFO principle. I started by reading up on how metal detectors work on How Stuff Works. There are three types of metal detectors:
1. Very Low Frequency (VLF). The part of the VLF metal detector that skims along the ground has two concentric coils. The outer coil is called the transmitter coil. The metal detector circuit runs electric current through it, which generates a magnetic field perpendicular to the ground. The circuit reverses the direction of the current, typically hundreds of times per second, which changes the polarity of the magnetic field. The number of times the current changes direction per second is called the frequency of oscillation, or sometimes the frequency of the coil. As the magnetic field pulses into the ground, when it hits a conductive object, the object starts generating its own weak magnetic field. The inner coil, called the receiver coil, is shielded from the magnetic field of the transmitter coil, but not from magnetic fields coming from the ground. When it encounters a magnetic field coming from the ground, an electric current runs through the transmitter coil, with the same frequency as the object's magnetic field, which allows the metal detector to detect approximately how deeply the object is buried and what kind of metal it is. Most consumer metal detectors are VLF.
VLF Illustration. Image Credit: http://electronics.howstuffworks.com |
2. Pulse Induction (PI). The metal detector sends short bursts of current through the search coil, which sends brief magnetic fields into the ground. If the coil is over a metal object, the object generates an opposite magnetic field, and the search coil's pulse takes longer to fade. It's a bit like echolocation, but with magnetic pulses instead of sound. PI detectors can't really discriminate between different types of metal. However, they're good for when there's conductive material in the environment, like for salt-water exploration.
3. Beat-Frequency Oscillation (BFO). The circuit runs current through the search coil, switching current direction many times per second (much like the transmitter coil of the VLF). When metal is moved near the search coil, the coil's frequency changes. A second coil, the reference coil, is turned to have the same frequency of the coil changes. A second coil, the reference coil, is tuned to have the same frequency that the search coil has when not near metal. The two frequencies are fed into the circuit, which translates the difference between the frequencies into a user-friendly signal, like an audible tone or visible meter.
Armed with that knowledge, I started looking up metal detector schematics. I found four pretty simple ones:
- http://www.electroschematics.com/6046/cheap-metal-detector-circuit/
- http://www.electroschematics.com/1075/simple-metal-detector-circuit/
- http://www.electroschematics.com/7/metal-detector-diy-schematic/
- http://www.easytreasure.co.uk/bfo.htm
Since I want my robot to eventually run autonomously, it needs to have a "brain" onboard. Since I've worked with Arduino before (for a full account of that adventure, you can read the blog posts from the research lab I worked at last summer), I decided to use an Arduino Duemilanove. To quote my post from last summer, "Arduino is a brand of microcontroller board designed to help you quickly build circuits and write programs that interact with the physical world. You can think of an Arduino as a tiny, and limited, computer. You can write programs on your laptop or desktop, then upload them to the Arduino board through a USB cable." Since I'll be using an Arduino anyway, I thought it would be simplest to have the Arduino read the metal detector too, so I went hunting for an Arduino-based metal detector schematic. I found a really extensive discussion about metal detectors on the Arduino forum, but in the end I decided to follow a design from Dzl's Evil Genius Lair.
Image Credit: Dzl's Evil Genius Lair |
It's similar to a BFO metal detector. However, instead of comparing the search coil frequency to the frequency of a reference coil, the Arduino compares the search coil frequency to a stored value. To calibrate the metal detector, you power on the circuit with no metal around, and then press the null switch to record that search coil frequency. The Arduino stores that frequency, and reports that metal has been detected when the search coil frequency differs from that stored value. I'm not sure what a null switch is, but from Dzl's description of what it needs to do, I think I can use one of the pushbutton switches that came in my Arduino starter kit.
Image Credit: http://www.smcelectronics.com/SW52.JPG |
The starter kit also included a little Piezo buzzer, which I probably won't use in my final design, but it could be useful for testing the circuit. Or I might use an LED and have it get brighter when metal approaches. I ordered variety packs of resistors and capacitors from Amazon, which will be useful for future projects as well. I also ordered a transistor, on eBay- commenters on Dzl's blog had trouble getting it to work with the 2n2222 transistor, so he now recommends the BC547 transistor. The capacitors arrived today, and I have the necessary resistors in my Arduino started kit, so as soon as the transistor gets here I can start building the circuit. I also have to decide which appliance motor I'm going to sacrifice for its enameled copper.
This week, I got my USB webcam to work! It would be really cool to be able to watch live video from the robot on a computer or tablet (probably tablet, since I could put it in a gallon-sized Ziploc to keep sand out of it). Someone at the swap meet a couple weeks ago was selling a Logitech webcam for a dollar, so I took a chance on it. It's a Logitech Quickcam, model number V-UBG35.
Image Credit: www.laptopsolutions.ca |
I plugged it into my laptop, and my family's desktop, and all it would do was try to install drivers and then give me an error message. It turns out that the V-UBG35 was designed for Windows XP and Vista, and isn't compatible with Windows 8. Luckily, I found software (LWS 1.1x64 with Vid) on the Logitech support site to make it compatible with Windows 8, and ran the Windows Program Compatibility Troubleshooter (as described here). The webcam works now; the video quality is grainy, but might be good enough for this. All I really need is to be able to see when it's heading towards water or an obstacle, so I can power it off or make it turn around (if it fails to turn on its own).
In my next post, I'll talk about my progress on drivetrain designs.
No comments:
Post a Comment