Contactless piece identification - Page 1
Forum section: electronics / projects

author: luzan
author_rank: Newbie
timestamp: March 23, 2025, 02:32:14 pm
content: Hello, new here!I'm not exactly a beginner but I belong to the digital world, so I'd like to get some feedbacks on the design of this project, see if you think I'm on a good path or if you want to suggest something different.I'm making a chess-like board game and I'd like to automatically identify which piece is on a given square. I've got 12 different pieces with about a 2cm diameter circular base.My idea so far is to encode the ID in 4 bits by having up to 4 LC parallel tanks inside each piece, L being a coil close to the base that will couple (modeled by a transformer) with another coil below the square on the board.By driving the coil in the board at four fixed frequencies (in the range 100 to 200 KHz) and monitoring the current through the coil i should be able to pick up the "bits" as I hit the resonance frequencies of the piece, and detect this as a lower amount of current (resonating out the impedance of the transformer).I've simulated a model of this with LTspice, still need to do some real tests.The transient sim. shows a frequency sweep on the board inductor. The voltage on the resistor is then read as a measurement of the current @ the driving frequency with a high pass filter, and this seems to prove the feasibility of the idea (an example piece with all four bits at 1 is simulated).

author: SuzyC
author_rank: Frequent Contributor
timestamp: March 23, 2025, 03:12:10 pm
content: A better idea that could easily detect a piece is by RFID. A flat circular coil is located within the base of each piece. If there is a flat coil beneath the board of at each position, the piece magnetically couples to the coil within the base of a piece, this coil inside the piece first uses this RF AC current for generating a small amount of DC power. This power activates a very low-power RF transmitter that gives out a short burst of sequential RF pulses that is the ID and this signal is picked up by maybe only using a single receiver under the board.Polling a possible piece position would be used to identify any piece is at any position.Trying to do this with just small turned circuits would be much too unreliable and complicated and I would expect it to be critical for a piece to be placed very accurately for this system to work 100% of the time.

author: mtwieg
author_rank: Frequent Contributor
timestamp: March 23, 2025, 03:30:09 pm
content: Quote from: luzan on March 23, 2025, 02:32:14 pmThe first challenge I expect to encounter with this approach is the effect of mutual coupling directly between the four "bit" coils. This will cause the resonant frequencies to shift relative to what you would expect from just one coil by itself. If the coupling is strong enough and the resonant frequencies are close to each other, then you will start to see peak splitting, which will really make things a mess.I would suggest instead just having a single resonator in each piece, designed to have a very precise resonant frequency unique to that piece. A PCB trace coil and a good capacitor should give a fc tolerance of +/-1% or better, which should be enough for 12 unique fc values. With this approach you only need to worry about coupling between pieces, which should be manageable by making each coil much smaller than the diameter of each piece.Quote from: SuzyC on March 23, 2025, 03:12:10 pmPassive RFID/NFC is definitely the right approach if the objective is to develop a product and mass produce it. For DIY project, I would not recommend it. Unless someone makes an easy-to-use tag IC which can be bought in low quantities and doesn't require an NDA with NXP...

author: luzan
author_rank: Newbie
timestamp: March 23, 2025, 04:06:34 pm
content: Thank you both for the feedback.About RFID, sure it seems a good way to do it but it feels overkill. The board design would be much more complex i believe and the pieces more expensive right?Quote from: SuzyC on March 23, 2025, 03:12:10 pmAbout this I'm actually expecting good performance. I'd expect a mismatch in position of the piece to lower the coupling factor (i simulated even low values like .1 with good results) but, critically, not the resonance frequency. Meaning it would just take more time for the current to decrease below the decision threshold, but we are still talking milliseconds.Quote from: mtwieg on March 23, 2025, 03:30:09 pmThank you, I'll be sure to run some simulation, but this is surely interesting!

author: luzan
author_rank: Newbie
timestamp: April 18, 2025, 06:39:03 pm
content: Hello, I'd like to post an update. Working on this project from time to time, I've come up with a circuit which i have partially realized and tested.I'd be really glad to receive any observation or tips to improve my design, thank you!VCC is 5V. Basically I have a VCO made by charging and discharging a capacitor feeding a schmitt trigger. The capacitor is always discharged with a constant current controlled by the control voltage and the trigger enables fast charge when the capacitor drops below the low threshold. Not yet sure how to generate the control voltage, if the mcu is fast enough i can go with PWM.the schmitt trigger output is buffered to drive the primary coil and a band pass filter is used to measure the current through the coil in the range 14-25MHz (where my 12 resonant frequencies will be). The filter removes the second harmonic of the first frequency at around 30MHz pretty well.I designed the filter with an online tool and montecarlo simulated with 1% tolerance on the components to make sure it isn't too sensitive (I only tested the VCO though as I'm waiting to receive the board and filter components)I also simulated a frequency sweep to see the circuit response to all the pieces with various coupling factors (even as low as 0.1), as seen in the attached pic.This shows that it's probably enough to compare Vmeas with something like 4V to have a safe 1 or 0 but I'm still going to use the ADC of the mcu and pick the frequency with the highest value to decide which piece is on that cell, just to be on the safe side.I didn't distribute evenly the frequencies as it appears higher ones have a lower quality factor for some reason.. I wonder why, I would have guessed otherwise, as the impedance of the inductors grows larger than their resistive losses as the frequency increases...edit: to clarify the meaning of the picture, it's a transient simulation with a frequency sweep between 15 and 24MHz, and each curve is done with a different piece coupled to the primary to see how much the pieces aver overlapped in frequency (the very first frequency is a little unlucky as ithappens while the circuit is "booting", but you get the idea)edit: so I have already managed to improve Vmeas quite a bit. Obviously the envelope detector capacitor was way too small, don't even remember how i picked it, I guess It just stuck there.. also the final npn stage didn' t need an emitter resistor as it is really just a switch, not an amplifier, and also was burdening too much the capacitor so I increased the collector resistor. Now the simulation is much better, the ripple is gone and the frequencies don't even overlap at the sampling point