Author Topic: Help with an induction sensor  (Read 1177 times)

0 Members and 1 Guest are viewing this topic.

Offline trifusionTopic starter

  • Contributor
  • Posts: 24
  • Country: ca
Help with an induction sensor
« on: January 18, 2025, 12:07:50 pm »
I'd like to build a simple sensor that detects if a ring has been placed on the finger of a mannequin finger.

Here is an example of what that would look like:
https://www.youtube.com/shorts/t6mX-GTtHrk

Do you think a sensor like this work if it was in the finger:
https://www.aliexpress.com/item/32871925239.html

Or should I build a custom coil?

Let me know your thoughts.

Thanks

Greg
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 2640
  • Country: gb
  • Recovering Electrical Engineer
Re: Help with an induction sensor
« Reply #1 on: January 18, 2025, 12:51:54 pm »
These sensors are end-on detecting. the side of these sensors are made of metal and shield the active parts of the sensor. The ring might not create enough off axis field change.
The ring material also affects sensitivity. Sensors like this are normally used to detect ferrous metals.
https://www.realpars.com/blog/inductive-sensor

I'd DIY one using the TDA0161 ic.

https://www.digikey.com/en/products/filter/sensor-and-detector-interfaces/752?s=N4IgTCBcDaICoBECCAGAjANjSAugXyA
 
The following users thanked this post: trifusion

Offline trifusionTopic starter

  • Contributor
  • Posts: 24
  • Country: ca
Re: Help with an induction sensor
« Reply #2 on: January 20, 2025, 02:29:46 am »
OK, I have done some reading on the TDA0161 and induction ... based on a couple of examples I found on the web I drew up a design in fritzing (copied mostly from here ... http://www.st.com/web/en/resource/technical/document/data_brief/CD00190843.pdf)

2485909-0

2485913-1

This is my first time designing a circuit so please be kind  :palm: ...

Does this look like it will work?

Thanks

Greg
 

Offline m k

  • Super Contributor
  • ***
  • Posts: 2737
  • Country: fi
Re: Help with an induction sensor
« Reply #3 on: January 24, 2025, 05:49:19 pm »
You can use the example circuit.

Add a 10k pull-up resistor to output and connect it to MCU input.
Then your ring present is active low.
Advance-Aneng-Appa-AVO-Beckman-Danbridge-Data Tech-Fluke-General Radio-H. W. Sullivan-Heathkit-HP-Kaise-Kyoritsu-Leeds & Northrup-Mastech-OR-X-REO-Simpson-Sinclair-Tektronix-Tokyo Rikosha-Topward-Triplett-Tritron-YFE
(plus lesser brands from the work shop of the world)
 
The following users thanked this post: trifusion

Offline PGPG

  • Frequent Contributor
  • **
  • Posts: 528
  • Country: pl
Re: Help with an induction sensor
« Reply #4 on: January 24, 2025, 08:52:10 pm »
Does this look like it will work?

For me your schematic is not clear.
1. What is battery shield?
Do it have several batteries so each 2 pin set are isolated from each other pair or it is simply several ways to connect to the same battery - in other words: do the pins 10 and 12 are internally shorted or not?

2. How the transistor is expected to work?
Do the esp pin5 is output expected to draw transistor emitter low and together with its base being driven by resistors to make this transistor switch on. But then what it connects to what?

3. What is the idea to have 100Ω 5% + 22Ω 5% instead of just using 120Ω?

4. 5% of 15kΩ is 750Ω. So if 15k can vary so much what is the sense to add 330Ω to it?

5. What is the function of LED1. It is permanently connected to 5V supply so it is all the time on until the battery will not be dead. Is its function to show that battery is still ok?

I didn't searched to find how TDA is working so I will say nothing about elements around it.
 
The following users thanked this post: trifusion

Offline Sensorcat

  • Regular Contributor
  • *
  • Posts: 140
  • Country: de
  • Independent Sensor Consultant
    • Sensorberatung
Re: Help with an induction sensor
« Reply #5 on: January 25, 2025, 02:28:54 am »
So far, you had a focus on the circuit. But geometry of target and coil are equally important. Questions to ask:
  • What size and cross-section has the ring? Is it always a closed torus?
  • What is the ring material?
  • How well is the position of the ring defined when it has to be / has not to be detected?
  • How much space is available for the coil (system)?
  • What is the distance between ring and coil (system)?
A well-made coil design makes detection much easier. Best way to get good advice would be to provide a drawing of the geometry of all items, including the space available.
 
The following users thanked this post: trifusion

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3435
  • Country: us
Re: Help with an induction sensor
« Reply #6 on: January 25, 2025, 03:53:00 am »
With a microcontroller there are a bunch of simple ideas that can be used to detect a change in inductance...

Detect the change in the R-L time constant:
https://www.instructables.com/Minimal-Arduino-Metal-Detector/

A "ring-down" tester:
https://youtu.be/QBbEYYWiBI8

Use a comparator to keep a tank circuit oscillating and measure the period... used in the "AADE LC Meter". See Figure 1 on this page:

https://www.pe2bz.philpem.me.uk/Comm01/-%20TestEquip/-%20Tester-NonActiveDevice/Cl-251-IndCap-MeterKit/lc-meter-project.htm

(Description of its operation begins with "The key to L/C Meter IIB's operation is the oscillator circuit of FIGURE 1. ...")


« Last Edit: January 25, 2025, 03:55:27 am by ledtester »
 
The following users thanked this post: trifusion

Offline trifusionTopic starter

  • Contributor
  • Posts: 24
  • Country: ca
Re: Help with an induction sensor
« Reply #7 on: January 25, 2025, 11:35:28 am »
First off, very big thank you to everyone for providing feedback, I appreciate it very much ...

Maybe a quick overview of what I build ... every year I make an escape room for my kids, these are one off, single use 'toys', primarily electronic puzzles that use ESP32s to gather inputs and subscribes to and publishes topics to an MQTT server running on a pi zero. So for this example one of the puzzles will provide a ring and they will need to figure out that putting the ring on the finger of the mannequin will trigger another puzzle action.

For me your schematic is not clear.
1. What is battery shield?
Do it have several batteries so each 2 pin set are isolated from each other pair or it is simply several ways to connect to the same battery - in other words: do the pins 10 and 12 are internally shorted or not?

In the past I have built my own but to keep things simple unless I need a lot of amps I use 18650 power banks that I solder a pair of wires to like these for just 5v https://www.aliexpress.com/item/1005005883705502.html
or these if I need both 5v and 3.3v:
ttps://www.aliexpress.com/item/1005001946760259.html

2. How the transistor is expected to work?
Do the esp pin5 is output expected to draw transistor emitter low and together with its base being driven by resistors to make this transistor switch on. But then what it connects to what?

I would like the module/ESP32 to take an input from the TDA0161.

3. What is the idea to have 100Ω 5% + 22Ω 5% instead of just using 120Ω?

I have very limited knowledge of resistors other than doing simple voltage dividers and lowering voltages for LED's, in this case I have a variety pack of resistors but didn't have 120Ω so assumed I could put a couple that I have, 100+20 together to make 120?

4. 5% of 15kΩ is 750Ω. So if 15k can vary so much what is the sense to add 330Ω to it?

This is a result of my limited knowledge and having little common sense, I was trying to match a design I saw with resistors I have and was not sure about the preciseness required for the resistance.

5. What is the function of LED1. It is permanently connected to 5V supply so it is all the time on until the battery will not be dead. Is its function to show that battery is still ok?

From what I saw on a video of the circuit the LED should display when metal is detected by the TDA0161.

So far, you had a focus on the circuit. But geometry of target and coil are equally important. Questions to ask:
  • What size and cross-section has the ring? Is it always a closed torus?
  • What is the ring material?
  • How well is the position of the ring defined when it has to be / has not to be detected?
  • How much space is available for the coil (system)?
  • What is the distance between ring and coil (system)?
A well-made coil design makes detection much easier. Best way to get good advice would be to provide a drawing of the geometry of all items, including the space available.

This will be a one off so hoping to use off 'off the shelf' parts ...

For the coil I was hoping to use this ... https://www.aliexpress.com/item/1005004551447275.html
For the ring, this ... https://www.aliexpress.com/item/1005005278393283.html or this https://www.aliexpress.com/item/1005007542118450.html
I was hoping to put the coil into something like this ... https://www.aliexpress.com/item/33020577826.html?

I agree with your logic but my design process will likely be more 'brute force attack' of lots of iterations as I learn more about this and try and cobble together some cheap aliexpress/dollar store parts.

With a microcontroller there are a bunch of simple ideas that can be used to detect a change in inductance...

Detect the change in the R-L time constant:
https://www.instructables.com/Minimal-Arduino-Metal-Detector/

A "ring-down" tester:
https://youtu.be/QBbEYYWiBI8

Use a comparator to keep a tank circuit oscillating and measure the period... used in the "AADE LC Meter". See Figure 1 on this page:

https://www.pe2bz.philpem.me.uk/Comm01/-%20TestEquip/-%20Tester-NonActiveDevice/Cl-251-IndCap-MeterKit/lc-meter-project.htm

(Description of its operation begins with "The key to L/C Meter IIB's operation is the oscillator circuit of FIGURE 1. ...")

I did look at a couple of these but after being pointed at the TDA0161 and how it simplifies things I'd like to use it if I can.

Thanks again to everyone, super impressed by the great community here at eevblog!
 

Online BeBuLamar

  • Super Contributor
  • ***
  • Posts: 1523
  • Country: us
Re: Help with an induction sensor
« Reply #8 on: January 25, 2025, 12:59:14 pm »
The sensor in your first post might work if the ring when putting on the finger must sit at the blue part of the sensor. Also the blue part of the sensor must be very close to the ring 1mm or so. The sensor is rated at 4mm but that's for the front of the sensor. The sensor has the head sticking out so it does have some sensitivity to the side but less than the front.
 
The following users thanked this post: trifusion

Offline PGPG

  • Frequent Contributor
  • **
  • Posts: 528
  • Country: pl
Re: Help with an induction sensor
« Reply #9 on: January 25, 2025, 04:05:33 pm »
Detect the change in the R-L time constant:

Using LVC serie single gate digital ICs you can detect very small time constant changes. I have two pulses with 2ns time difference and detect when shorter one became longer than the other (D latch detects if clock or D input was faster).

For me your schematic is not clear.
1. What is battery shield?
Do it have several batteries so each 2 pin set are isolated from each other pair or it is simply several ways to connect to the same battery - in other words: do the pins 10 and 12 are internally shorted or not?

In the past I have built my own but to keep things simple unless I need a lot of amps I use 18650 power banks that I solder a pair of wires to like these for just 5v https://www.aliexpress.com/item/1005005883705502.html
or these if I need both 5v and 3.3v:
ttps://www.aliexpress.com/item/1005001946760259.html

You showed battery containers for single cell, but at your schematic battery shield have many outputs. I still don't know if pins 10 and 12 are internally (in battery shield at your schematic) connected or not. If these are separate voltage sources than they would be separate at schematic. If they are shown as one source then what it is intended to tell us. Is it one voltage source with just many outputs connectors (so pins I'm asking are connected) or separate batteries (so pins are not connected).

It is important to know it. If transistor emitter is the only connection point between two in other way galvanically separated circuits than it can't provide any information between them as current always needs 2 wires (I hope you know it).
So until you don't know if esp32 have the common supply than the rest of circuits it is hard to understand what circuit author had in mind.

I would like the module/ESP32 to take an input from the TDA0161.

Was your intention to use transistor as voltage follower (input at base, output at emitter (about 0.7V lower)? But you connected transistor collector to - and not + so it is not clear if it was your intention.
You connected transistor in reverse polarization mode (base collector junction forward polarized). This mode is sometimes used in analog circuits as it allows to get very small voltage drop between collector and emitter provided that driving current is higher than switched current. For esp32 input it is not important if when transistor is switched on you have 0.1V or 0.01V at it so there are no logical arguments for such using this transistor. In this connection you loose transistor current amplification from may be 400 down to may be 5. But as you need no amplification at all than I don't know what was your idea.
In both cases everything depends if two voltage sources get from battery shield are connected or not and I still don't know it.

From what I saw on a video ... of the circuit the LED should display when metal is detected by the TDA0161.

See at your schematic. Your LED + its resistor are permanently connected between + and - from battery. TDA0161 have no influence on this circuit.


In your case I would start from testing how the ring you plan to use influence on L.
L is mostly changed by ferromagnetic material in close proximity to it.
Shorted coil changes mainly inductance Q factor (representing power looses in inductance) and less its inductance (L value).

What about dropping there TV pilot and having somewhere IR receiver just detecting that pilot was used.
Or a whistle and a sound receiver.
Being in secondary school I have made circuit to switch on/off my desk lamp by clapping.
In my country we have here one day in year when it is customary to douse oneself with water in the morning (a much reduced old folk tradition). When I was 8..10 I have build from two pieces of sheet metal a switch that was opened when a bottle of water (next to my bed to be used in the morning) was standing on it. Connector was connected to battery and buzzer I had from 'Morse-electric' toy.
« Last Edit: January 25, 2025, 04:25:39 pm by PGPG »
 
The following users thanked this post: trifusion

Offline trifusionTopic starter

  • Contributor
  • Posts: 24
  • Country: ca
Re: Help with an induction sensor
« Reply #10 on: January 25, 2025, 08:08:27 pm »
You showed battery containers for single cell, but at your schematic battery shield have many outputs. I still don't know if pins 10 and 12 are internally (in battery shield at your schematic) connected or not. If these are separate voltage sources than they would be separate at schematic. If they are shown as one source then what it is intended to tell us. Is it one voltage source with just many outputs connectors (so pins I'm asking are connected) or separate batteries (so pins are not connected).

It is important to know it. If transistor emitter is the only connection point between two in other way galvanically separated circuits than it can't provide any information between them as current always needs 2 wires (I hope you know it).
So until you don't know if esp32 have the common supply than the rest of circuits it is hard to understand what circuit author had in mind.

It will be a single cell 18650 so I assume it will have a common ground.

Was your intention to use transistor as voltage follower (input at base, output at emitter (about 0.7V lower)? But you connected transistor collector to - and not + so it is not clear if it was your intention.
You connected transistor in reverse polarization mode (base collector junction forward polarized). This mode is sometimes used in analog circuits as it allows to get very small voltage drop between collector and emitter provided that driving current is higher than switched current. For esp32 input it is not important if when transistor is switched on you have 0.1V or 0.01V at it so there are no logical arguments for such using this transistor. In this connection you loose transistor current amplification from may be 400 down to may be 5. But as you need no amplification at all than I don't know what was your idea.
In both cases everything depends if two voltage sources get from battery shield are connected or not and I still don't know it.

This is beyond my abilities to understand. I was hoping the TDA0161 could provide either a high or low signal output that I could read on the ESP32?

See at your schematic. Your LED + its resistor are permanently connected between + and - from battery. TDA0161 have no influence on this circuit.

Is there a way I could wire so LED works similar to video? I probably won't use it in the end but it would be nice to check circuit when I start working on it as a quick check to see if it is working.

In your case I would start from testing how the ring you plan to use influence on L.
L is mostly changed by ferromagnetic material in close proximity to it.
Shorted coil changes mainly inductance Q factor (representing power looses in inductance) and less its inductance (L value).

This is a good plan, once I get parts I can look at this issue first.

What about dropping there TV pilot and having somewhere IR receiver just detecting that pilot was used.
Or a whistle and a sound receiver.
Being in secondary school I have made circuit to switch on/off my desk lamp by clapping.
In my country we have here one day in year when it is customary to douse oneself with water in the morning (a much reduced old folk tradition). When I was 8..10 I have build from two pieces of sheet metal a switch that was opened when a bottle of water (next to my bed to be used in the morning) was standing on it. Connector was connected to battery and buzzer I had from 'Morse-electric' toy.

I will have lot's of other puzzles, usually at least a dozen ESP32's each with a different puzzle. Part of making these is to challenge myself to learn something new.

Thank you for your feedback.
 

Offline trifusionTopic starter

  • Contributor
  • Posts: 24
  • Country: ca
Re: Help with an induction sensor
« Reply #11 on: January 25, 2025, 08:11:53 pm »
The sensor in your first post might work if the ring when putting on the finger must sit at the blue part of the sensor. Also the blue part of the sensor must be very close to the ring 1mm or so. The sensor is rated at 4mm but that's for the front of the sensor. The sensor has the head sticking out so it does have some sensitivity to the side but less than the front.

I ordered the blue induction sensor as well as a TDA0161. Going to try blue induction sensor first to see how sensitive it is before I attempt TDA circuit. I am hoping that the addition of movement of the ring might increase the induction a bit, I noticed in the video that they drop the ring on the finger so I was hoping to measure the difference between dropping on finger and placing on finger.
 

Offline PGPG

  • Frequent Contributor
  • **
  • Posts: 528
  • Country: pl
Re: Help with an induction sensor
« Reply #12 on: January 25, 2025, 11:27:18 pm »
It will be a single cell 18650 so I assume it will have a common ground.

It should be clear from schematic.

This is beyond my abilities to understand. I was hoping the TDA0161 could provide either a high or low signal output that I could read on the ESP32?

And it can, but the way you connected transistor and the way you connected LED are simply just random connections having no idea behind it.
I have never looked for it (when I was learning basic of electronics there were no internet) but I believe there have to be lot of basic electronic information there - just search.
When I was 10 I have build my first detector radio receiver and it worked. Those time I didn't understood schematic I used, but since about 12 I was no more copying ready schematic but always designed them (many times with bugs in them). Just design, build, make mistakes and learn on it.
 
The following users thanked this post: trifusion

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3435
  • Country: us
Re: Help with an induction sensor
« Reply #13 on: January 26, 2025, 12:31:04 am »
Here's how to interface the TDA0161 with the ESP32:

Cut the connection marked by the red cross and power the sensor with +5.

Connect the arrow pointing to the right to a ESP32 GPIO pin. It will be inverted signal of the TDA0161's output -- ie. HIGH when pin 6 of the TDA0161 is LOW and LOW when pin 6 is HIGH.

2489283-0

« Last Edit: January 26, 2025, 12:32:50 am by ledtester »
 
The following users thanked this post: trifusion

Offline trifusionTopic starter

  • Contributor
  • Posts: 24
  • Country: ca
Re: Help with an induction sensor
« Reply #14 on: January 26, 2025, 01:24:18 am »
Here's how to interface the TDA0161 with the ESP32:

Cut the connection marked by the red cross and power the sensor with +5.

Connect the arrow pointing to the right to a ESP32 GPIO pin. It will be inverted signal of the TDA0161's output -- ie. HIGH when pin 6 of the TDA0161 is LOW and LOW when pin 6 is HIGH.

Thank you, this makes sense to me. I will try it like that when I get the parts.
 

Offline trifusionTopic starter

  • Contributor
  • Posts: 24
  • Country: ca
Re: Help with an induction sensor
« Reply #15 on: January 26, 2025, 01:26:50 am »
Just design, build, make mistakes and learn on it.

This is the plan ... learn thru doing. I'll work on my schematic skills as well.

Thank you
 

Offline trifusionTopic starter

  • Contributor
  • Posts: 24
  • Country: ca
Re: Help with an induction sensor
« Reply #16 on: January 26, 2025, 11:32:13 am »
It will be a couple of weeks before the parts arrive, in the meantime I have updated the schematic based on the feedback I have received.

2489407-0

 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3435
  • Country: us
Re: Help with an induction sensor
« Reply #17 on: January 26, 2025, 03:42:59 pm »
I would connect R3 to the 3.3V pin of the ESP32 board like in the following.

I would also increase the value of R3 to at least 1K -- note that the resistor for the on-board LED on the Supermini board is 5K.

2489575-0




 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf