I was searching for tools to help me find and measure small quantities of iron in otherwise non magnetic samples. I found a piece of laboratory equipment that would do this. The principle is that the sample is inserted into a coil, and the amount of iron varies the inductance of the coil, and then the electronics determine from the change in inductance what (roughly) the iron content is. Trouble is this machine costs $15,000.
I thought - metal detctor circuit - plus some fancy electronics - a picaxe job for sure. I researched metal deteectors, the ones you use on the beach for finding coins. Seems the heart of these devices is a Colpitts oscillator - i have never heard of such a thing. (diagram attached) Seems that the coil and a pair of capacitors will naturally oscillate. If the inductance of the coil varies, so does the frequency of the oscillation and then you measure the change qualitatively to get the squealing noise you get from metal detectors. There is a formula with inverse of square root and pi and other stuff, that ties inductance , capacitance and frequency together. You probably learn that in electronics school, but it was news to me.
Well i built such an oscillator (was not so natural) and even learned how to use a borrowed oscilloscope. I put the output from the oscillator into a rail to rail op amp with high gain, so now i get some reasonably healthy looking 0-5V peaks with squareish tops and bottoms with 50% duty cycle. So far so good.
I bought a Jaycar QM 1544 pocket meter, capable of measuring frequency. My oscillator circuit oscillates at 54 kHz. The frequency does change ever so slightly when tiny quantities of iron are inserted in the coil. When a big lump of metal is inserted, the amplitude of the peaks falls and the wave form disappears completely, and you have to physically massage it to get it back.
My idea is to use the picaxe count function to count a lot of pulses, and then to measure a difference when a sample was inserted, and somehow make a measurement from the frequency change.
The manual says that at normal picaxe frequency, the highest frequency of pulses that can be counted is 25 kHz. But, with the magic of an external 8mHz resonator on a 28x2, the setfreq command, the speed can be increased to four times the normal. That should enable 56kHz to be measured.
But, it just doesn't work. I get a big fat zero.
I have measured with the mulimeter that the signal is getting to the picaxe pin OK, but no counts. When i connect/disconnect, sometimes numbers come up, some stray signals, but zero whenit is connected.
I don't know what to do next.
Any ideas?
I would ideally like to be at a higher frequency, i have read that metal detectors are usually at 100 - 200 kHz, but i'm finding my own way.
I thought that the frequency of pulses may still be too high despite what the book says, and learned that there is such a thing as a prescaler or cmos counter/divider. Would these be of any use? There seems to be so many options with these.
Any help appreciated.
Michael
I thought - metal detctor circuit - plus some fancy electronics - a picaxe job for sure. I researched metal deteectors, the ones you use on the beach for finding coins. Seems the heart of these devices is a Colpitts oscillator - i have never heard of such a thing. (diagram attached) Seems that the coil and a pair of capacitors will naturally oscillate. If the inductance of the coil varies, so does the frequency of the oscillation and then you measure the change qualitatively to get the squealing noise you get from metal detectors. There is a formula with inverse of square root and pi and other stuff, that ties inductance , capacitance and frequency together. You probably learn that in electronics school, but it was news to me.
Well i built such an oscillator (was not so natural) and even learned how to use a borrowed oscilloscope. I put the output from the oscillator into a rail to rail op amp with high gain, so now i get some reasonably healthy looking 0-5V peaks with squareish tops and bottoms with 50% duty cycle. So far so good.
I bought a Jaycar QM 1544 pocket meter, capable of measuring frequency. My oscillator circuit oscillates at 54 kHz. The frequency does change ever so slightly when tiny quantities of iron are inserted in the coil. When a big lump of metal is inserted, the amplitude of the peaks falls and the wave form disappears completely, and you have to physically massage it to get it back.
My idea is to use the picaxe count function to count a lot of pulses, and then to measure a difference when a sample was inserted, and somehow make a measurement from the frequency change.
The manual says that at normal picaxe frequency, the highest frequency of pulses that can be counted is 25 kHz. But, with the magic of an external 8mHz resonator on a 28x2, the setfreq command, the speed can be increased to four times the normal. That should enable 56kHz to be measured.
Code:
#picaxe 28X2
setfreq em32
main:
pause 20
count 1, 1000, w1 ' count pulses in 1 seconds
'
sertxd("count ",#w1,13,10)
pause 10
goto main ' else loop back to start
I have measured with the mulimeter that the signal is getting to the picaxe pin OK, but no counts. When i connect/disconnect, sometimes numbers come up, some stray signals, but zero whenit is connected.
I don't know what to do next.
Any ideas?
I would ideally like to be at a higher frequency, i have read that metal detectors are usually at 100 - 200 kHz, but i'm finding my own way.
I thought that the frequency of pulses may still be too high despite what the book says, and learned that there is such a thing as a prescaler or cmos counter/divider. Would these be of any use? There seems to be so many options with these.
Any help appreciated.
Michael
Attachments
-
21.5 KB Views: 32