Basically, I'm trying to intercept an NFC tag on a door lock to count the number of times different people enter the building. Each person has a unique card, and it is my understanding that unique card identifiers are exchanged during the process. I have successfully built my own reader which can identify the uid, but that requires an extra tap with the tag which no one would bother to do. I have played around with putting a coil between my makeshift reader and the tag it's reading but the data is unreliable as my sample rate is too low (i think). Is there a way with arduinos to sample such high frequencies? (13.56MHz). My plan is to take the electromagnetic wave, turn it into binary, then search for the correct sequence in the binary array.
I'm not clear on how putting something in between your reader and the card will prevent users from having to tap their card twice, once on the lock and once on your reader. Wouldn't it just be easier to use a lock that supports the function that you are looking for?
Also, remember that this will only count the number of people who tap their cards, not the number of people entering the building. What if someone holds the door open for someone else?
the idea is to intercept the data without disturbing it. I've achieved some sort of interception without disturbing the reader but it's useless data being intercepted as I'm collecting one out of maybe every 100 to 1000 bits.
So you're trying to implement an NFC Sniffer then, correct? I don't think you're going to be able to do so reliably.
yeah pretty much. Why do you think that? In theory, all data transmitted should be interceptable right?
Surely the people that own the building and\or access system could provide you with the information ?
Since the card is used for security purposes, the data is almost certainly encrypted, otherwise someone would do what you are doing, and use the data gathered to bypass the door lock.
Well to be pedantic as this is near field you shouldn't be able to sense it as a wave! You could possibly have another pickup coil as near as possible to the reader with a sensitive receiver. A little research shows that these systems use a 13.56MHz carrier which is amplitude shift keyed at 106, 212 or 424 MHz with slightly different data encodings. NFC Physical Layer - Modulation & RF Signal » Electronics Notes
An Arduino is highly unlikely to be able to directly sample the RF signal, it would need to be down-converted first, which needs special hardware - rather the same as an RFID reader in the first place in fact! Then the systems are undoubtedly encrypted to prevent false entry so you would need details of the encryption scheme. Why do all this just to gather data that the system itself will almost certainly be gathering anyway?
But a bit more research will show that on most smart cards the 13MHz signal is used only as a source of exaction (power) for the transmitter inside the card. This card transmits back at a quarter of the exaction frequency with the modulation on that, not the 13MHz carrier frequency.
The 106, 212 or 424 is not frequency in MHz but data bit rate in KBPS. You cannot modulate a carrier at a higher frequency than the carrier.
Is not fast enough by a long long way to get a sample rate of 6.5 MHz.
What you need to do is to rectify the signal with a diode and capacitor to recover the modulation and reject the carrier.
However what the PN532 is doing is generating its own 13MHz field which is interfering with the 13MHz carrier generated by the doors own reader, so using a PN532 is not going to work unless you use software to set it up so it doesn't generate any carrier at all. Then you should just get the modulated information.
I put a diode rectifier on the SDA line and it did change the input. In my mind it looks like a bunch of 1s and 0s. But there is SO much noise. Touching the SDA wire causes dramatic changes.
If I can't get a sample rate fast enough with the I2C on the pn532, i guess we're back to the question of how to get a faster sample rate.
Yes that is what you are expecting to see isn't it?
This is the modulation you are trying to extract.
So don't touch the SDA.
Have you disabled the PN532 carrier?
Are you still looking at the signal with an analogue input. Try reading the signal with a digital input, and then echoing that on a digital output pin and reading that on your scope.
Yes, it is. I was happy to see it.
I didn't find any real info on disabling the carrier. My knowledge of this is very surface-level.
Yes, I am. I'll try your digital input idea
Still loads of noise, which i guess is the carrier that I'm too uneducated to be able to disable. Still a lot of noise when I touch the wire though.
It is all in the data sheet of the PN535 chip, but it is a complex data sheet and I don't know if disabling the carrier is possible or not.
See it following this link
PN532 data sheet
The problem is that any library you use for this chip is likely to load up a whole heap of register values that you will have to edit so the carrier is not enabled. This is not beginners stuff.
So for just sniffing the results of your reader's RFID detector, you are best just using an antenna coil, and feeding that into your diode and capacitor.
By the way what value capacitor did you use, it looks from the trace it was too big because it seems to be slowing down the modulation signal.
I'll try this. I have a coil I harvested from one of those cheap card readers, so should be somewhat correct for this application.
I have no clue. I have the "Elegoo Super Starter Kit Uno R3 Project" and it has what it calls a "Diode Rectifier". When you said:
I took that to mean make a rectifier, which I assumed would be the same as using the one from my kit. I may have been wrong though. Should I put a capacitor in still? This is the diode:
https://uk.farnell.com/diodes-inc/1n4007-t/diode-rectifier-1000v-1a-do-41/dp/1843698
I did say with a diode AND capacitor. The capacitor removes the carrier signal, it goes to ground after the diode. It should be in the order of 100pF or so.
I would use a 1N4148 signal diode rather than a rectifying diode.


