Announcement

Collapse
No announcement yet.

IB Metal Detector Project, Part 20

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • IB Metal Detector Project, Part 20

    I found the main cause of the performance problems in motion mode. It is something I was worried about at the beginning of the project. The A/D runs off a 4 usec clock. That means that the interval between A/D samples will always be a multiple of 4 usec. The timer that controls the coil drive pulses and starts the A/D must stay in sync with the A/D clock or there will be timing jitter that will cause noise in the input signal.

    When I first set up the timer interrupt I used a 4 usec timer clock and carefully checked to make sure there was no jitter. I later changed the timer clock to 1 usec to get finer control over the coil drive pulse width. I could swear that I checked at that time to make sure the clocks were staying in sync. But somewhere along the way they got out of sync. What was happening was that when the timer overflowed causing the timer interrupt I was not getting the timer reloaded before the next 1 usec tick of the timer clock. So when I requested a 76 usec interrupt period I was getting 77. Since 77 is not divisible by 4 the A/D was not sampling at the correct time. Some A/D intervals would be 4 usec longer than others. That caused noise in the data. There was no problem with a 4 usec timer clock because 4 usec gave plenty of time to reset the timer before the next tick.

    This noise was not causing too much trouble in air tests because it was a small percentage of the signal size. It mainly showed up as a spreading of the measured phase angles. But in tests with a strong ground signal the noise was a percentage of the ground signal and was stronger than the weak target signal. This is one of the problem with air tests. They don't reveal all the flaws in the system. I fixed the problem by reducing all the timer intervals by 1 usec. So I request 75 to get the 76 usec interval I need.

    The results for motion mode with 5.3 coil now are: air test at 5" triggers every time and phase angles are within a range of 10°. With the coil on the concrete floor and penny 5" above, it triggers most of the time and the phase angles are within a 15° range.

    This is the second time in the project that I have come to a point where the signal was buried in noise and I thought, "This is the end. This approach of reading the received signal directly with an A/D is just not going to work." But each time it has turned out to be a specific problem that could be fixed rather than an inherent limitation of this approach.

    Robert Hoolko
Working...
X