NFC or some kind of RFID with PIC or any other MCU? - Page 1
Forum section: electronics / general

author: nardev
author_rank: Unknown
timestamp: May 15, 2019, 12:02:42 pm
content: Other than chips custom built for RFID, did anyone try, if that is possible at all, to turn some general purpose MCU into RFID reader? For PIC16F887 or maybe some other from Atmega line?

author: Berni
author_rank: Super Contributor
timestamp: May 15, 2019, 12:32:35 pm
content: Its possible both to make your own RFID tag and your own RFID reader using a MCU.Infact i seen that some of the cheap USB RFID readers for 125KHz are made using MCUs. The way they do it is have the MCU toggle a pin to generate the transmitting tone, then some analog circuitry is used to recover the backscater signal from the RFID tag and this is then fed as a analog voltage into the MCUs ADC where it gets demodulated and decoded.For the higher frequency tags like 13MHz and similar you will most likely need a chip to do it.

author: JPortici
author_rank: Super Contributor
timestamp: May 15, 2019, 01:55:19 pm
content: ST makes some MCUs with RFID and energy harvesting hardware builtin

author: cj7hawk
author_rank: Newbie
timestamp: May 26, 2019, 06:45:56 am
content: I was doing it back last century... Pretty easy with 125 KHz systems. Never tried with NFC. Shouldn't be too difficult though as the frequencies are fairly low, but the circuitry would be different.For 125 KHz stuff, just set MCU output at 125 KHz, run this into a driver and into a coil. Current is important, as current drives the range. Ideally you want an antenna coil that can match impedance with the frequency, and multiple windings increases magnetic field intensity. Pulse this on and off at 125 KHz. Square wave is actually fine. Bonus points for reversing the flux each cycle.The take another thin wire and run it in the same coil as the driver circuit. Next to it. Now you have an air transformer. Take the output of this other wire, and run it into an amplifier, rectify it, and feed this into a digital input. Now read the data straight out of the amplifier.Well, read the encoded data at least. Usually it's either biphase or manchester(more common) coded... So you will need to decode the bits. Biphase and Manchester are identical signal-wise, but the data contained is different, and the bit alignment is different. If you only can read one, and you need the other, then you can translate the results agorythmically to correct for it.This is a more advanced antenna system than you can buy, though you can also get ICs to drive and decode the signal through a single coil.That's about it. You can use something like this to read and program chips.If you're going the other way (MCU being read ) then similar setup but without the drive coil, and you damp (short) the coil to send data back to the reader.NFC is a different matter. It runs around 13 MHz, and uses FM encoding, but over a very wide spectrum. It should be possible to detect signal based on waveform. I haven't read the NFC datasheets for a while, but I recall having to speak to the chips before they will turn on, whereas 125KHz just start squawking as soon as they get a signal.Hope this helps -David.