element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Experimenting with Magnetic Components
  • Challenges & Projects
  • Design Challenges
  • Experimenting with Magnetic Components
  • More
  • Cancel
Experimenting with Magnetic Components
Blog Smart Coin Sorter by Inductive Sensing. #04 Inductive Sensor Device
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: javagoza
  • Date Created: 17 Nov 2021 11:20 PM Date Created
  • Views 3333 views
  • Likes 9 likes
  • Comments 2 comments
  • colpitts
  • oscillator
  • experimenting_with_magnetic_components
  • winners
  • transformer
  • bourns
  • inductor
  • inductive sensing
Related
Recommended

Smart Coin Sorter by Inductive Sensing. #04 Inductive Sensor Device

javagoza
javagoza
17 Nov 2021
Smart Coin Sorter by Inductive Sensing. #04 Inductive Sensor Device

Summary

 

After 5 weeks doing experiments and learning about analog electronics and magnetic components it is time to try to design and build something practical, my DIY Inductive Sensor.

Thanks to element14 and Bourns during these weeks I have learned about coils, inductors, chokes, transformers and ferrite cores and their main uses: Choking, blocking, attenuating, filtering and smoothing high frequency noise, storing and transferring energy in power converters (dc-dc or ac-dc ), making tuned oscillators or LC tank circuits and impedance matching. I have practiced with Colpitts oscillators, with LC tanks, with transformers, with common-mode chokes, with inverting amplifiers with transistors, with amplifiers with Op Amps, with voltage followers, with peak detectors, with bypass capacitors and decoupling capacitors, with rectifiers, voltage dividers and power supplies. I have learned the basics of handling the Analog Discovery 2 USB Oscilloscope Analog Discovery 2 USB Oscilloscope, the signal generator, the programmable power supplies, the impedance and spectrum analyzer. I didn't think I was going to get that far.

 

Disclaimer

 

This is the design of a rookie, sure I have made more than one mistake or things could have been simplified but for me the design works and the learning experience has been excellent, better than I expected when starting this challenge.

If you are going to try to replicate this project, keep in mind the limitations of the microcontroller that you are going to use with the sensor. Check well the voltages and currents allowed. It may be necessary to limit them.

 

    • Summary
    • Disclaimer
    • Inductive Sensor Blog
    • Inductive Sensor Overview
    • Block Diagram
    • Magnetic Components
    • Schematics
    • Soldering Protoboard
    • Functional blocks
      • Oscillator Block
      • Isolator, Line Filter & LC Tank blocks
      • Buffered output LM324N stage and Signals Splitter
      • Digital Outputs: Phase shift meter with two 817 optocouplers
      • Analog Outputs. Rectifier stage
    • Output signals. Analog and Digital
    • Next steps
    • Conclusion

 

Inductive Sensor Blog

 

Within the Experimenting with Magnetic Components Challenge I am conducting experiments to develop a smart coin discriminator using inductive sensitivity. In this blog I describe the construction of the final device, the inductive sensor, that will allow me to capture the data for classifying the coins with a microcontroller.

 

At first, the idea was to capture the reference signal and the signal modified by the presence of the coins through the ADCs of the Arduino BLE. The Arduino BLE features a nRF52840 processor from Nordic Semiconductors, a 32-bit ARMRegistered Cortex Tm -M4 CPU running at 64 MHz. The Arduino BLEArduino BLE has 8  ADCS with12 bit resolution and can sample, 200 k-samples per second.

 

During the experiments I tried to achieve a configuration of the oscillator and the LC tank that allowed to work at a frequency low enough to be able to sample the signal with 200 k-samples of the ADCs of the nRF52840. I could not get below 15 kHz which did not allow to have a good sampling of the signal for the purpose of being able to discriminate coins based on the phase shift and the impedance change.

Therefore in the final device I resort to using two digital inputs to create a kind of phase meter and two analog inputs to detect the impedance change when the coins are brought closer to the LC Tank.

 

Inductive Sensor Overview

 

The sensor can detect subtle changes in the varying magnetic field through the interaction of a metallic object such as a coin. The sensor has a parallel LC (inductor + capacitor) resonant circuit that generates a variable magnetic field when an alternating current flows through it. If a metallic object is placed in the vicinity of the alternating magnetic field produced by the inductor, eddy currents are induced in the metallic object on the metallic surface of the object. These eddy currents produce their own magnetic field that opposes the one created by the inductor that reduces the effective inductance of the coil.

 

image

 

The sensor has four outputs, two analog outputs, and two digital outputs.

  • The analog outputs represent the positive half wave signal of the voltage and "current" in the LC tank ("current" signal is voltage across a shunt resistor)
  • The digital outputs are pulses that detect the crossing of the voltage and "current" signal through a certain voltage level set by a resistor.

 

Outputs:

  • A1 Pre-scaled rectified analog voltage signal
  • A2 Pre-scaled rectified analog "current" signal
  • D1 digital voltage crossover detector pulse for voltage signal
  • D2 digital voltage crossover detector pulse for "current" signal

 

 

Using the outputs with the microcontrollers analog and Digital ports:

 

  • Measuring Impedance Change (ADC): Measuring the difference of the peaks of the analog signals we have the relative change in the impedance of the LC Tank.
  • Measuring Phase Shift Change (Digital): The time elapsed between the two bisectors of the pulse lengths gives us the phase difference in seconds.

 

image

The figure shows the four sensor outputs. Above the two analog outputs for the peak detector and below the two pulses that allow measuring the phase shift between voltage and current.

Block Diagram

 

Simplified block diagram of the system for classifying coins. The first block is half done, I did not have the proper inductors and only the bypass capacitors have been included.

 

image

 

  1. The oscillator generates a sine wave tuned to the same resonant frequency of the LC tank. The oscillator is a Colpitts oscillator with op amp.
  2. The oscillator circuit is isolated from the LC tank driver circuit by a 1: 1 ratio transformer.
  3. The LC tank is isolated from the oscillator circuit and the signal is filtered by a line filter.
  4. The LC tank generates a variable magnetic field while waiting for a coin or other metallic object to approach. Both the input signal to the tank and the output are scaled by a voltage divider and are buffered and clipped to match the inputs of the microcontroller.
  5. The two signals are divided into two others.
  6. Two are used to measure the phase shift of both signals by means of two optocouplers that generate a pulse when reaching a certain voltage level;
  7. and the other two are rectified and used to calculate the amplitude of the signal by means of a peak detector in the microcontroller.
  8. Finally, the two values obtained feed the k-NN classifier to obtain the class to which the target coin belongs.

 

Magnetic Components

 

The sensor uses several magnetic components from the Magnetic Components Kit See Kit

 

The Coopitts Oscillator uses this RLB1112V4-102JRLB1112V4-102J 1mH Radial Inductor

 

400 Volt Radial Inductor

image

 

The Isolator uses the BOURNS HCTSM80102AAL-E1HCTSM80102AAL-E1 as a 1:1 transformer

 

 

Pulse, Transformer, 250µH

 

image

 

Line filter to reduce EMI emissions uses the BOURNS SRF9045A-701YSRF9045A-701Y

 

 

Common Mode Choke, 7.5 µH

 

imageimage

 

The LC Tank sensor uses the BOURNS RLB0914-102KLRLB0914-102KL

 

 

Inductor, Radial Leaded, 1 mH

 

image

 

 

Schematics

 

image

 

 

Soldering Protoboard

 

During the experiments I used solderless breadboards with mixed results. I had quite a few stability and noise issues with the oscillator so for the final prototype I decided to use a soldered protoboard.

 

image

 

 

 

Functional blocks

Oscillator Block

 

For the oscillator in the final design I use the op27 operational amplifier which is the one that has given me the best results in the experiments.

 

https://www.analog.com/media/en/technical-documentation/data-sheets/OP27.pdf

 

The OP27 is a low noise, precision operational amplifier.

 

image

 

Isolator, Line Filter & LC Tank blocks

 

The transformer acts as a galvanic isolator and the common mode choke is used to reduce EMI emissions.

 

Schematics:

 

image

R14 is a shunt resistor that allows us to obtain a coherent waveform with the one that is following the current in time.

 

LC Tank, twisted pair cabling and ferrite core

 

 

image

 

 

Buffered output LM324N stage and Signals Splitter

 

The sensor divides the two signals to be examined, voltage and "current" in two by means of two Y-splitters and the help of 4 voltage followers.

Use the four Op-Amp modules of an LM324-N Quad to build 4 buffers or voltage followers.

 

LM324-N Quad, 32-V, 1-MHz op amp

 

https://www.ti.com/product/LM324-N

 

image

image

Schematics: 2x Y-splitters and 4 x Voltage Followers

 

image

 

 

 

image

 

 

Digital Outputs: Phase shift meter with two 817 optocouplers

 

By means of the optocoupler the circuit generates pulses of detection of passage by a voltage reference. Being a periodic signal, this will allow us to calculate the frequency of the signal and by comparing the bias of the pulses of two signals to calculate the phase shift between the two. In our case, the phase difference between voltage and current through the LC tank is of interest.

 

The 817 contains a light-emitting diode  optically coupled to a phototransistor.

 

image

 

HCPL-817: Phototransistor Optocoupler High-Density Mounting Type Data Sheet (broadcom.com)

 

Schematics:

image

 

Tune R6 and R7 for proper pulse lengths.

 

image

 

 

Analog Outputs. Rectifier stage

 

 

 

image

 

First attempts with the rectifier using 1n4005 diodes. Sensor response to different coins.

Final design with the 1N914 Small Signal Diode

 

image

 

Output signals. Analog and Digital

 

Analog rectifier signals with the 1N914 Diode. In the figure both digital and analog outputs.

 

 

image

 

Next steps

 

Things to do:

  • Build a holder for the sensor and coins
  • Prepare the sketch for data collection on the Arduino.
  • Collect data to train the classifier.
  • Make a cool blog and video to showcase the coin classifier to the element14 community.

 

Conclusion

 

It has been a very special design challenge for me totally out of my comfort zone. I want to thank Randall Scasny for encouraging me to participate and select my application even though I was a newbie to analog electronics. I hope I have not been too wrong in the explanations of my blogs and thanks to those who have visited the blogs, I am a bit overwhelmed by the number of visits they are having.

 

 

 

Smart Coin Sorter by Inductive Sensing Blogs
Smart Coin Sorter by Inductive Sensing. Introduction
Smart Coin Sorter by Inductive Sensing. #01 How Coins Change Coil Impedance.
Smart Coin Sorter by Inductive Sensing. #02 Experimenting with BJT C-B Colpitts Oscillators
Smart Coin Sorter by Inductive Sensing. #03 Experimenting with Op Amp Colpitts Oscillators
Smart Coin Sorter by Inductive Sensing. #04 Inductive Sensor Device
  • Sign in to reply

Top Comments

  • fmilburn
    fmilburn over 3 years ago +2
    Great series of posts! It is an interesting application and I got new insights while following your experiments.
  • javagoza
    javagoza over 3 years ago in reply to fmilburn +2
    Thanks for your kind words Frank. Thanks to this challenge, I have discovered how difficult and fascinating the work of electronic engineers is. If I had them in high esteem before, now they are like gods…
  • javagoza
    javagoza over 3 years ago in reply to fmilburn

    Thanks for your kind words Frank. Thanks to this challenge, I have discovered how difficult and fascinating the work of electronic engineers is. If I had them in high esteem before, now they are like gods to me. I am beginning to understand the true art behind many designs so that they are not as stable as a house of cards. My job as an application programmer is much easier, more and more like assembling Lego blocks.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • fmilburn
    fmilburn over 3 years ago

    Great series of posts!  It is an interesting application and I got new insights while following your experiments. 

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube