The STEVAL-IFS006V1 inductive proximity switch demonstration board is designed based
on the principle of metal body detection using the eddy current effect on the HF losses of a
coil. It consists of a single transistor HF oscillator, an ST7LITEUS5 microcontroller and the
TDE1708DFT intelligent power switch. The board is a compact and cost-effective solution
for an inductive proximity sensor designed for simplicity and for a wide temperature range
and supply voltage variations. Other board features include:
■ Great flexibility: the MCU firmware can be modified depending on application
requirements
■ Sensitivity and hysteresis adjustment
■ In-circuit programming and debugging capabilities
Proximity switches are generally used to sense the position of a moving object in
manufacturing processes. Typically, they utilize an oscillator driver circuit in combination with
an induction tank circuit. The tank circuit includes an induction coil as a means for sensing
the presence of an object such as metal. The magnetic field induces eddy currents in a
conductive object which enters within the generated magnetic field. The oscillation
amplitude is attenuated due to the energy drawn from the induction coil. The amount of the
attenuation is directly related to the distance between the metal object and the induction
coil.
A typical inductive proximity switch employs a ferrite cup core as the sensing element. It
allows the flux field to be focused in front of the cup and to further increase the sensing
distance. The oscillator typically operates between 100 kHz and 800 kHz, where the eddy
current losses are significant.
Some benefits of the MCU approach compared with a traditional solution are:
●more reliable operation thanks to the sensor self-diagnostics
●cheap and easy sensor trimming in the production line
The sensor HF oscillator circuit is based on the Colpitts oscillator type which has a simple
circuit configuration, produces a very clean sinusoidal wave signal and is capable of
oscillating in a wide frequency range. The resonant circuit consisting from the inductor L1
and capacitors C12, C9 and C8 determine the frequency of the oscillations according to the
formula in Equation 1. Actually the circuit will oscillate at a slightly lower frequency due to
coupling capacitor C10, junction capacitances of transistor Q1 and other stray capacitances.
The oscillator employs a transistor, Q1, operating in a common base configuration that
derives its feedback from the capacitor divider C9 andC8. Resistors R3 and R6 set its bias
point and the temperature of diode D2 stabilizes it.
The oscillator signal amplitude is further detected by diodes D4 and D5, and filtered by
capacitor C13. Together with C10 this circuit acts as a charge pump, thus the full range of
the ST7 ADC converter (0 V - 5 V) is used.
1
12
C8C
--------------------- -+
C8C9+
9
⎛⎞
L1C
⎜⎟
⎝⎠
The other function of diode D2 is temperature sensing. The voltage across a diode operated
at constant current is linear in a very large range of temperature and reduces with
increasing temperature by approximately -2 mV/ k (see Figure 9). With the ST7 10-bit ADC
converter, the temperature can be measured with an accuracy of approximately 2.5 °C
which is enough for overall correction of the sensor temperature variations (see Figure 8).
2.1 Initial configuration and jumper settings
Ta bl e 1 and Figure 3 represent the initial (high side) output driver configuration and jumper
settings. The diagnostic LED D3 shares the MCU pin 2 with the ICC connector. In case of
programming/debugging problems, it can be disconnected by removing the jumper from
pins P14 and P15.
Table 1.Initial configuration and jumper settings
PinsSetting
P10 - P11A - HS
P4 - P5LED - C
P3 - P7+Vs - LS
P14 - P15+5V - A
6/16
AN2679Sensor circuit description
Figure 3.Initial configuration and jumper settings
$
!(3
$
'.
'.
(3
$
,OAD
0OWER
3UPPLY
,%$#
6
6S
!
!-6
2.2 Output driver configurations
The demonstration board output can be configured using the jumpers for low side (see
Ta bl e 2 and Figure 4) and/or high side (Ta bl e 3 and Figure 5) functionality.
Table 2.Low side (NPN) output driver configuration jumper settings
PinsSetting
P9 - P10LED - A
P5 - P6C - LS
P8 - P12HS - GND
Figure 4.Low side (NPN) output driver configuration jumper settings
,%$!
$
#,3
'.$
,3
6S
6S
,OAD
!-6
7/16
Sensor circuit descriptionAN2679
Table 3.High side (PNP) output driver configuration jumper settings
PinsSetting
P10 - P11A - HS
P4 - P5LED - C
P3 - P7+Vs - LS
Figure 5.High side (PNP) output driver configuration jumper settings
U1Intelligent power switch1STMicroelectronicsTDE1708DFT
U28-bit MCU1STMicroelectronicsST7FLITEUS5U3
C1, C710 nFCapacitor2EPCOSB37941A1103K0xx
C2100 nFCapacitor1EPCOSB37941A5104K0xx
C3, C11, C1410 nFCapacitor3EPCOSB37931A5103K0xx
C4, C5100 nFCapacitor2EPCOSB37931K0104K0xx
C610 µF/6.3 VPolarized capacitor1
C8, C131.5 nFCapacitor2EPCOSB37931A5152K0xx
C9100 pFCapacitor1EPCOSB37930A5101J0xx
C1047 pFCapacitor1EPCOSB37930A5470J0xx
C12470 pFCapacitor1EPCOSB37930A5471J0xx
D1Status LEDLED1
D2, D4, D51N4148Diode3
D3Diag. LEDLED1
L168 µHPS-core inductor1Bohemia ElectricBES070815
CoreEPCOSB65933A0000X022
Coil former EPCOSB65512C0000T001
P1, P3+VsHeader, 1-pin2
P2Con ICCICC connector1
P4, P9LEDHeader, 1-pin2
P5CHeader, 1-pin1
P6, P7LSHeader, 1-pin2
P8, P11HSHeader, 1-pin2
P10, P15AHeader, 1-pin2
P12, P13GNDHeader, 1-pin2
P14+5 VHeader, 1-pin1
Q1BC857BPNP transistor1
R10Resistor1
R24.7 kΩResistor1
R3, R51.5 kΩResistor2
R4, R610 kΩResistor2
R7220 kΩResistor1
10/16
AN2679Sensor circuit description
2.5 ICC connector
The board ICC connector offers in-circuit programming and debugging capabilities and thus
simplifies the firmware development. More information about ST7 development tools is
available from www.st.com/mcu.
11/16
Software implementationAN2679
#
O
3 Software implementation
After the first start-up following the firmware upload, the ST7 MCU performs a simple board
self-test. It reads the oscillator amplitude level and voltage across the temperature-sensing
diode D2 and checks whether these values are within a specific range (this state is indicated
by blinking diagnostic LED D3; see Ta bl e 5 ). The oscillator amplitude level detected during
this test is also considered as an initial oscillator level when no metal object approaches the
sensing inductor L1, and its value is recorded to the Flash memory (address 0xfc00) using
an in-application programming (IAP) method. This value is later used for amplitude
reduction comparisons caused by metal objects.
Note: The initial board self-test procedure can be performed at any time by placing a jumper
on pins 3 and 4 of the ICC connector (see Figure 7) and powering up the application.
Figure 7.Inducing the demonstration board self-test
#ON)##
During normal operation, the MCU then controls the sensor output based of the information
about the oscillator amplitude and the actual temperature. The main sensor part of the
firmware is implemented in an auto-reload timer interrupt service routine. In equidistant time
intervals the oscillator amplitude is sampled and its value is compared with two system
variables (ucUpperCompThreshold and ucLowerCompThreshold). One of these defines the
ON to OFF transition, and the other defines the OFF to ON transition of the sensor state.
The distance between them determines the hysteresis. These threshold variable values are
defined as a percentage of the initial oscillator level recorded in the Flash memory and are
further modified depending on the temperature by a coefficient from a lookup table.
Table 5.Diagnostic LED blinking modes (power up self-test)
LED statusMeaning
BlinkingInput values within limits
ConstantError
Table 6.Diagnostic LED blinking modes (normal operation)
Flashing styleMeaning
❋ ❋ ❋ ❋ ❋ ❋Under-temperature
❋❋ ❋❋ ❋❋ ❋❋Over-temperature
❋❋❋ ❋❋❋ ❋❋❋Ferrite approaching the coil
12/16
AN2679Software implementation
Figure 8.Oscillator amplitude vs.
temperature (MCU pin 3)
Figure 9.D2 voltage vs. temperature (MCU
pin 5)
13/16
ReferencesAN2679
4 References
1.ST7LITEUS5 datasheet
2. TDE1708DFT datasheet
3. Application note AN495
4. EN60947-5-2: "Low-voltage switchgear and controlgear - Part 5-2: Control circuit
devices and switching elements - Proximity switches"
14/16
AN2679Revision history
5 Revision history
Table 7.Document revision history
DateRevisionChanges
07-Jul-20081Initial release.
15/16
AN2679
Please Read Carefully:
Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the
right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any
time, without notice.
All ST products are sold pursuant to ST’s terms and conditions of sale.
Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no
liability whatsoever relating to the choice, selection or use of the ST products and services described herein.
No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this
document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products
or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such
third party products or services or any intellectual property contained therein.
UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED
WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS
OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE, ST PRODUCTS ARE NOT
RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING
APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY,
DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE
GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK.
Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void
any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any
liability of ST.
ST and the ST logo are trademarks or registered trademarks of ST in various countries.
Information in this document supersedes and replaces all information previously supplied.
The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners.