Circuits and Electronics (Fall 2019)
If you are a current student, please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.csail.mit.edu) to authenticate, and then you will be redirected back to this page.
###Metal detector mini-project
Before attempting a mini-project, please remember that:
- They are purely optional.
- They are meant to be fun, not to increase your grade.
- They are graded based on completion, not on effort. If you work on it for many hours and it doesn't work, you don't get credit.
- The staff cannot provide help on most aspects of the problem: they won't verify your design, help you design, help you debug, etc.
- We haven't implemented a design, and so do not know how hard or easy it will be to make the project work.
A metal detector is used to find buried treasure. Most metal detectors work by detecting the change in a variable inductor, where the inductance changes when the magnetic field produced by the inductor goes thru a metallic object, especially a ferrous metal. So a metal detector is just an inductance change detector.
In ex06 we learned how to design a relaxation oscillator, which uses an op-amp or comparator in positive feedback in order to make an oscillating signal. It follows that if the inductance in the oscillator changes, then so will the oscillation frequency.
In this mini-project, you will use the tools you've learned thus far in class to create an oscillator whose frequency measurably changes when a ferrous metal object is brought in the vicinity of the inductor.
We recommend that you use the relaxation oscillator circuit topology developed in ex06 to measure L. You may use a different topology, but if you do so, you must clearly explain how the circuit works in your video. It is not ok to use a cookbook circuit whose workings you don't understand.
For the oscillator comparator, we recommend using an LM311 comparator. Remember that in class we learned that in positive feedback it is fine (maybe even preferable) to use a comparator rather than an op-amp, because a comparator has a very fast slew rate.
- You'll want to power this with a dual supply, and we recommend +/- 5 V.
- The LM311 is a bit different than the MAX941 we used in the ultrasound lab. Specifically, you need to use pull-up and pull-down resistors at the output to make it work. The circuit in Figure 13 of the data sheet is a good start that shows how to connect the two output pins (1 and 7), but you'll likely need to add some hysteresis to make the output better behaved.
For the inductor, you will want to make your own by using a coil of wire. We suggest a target inductance in the ~1 mH range. Aim for an inductor with a radius in the 2-5 cm range. You may recall from 8.02 that the inductance of such a coil is \mu_0 r N^2, where r is the radius and N is the number of turns. There is also a coil winder in the EDS that you can use if you want to be a pro.
In terms of the resistors, you want as large as possible. Remember that we have 1/4-W resistors in the lab, so make sure you aren't going to blow them up (for example, by applying 5 V to a 10 \Omega resistor). Also be mindful that the comparator can only source and sink a limited amount of current (check the data sheet), which will also provide a bound on R.
The resistor size will also be dictated in by the oscillator frequency you want to achieve. The challenge in this mini project will be getting that frequency low enough. Shoot for a frequency <1 MHz, else it becomes problematic to implement on the breadboard. If you can get it down to ~100's kHz, that would be ideal (but may not be possible).
The comparator can be found at the staff table.
If you want to go even further:
Interface the circuit with the Teensy (via a digital input pin) so that the Teensy can measure the frequency (and the frequency change when an object is nearby), and can report that on the OLED display. The display could show the recent frequency difference, a statement like "object found", or a circle whose size increases with the frequency difference (like in the prox sensor lab). There is a nice frequency measurement library for the Teensy FreqCount that works up to 5 MHz.
You will want to turn the oscillator output into a digital signal (square wave) before sending it to the Teensy, similar to what we did in lab 7. You can use another LM311 comparator for that. Design the thresholds appropriate for the incoming signal (they will be different than what we used in lab 7). In addition, you can make it so the comparator outputs 0 V and 5 V (even if the inputs swing above and below 0 V) by tying the collector output (pin 7) to Vcc through a pull-up resistor, and tying the emitter output (pin 1) to ground instead of -Vcc. This is a variant of the circuit in Figure 13 of the data sheet.
When your system is ready, create a short video of it working that goes over the following:
show a schematic of your circuit and explain:
- how you chose the values of the components in the circuit
- estimated inductance with and without a ferrous material nearby
- estimated frequency with and without a ferrous material nearby
demonstrate operation by affixing your coil to a table and moving a large ferrous object over the coil. Do not touch the coil. Show on the oscilloscope that the oscillator frequency changes, in the right direction, and by an amount that makes sense.
if you want, use a metal object that is non-ferrous (like Al, or copper penny). These will decrease the inductance a bit, but induce a smaller change in L.
You must upload your video to Youtube or any other site that has a timestamp associated with it and is accessible by the staff.
Grading is explained on the grading page. Grading is binary, and depends not only succesful demo but also demonstrating that you understand how the circuit works.
This mini-project will add:
- 1.0 percentage points to your grade for part 1
- 1.5 percentage points to your grade for parts 1 and 2
We will grade projects that have videos submitted by midnight December 4.
Remember, this is supposed to be fun. Enjoy yourself!