Check out how to build a short range metal detector useful for positioning proximity and robotics.

This GreenPAK™ application describes a short range metal detector useful for positioning proximity, and robotics. Some examples: include car doors, refrigerator doors, covers of various devices, lids, security interlocks, keys or locks. Typical implementations using optical couplers or inductive metal detectors usually result in relatively expensive cost of their components.

Below we described steps needed to understand how the solution has been programmed to create the tiny metal detector. However, if you just want to get the result of programming, download GreenPAK Designer software to view the already completed GreenPAK Design file. Plug the GreenPAK Development Kit into your computer and hit the program to design the device.

1.JPG

Design Goal

The main advantages of the induction metal detector based on the SLG46140 IC is low component and production cost, and a very compact completed device. It consists of two 2200 pF capacitors (C1 and C3), one 100 pF capacitor (C2), one GreenPAK IC SLG46140 (U1), 22 uH active inductor (L1) and LED (D1). The final size of the complete device is 5.5x11 mm.

The device has 10 mA of current consumption when idle, with a 5 V supply. It uses 64 mA when actively detecting metal, which includes approximately 50 mA for the LED. With the design shown here, the device detects the presence of a 3 mm diameter metal object out to a distance of 4 mm.

System Level Design Approach

The electrical circuit schematic of the tiny metal detector is shown in Figure 2. The principle of operation is as follows:

2.JPG
  • L1, C1 and C3 form an oscillating loop with a natural frequency of oscillation approximately 1 MHz.
  • This frequency is measured by the SLG46140 GreenPAK IC.
  • If the oscillation frequency is different from the value programmed in the GreenPAK IC, then both LED D1 illuminates, and the EXT signal to header P1 goes high.

The proposed PC board for the detector is shown in Figure 3. This is a small 2-sided board with dimensions of 5.5x6 mm. All the main elements of the board are on the top layer. Only the LED is on the bottom layer.

The coil L1 is mounted perpendicular to the board as shown in Figure 1.

3.JPG
4.JPG

SLG46140 Design Approach

The SLG46140 GreenPAK internal block circuit is shown in Figure 4.

The components configuration is next:

  • CNT0/DLY0 is in the counter mode and gives out short pulses once every 8 ms.
  • CNT3/DLY3/FSM1 is in the counter mode and gives out short pulses once every 100 ms.
  • PIN5 and PIN11 set as Digital Output with 2x push pull.
  • PIN9 set as Digital Output with 4x push pull.
  • PIN12 set as Digital Input with Schmitt trigger.
  • Configuration of other elements are shown in Figure 5.

Counter data for 4-bit LUT1/14-bit CNT2/DLY2/FSM0 may vary depending on the preset voltage, required distance of response, and magnetic susceptibility of the metal.

5.JPG

At initialization, PIN 12 is low. When you turn on the device the inverter 2-L1 will drive a high level on PIN9, and due to the inverter 2-L0, the external oscillator input EXT CLK1 is driven low.

A high level on PIN 9 will cause charging of the coil L1 and the capacitors C1 and C3. At the moment when the level of the charge on the capacitor C3 exceeds the threshold of the inverter 2-L1, it switches on and PIN9 will be low, and the external oscillator input EXT CLK1 will set high. The counter CNT2/DLY2/FSM0 counts rising edges of EXT CLK1. As capacitor C3 discharges, it will disable the inverter 2-L1, whose output will be switched on, PIN9 goes high, the external oscillator input EXT CLK1 will be low and the oscillating loop C1-L1-SLG46140[2-L1]-C3 will return to its original state.

After 500us from power on, the counter CNT0/DLY0 will switch on. Every 8ms it will reset the CNT2/DLY2/FSM0 value. If during this 8 ms the counter accumulates more than a given number of pulses (under laboratory conditions optimal number was 7800), it will set DFF2 trigger high. This trigger will be turned on within up to 100ms when the CNT3/DLY3/FSM1 will reset trigger DFF2 to the initial state. The high trigger output signal goes through the 2-L2 OR element and through the Pipe Delay (which is set to 9ms) to turn LED on and thus the EXT signal to header P1 goes high. The delay is used in this circuit to ensure no interruption of the signal of the metal object presence when the counter CNT3/DLY3/FSM1 resets the trigger DFF2.

If the device is moved further than 4 mm from the metal object, counter CNT2/DLY2/FSM0 will not have time to count the number necessary to turn on, and prevents the output going high. Then after less than 100ms, counter CNT3/DLY3/FSM1 will reset trigger DFF2 to the initial state.

9 ms after that the following occurs: Pipe Delay output goes low, OR 2-L2 output goes low, LED will be off and the EXT signal to header P1 goes low.

Conclusion

Using one SLG46140 GreenPAK it is possible to design a low cost, simple to implement and very compact metal detector, having a 4 mm detection range to small metal objects.

GreenPAK™ by Dialog Semiconductor
Dialog Semiconductor's Broad Family of Programmable Mixed-Signal ASICs