design and implementation of shift …design and implementation of shift frequency measurement...
TRANSCRIPT
DESIGN AND IMPLEMENTATION OF SHIFT
FREQUENCY MEASUREMENT SYSTEMS FOR
METAL DETECTOR
Yin Thu Win1,a*, Aung Lwin Moe2,b and Aung Ko Ko Thet1,c
1Yangon Technological University, Myanmar2Malaysia Japan International Institute of Technology,
University Technology Malaysia, Malaysia
World Virtual Conference on Advanced Research in Materials and Engineering Applications
September 22-26, 2014
3. The algorithm of frequency counting
Contents
1. Introduction
4. Experimental Details
5. Measurement results and accuracy
2. Proposed Method
6. Conclusions
�Metal detectors are all based on the principle of dynamic
magnetic field of transmit coil and receive coil while
operating the metal is present in a surrounding.
�The most common types are Induction Balance (IB) system,
Beat Frequency Oscillation (BFO).
�The advantages of this (IB) metal locator are good in
penetration in the depth and can distinguishes well between
ferrous and non-ferrous metals.
�This Induction Balance metal detector has more sensitivity
than the other type of metal detectors.
Introduction
�This study concerns the design and implementation of frequency counter
with 4 digits seven segment LED display for metal detection system
using PIC microcontroller.
�New algorithm for frequency counting is developed.
� The software is also developed to detect the shift frequency
measurement from the VCO output.
�The corresponding frequency at the VCO output of Induction Balance
Metal detector is clarified.
�The experimental results of this research revealed that using
PIC16F628A for frequency measurement system is able to provide very
high accuracy for metal detection application.
Objectives
Benefits of Proposed systems
• Additionally, the proposed system is the cost effective,
less circuitry, high performance control system and
feasible for many other metal detection applications.
� This research aims to design frequency counter with four digit seven-segment
LED display for detecting metal object.
� The PIC microcontroller (16F628A) is used for cost effective, less circuitry
and high performance control system in innovative applications.
� Necessary assembly language program has been developed for this
application with programming mode for measurement set up and calibration
mode.
� When the metal detector has been near the metal object, the frequency
counter displayed for high sensitivity selection and low sensitivity.
� The practical experiments were carried out to display the four programming
modes of frequency counter and frequency measurements.
System Description
�Frequency counter displaying the signal from a Induction Balance(IB) metal
detector type which could be used for wet or dry ground including beach sand.
�This type of metal locator uses transmit coil and receive coil in the proposed
system. The increased signal at the receive coil which will perform for the
develop circuit operations and it means that the metal is detected.
�Then, the signal passed through the rectifier stage which has been filtered and
then passing through the non-inverting inputs of the comparator.
�The output from the comparator appeared and applied to the VCO of the
Induction Balance Metal Locator which is the input signal of the frequency
counter. Furthermore, the frequency counter operates by obtaining the signal
from the VCO output of metal detector.
� In order to display the corresponding frequency at the VCO output of
Induction Balance Metal Locator, the necessary software has been developed
by using PIC16F628A.
Proposed Method
Figure 1. Block Diagram of frequency counters for metal detector
Oscillator
Q1 (transmit)
Q2 Receive
coil
(amplifier)
IC1a-DC level ground set
Rectifier Filter IC1a
comparato
r
VCO
IC2
Frequency counter
with PIC16F628AFour digits
Seven segments
display
Coils
�The proposed system algorithm consists of a microcontroller to
implement the frequency counter which has three portions: the input, the
output and the process. Input-frequency is at RA4.
� In the process, firstly to set prescaler and count pulses for automatic range
setting at different gate times.
� Next, frequency calculation was performed and this signal was converted
four decimal digits.
� The four decimal digits were decoded as seven segment display and
finally multiplex seven segment display.
�The output-numerical display of measured frequency can be shown by
seven-segment LED display. This proposed system can measure
frequency range 1Hz to 50MHz.
Convert Four
Decimal Digits
NO
YES
Decode Seven
Segment Display
Multiplex
Seven
Segment
DisplayEND
A
Gate Time = 1/2s
Count Pulses
F = Count
Pulses x 2
F = Count
Pulses x 1
B
Gate Time =
1s
F< 10kHz?
Count Pulses
YES
NO
YES
NO
Prescalar OFFGate Time = 1/4s
START
Set Prescalar
(1/64)
Count pulses
TIMER0 module
F<1MHz?
F<100kHz?
Gate Time = 1/4sA
F = Count Pulses x
4
B
Count Pulses
Count Pulses
F = Count Pulses
x 4 x 64
B
Figure 2.(a) Flowchart of Frequency Counter (b) Flowchart of Frequency Counter (Contd.)
The algorithm of frequency counting
�The developed program for frequency counting has looping and
subroutines after giving the input frequency at the programming mode.
� In the main loop, the measurement of frequency is carried out with step
by step procedures.
� the frequency counting in four programming modes.
�For the highest frequencies, the pre-scalar is divided by 64 for program
execution. The next step is to count the input pulses for 1/16 second, and
the performance will work TIMER0 module.
�Moreover, the counting loop which consists of multiplexer operations
takes exactly 50 microseconds. Therefore,1250 counting loops will
become in a gate time of 1/16 seconds. According to the coarse
frequency measurement, the pre-scalar and measuring intervals are
selected respectively.
�Next, the developed counter’s pre-scalar is reprogramed then the divided
input frequency is less than 1MHz which is the highest value if the clock
is 4 MHz.
� If the input frequency is less than 1MHz, the pre-scalar is turned off in
this measurement step.
� While the program is operating, the gate time of measuring interval will
be 0.25 second, 0.5second, or 1 second.
�During this operation time, the display is working continuously. Then
gate time completed and counting pulses are stopped.
� If the pre-scalar was active while operating for the counts , multiply the
counted pulse with the pre-scalar ratio.
� If the gate time is 0.5 seconds, the counted pulse will be multiplied by 2;
if the gate time is 0.25 seconds, the counted pulse will be multiplied by
4. The result of the input frequency is in Hz, any pre-scalar ratio or gate
time can be used. The display multiplex routine while executing will
work these registers to the LED display.
Experimental Details
Figure 3 Frequency measurement in kHz range
�When no metal is present, frequency 955Hz is designated
as high sensitivity selection and frequency 625Hz is
denoted as low sensitivity selection.
�When the metal locator is brought near the metal object
and low sensitivity is chosen, 745Hz is displayed on
LED. Otherwise, high sensitivity is chosen, 1.149kHz is
displayed on seven-segment LED.
� The measurement accuracy for the constructed frequency counter has been performed
using frequency generator with the frequency range of 1Hz to 2MHz capability.
�The signal frequency produced from the frequency generator (1Hz to 2MHz) is
measured by the frequency counter which is implemented with four digits seven-segment
display.
�The first experimental performance was done with the range 1Hz to 10Hz. In a similar
performance, the measurements were done to display in frequency counter by reading the
signal from frequency generator with the set of frequency range (100Hz to 200Hz), (1Hz to
10kHz), (10kHz to 20kHz). According to the experimental results, it could be seen that the
measurement of frequency range between 1kHz and 10kHz can give the lowest error
percentage of this system operation.
�According to the practical measurement results, it can be found that the measured
frequency values displayed on the frequency counter are very closed to the frequency from
the frequency generator. Moreover, the practical measurement results proved that, higher
the frequency, lower the percentage of error in frequency. Therefore, the constructed
frequency counter has high accuracy and very useful for many applications.
Measurement results and accuracy
Table 1. Measurement results and error of frequency (Frequency range 1Hz to 2MHz)
10 to 100 Hz
True value (Hz) Measured value (Hz) Error (Hz)10.7 11 0.310.3 10 0.332.6 33 0.447.2 47 0.293.9 94 0.1
100 to 200 HzTrue value (Hz) Measured value (Hz) Error (Hz)
102.47 102 0.47139.49 139 0.49159.10 159 0.10181.81 182 0.19189.10 189 0.10
1kHz to 10kHzTrue value (kHz) Measured value (kHz) Error (kHz)
1.972 1.97 0.00023.853 3.85 0.00036.824 6.82 0.00048.432 8.43 0.00029.712 9.71 0.0002
10kHz to 20kHzTrue value (kHz) Measured value (kHz) Error (kHz)
10.702 10.70 0.00213.570 13.57 0.00014.262 14.26 0.00216.904 16.90 0.00418.364 18.36 0.004
100kHz to 2 MHzTrue value (kHz) Measured value (kHz) Error (kHz)
106.04 106.0 0.04130.44 130.4 0.04189.05 189.1 0.04280.49 280.4 0.091850.9 1850.0 0.9
� The frequency counter and 4 digits seven segment LED display with the PIC
microcontrollers (16F628A) has been designed and implemented
� The frequency counter displayed 1.149 kHz for high sensitivity selection and
0.955 kHz for low sensitivity when the metal is detected.
� The practical experiments were done to display the four programming modes
of frequency counter and frequency measurement for 66Hz.
� The developed frequency counter using PIC16F628A is able to provide
major benefits such as high accuracy and excellent performance feature in
wider frequency measurements.
� It is efficient, cost effective, less circuitry and useful for many other
applications.
� This system could extend to distinguish the type of metals and locations by
using digital signal processing method and GPS signal while monitoring
from personal computer.
Conclusions
Thank you