Help with an induction sensor - Page 1
Forum section: electronics / beginners

author: trifusion
author_rank: Contributor
timestamp: January 18, 2025, 12:07:50 pm
content: 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-GTtHrkDo you think a sensor like this work if it was in the finger:https://www.aliexpress.com/item/32871925239.htmlOr should I build a custom coil?Let me know your thoughts.ThanksGreg

author: Terry Bites
author_rank: Super Contributor
timestamp: January 18, 2025, 12:51:54 pm
content: 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-sensorI'd DIY one using the TDA0161 ic.https://www.digikey.com/en/products/filter/sensor-and-detector-interfaces/752?s=N4IgTCBcDaICoBECCAGAjANjSAugXyA

author: trifusion
author_rank: Contributor
timestamp: January 20, 2025, 02:29:46 am
content: 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)This is my first time designing a circuit so please be kind...Does this look like it will work?ThanksGreg

author: m k
author_rank: Super Contributor
timestamp: January 24, 2025, 05:49:19 pm
content: 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.

author: PGPG
author_rank: Frequent Contributor
timestamp: January 24, 2025, 08:52:10 pm
content: Quote from: trifusion on January 20, 2025, 02:29:46 amFor 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.

author: Sensorcat
author_rank: Regular Contributor
timestamp: January 25, 2025, 02:28:54 am
content: 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.

author: ledtester
author_rank: Super Contributor
timestamp: January 25, 2025, 03:53:00 am
content: 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/QBbEYYWiBI8Use 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. ...")

author: trifusion
author_rank: Contributor
timestamp: January 25, 2025, 11:35:28 am
content: 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.Quote from: PGPG on January 24, 2025, 08:52:10 pmIn 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 5vhttps://www.aliexpress.com/item/1005005883705502.htmlor these if I need both 5v and 3.3v:ttps://www.aliexpress.com/item/1005001946760259.htmlQuote from: PGPG on January 24, 2025, 08:52:10 pmI would like the module/ESP32 to take an input from the TDA0161.Quote from: PGPG on January 24, 2025, 08:52:10 pmI 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?Quote from: PGPG on January 24, 2025, 08:52:10 pmThis 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.Quote from: PGPG on January 24, 2025, 08:52:10 pmFrom what I saw on a videoof the circuit the LED should display when metal is detected by the TDA0161.Quote from: Sensorcat on January 25, 2025, 02:28:54 amThis 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.htmlFor the ring, this ...https://www.aliexpress.com/item/1005005278393283.htmlor thishttps://www.aliexpress.com/item/1005007542118450.htmlI 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.Quote from: ledtester on January 25, 2025, 03:53:00 amI 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!

author: BeBuLamar
author_rank: Super Contributor
timestamp: January 25, 2025, 12:59:14 pm
content: 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.

author: PGPG
author_rank: Frequent Contributor
timestamp: January 25, 2025, 04:05:33 pm
content: Quote from: ledtester on January 25, 2025, 03:53:00 amUsing 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).Quote from: trifusion on January 25, 2025, 11:35:28 amYou 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.Quote from: trifusion on January 25, 2025, 11:35:28 amWas 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.Quote from: trifusion on January 25, 2025, 11:35:28 amSee 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.

author: trifusion
author_rank: Contributor
timestamp: January 25, 2025, 08:08:27 pm
content: Quote from: PGPG on January 25, 2025, 04:05:33 pmIt will be a single cell 18650 so I assume it will have a common ground.Quote from: PGPG on January 25, 2025, 04:05:33 pmThis 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?Quote from: PGPG on January 25, 2025, 04:05:33 pmIs 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.Quote from: PGPG on January 25, 2025, 04:05:33 pmThis is a good plan, once I get parts I can look at this issue first.Quote from: PGPG on January 25, 2025, 04:05:33 pmI 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.

author: trifusion
author_rank: Contributor
timestamp: January 25, 2025, 08:11:53 pm
content: Quote from: BeBuLamar on January 25, 2025, 12:59:14 pmI 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.

author: PGPG
author_rank: Frequent Contributor
timestamp: January 25, 2025, 11:27:18 pm
content: Quote from: trifusion on January 25, 2025, 08:08:27 pmIt should be clear from schematic.Quote from: trifusion on January 25, 2025, 08:08:27 pmAnd 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.

author: ledtester
author_rank: Super Contributor
timestamp: January 26, 2025, 12:31:04 am
content: 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.

author: trifusion
author_rank: Contributor
timestamp: January 26, 2025, 01:24:18 am
content: Quote from: ledtester on January 26, 2025, 12:31:04 amThank you, this makes sense to me. I will try it like that when I get the parts.

author: trifusion
author_rank: Contributor
timestamp: January 26, 2025, 01:26:50 am
content: Quote from: PGPG on January 25, 2025, 11:27:18 pmThis is the plan ... learn thru doing. I'll work on my schematic skills as well.Thank you

author: trifusion
author_rank: Contributor
timestamp: January 26, 2025, 11:32:13 am
content: 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.

author: ledtester
author_rank: Super Contributor
timestamp: January 26, 2025, 03:42:59 pm
content: 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.