Most of rfid readers are designed in the following way:
(1) arduino or esp32
(2) additional chip board doing everything with own software and sending data to arduino/esp32 via serial port (or similar)
(3) 125khz coil/antenna
However this hides all details of rdif communication implementation.
If now I delete (2) and I would like to do it by myself, what would be your suggestions. Is arduino or esp32 capable to generate 125khz and modulate it assuming that we have (3) coil connected to arduino via simple transistor plus perhaps sth more?
And the most important how to write my own software for managing this? Have you seen any examples with source code?
You can ask why to do sth which is already done.
(A) For educational purposes.
(B) For making low level reader/writer which will be able to communicate with other devices than just standard and typical rfid cards.
That is because a fair amount of sophisticated analog circuit and radio frequency design wizardry is required to implement it, in addition to the much simpler details of the digital part of the RFID communication protocol.
The 125 to 135 KHz RFID cards are not normally read and write. Most of them are read only and come with a pre programed bit pattern. An rare exception is the cards you can write to.
The best source of information is this:- RFID Handbook
It is not cheap, and will tell you a lot more about other forms of RFID used across the radio spectrum than you want to know. But it is the definitive information you need.
It's difficult for me to believe that noone prepared its own library for reading and writing (even if it's rare) cards in fully controlled way. Such a library would be a great example...
You want spoon feeding then? That is the big problem with the library for everything mind set.
There was one but it is no longer on the GitHub page, this is the address:-
Anyway what do you think a library might do for you? If you don't know what to do a library just hides stuff from you and you have to go digging about in this to tell you what to do.
Basically it is simple.
Set a PWM pin going at approximately 125KHz.
Use this to drive a H-bridge to drive the antenna coil.
Make sure the antenna coil is resonate at about 125KHz by adding capacitors to the coil. You may have to try different values and several capacitors in parallel to get the right value.
Then look at the voltage output of the coil when you present a card to the coil. Note this voltage can be 60 to 200V, so you will need to clamp the output to 5V.
Read these voltage drops and assemble the RFID number from these drops.
Note you will need an oscilloscope to do some of these steps.
Thanks a lot for these hints. Yes its much easier to have some example as start.
Difficult to say how this library could be useful, not being able to look on it.
Do I understand well, there is one coil for 125kHz resonate signal and for signal from card? Thus how to distinct them? Or perhaps resonate signal should last ex. 1 sec and next you are in reading mode?
Rather than trying to get drips and drabs from the Arduino forum, I strongly recommend that you read up on the topic of RFID, and greatly improve your background.
Did you not notice the links to the excellent reference book posted earlier?
Once the coil is excited from the radio frequency field generated by the reader, the presence of an RFID card will cause a sequence of zeros and ones to be generated. This puts a load / no load on the coil in turn.
Then the reader's coil "feels" this load / no load situation by monitoring the voltage that the coil is being driven to. This voltage is higher when there is no load than it is when there is a load. So the reader can get back the bit patterns on the card.
Note that these bit patterns are synchronised to some multiple of the excitation frequency. It is common to use a quarter interval, that is four cycles of the excitation frequency between each potential high / low state. But that depends on how the card is encoded in the first place.
The coupling process is one of inductive coupling between the coils. This works in both directions.
I remember once, a long time ago, an argument between some members and myself about coupling of coils, when I was explaining my RFID music sequencer machine. They said I was wrong and said they would try it to prove me wrong. Well no surprise but no one ever got back to me. Here is a video of it in action:- RFID Music sequencer
Sadly my web site got pulled by my ISP last year who used to give free web space to subscribers. But I still have the original page I could down load here if anyone wants to see the article. I was using a two coil design that used a large coil to do the excitation and individual coils to do the reading.
I simplified the explanation slightly because not only is there a voltage shift induced in the driving coil there is also a phase shift in the signal as well. You can use this much smaller phase shift to read the effects of the RFID card to keep it in a digital format by using an exclusive OR gate to decode this phase shift.