Inductive proximity sensors are typically used to detect the presence or absence of a metal target and the output often emulates a switch. We can meet it in almost every area of factory automation, transport, home automation. Every place where necessary to know when moving part to stop. They use a high-frequency electromagnetic AC field that interacts with the target. We may say it's a kind of low-range metal detector.
|
flat printed coil |
This example uses
flat printed coil as a sensing inductor, that noticeably simplified hardware part. This coil easy can be drawn in minute by scripts in
Eagle. However, it can surely sense metal objects in distance 0.1" (2-3mm) or even aluminum foil, so we can track non-metal surface also, just stick a square inch of foil . No additional magnet-conductive core needed, for quick attempt works even hand-winded coil with ten turns of any wire on 1" diameter base.
Schematic twice more complicated. then previous sensor, but two diodes and two resistors with one capacitance not a big issue, isn't it? Like in previous one, all started by master timer, however here impulse starts faded RF sin wave (~10MHz) on coil by L1C1 chain. If metal target close enough, sin wave fades more, because target act as short-circuited secondary coil. Next this RF impulse comes through second diode, and performs detection of envelope curve on ADC internal RC chain (8pF 50kΩ). Now we have to measure this DC "hill" just in time it comes, and
event chaining help us again.
Code example almost the same, just a few differences. In main cycle - proportion replaced by simple on/off switch with hysteresis. And off cause, another constants, and another ADC timing. Output (pin3) high(
1) when
coil closed by metal target, low(
0) when
open.
Event chart and other software details remains the same:
code compiled in
Keil µVision 4 .71 with
standard libraries for STM32F0.
UPD:
Recently discover new variant of schematic - v2 works better.
Charts almost the same, except direct leaking TIM pulse front through diodes.
However, this circumstance don't disturb us, because ADC turns on little later.
No comments:
Post a Comment