https://github.com/decrazyo/fdxb Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + Copilot Enterprise Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} decrazyo / fdxb Public * Notifications You must be signed in to change notification settings * Fork 1 * Star 52 * Arduino FDX-B reader built from discrete components. License GPL-3.0 license 52 stars 1 fork Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights decrazyo/fdxb This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 5 Commits examples/Reader examples/Reader img img src src LICENSE LICENSE README.md README.md keywords.txt keywords.txt library.properties library.properties View all files Repository files navigation * README * GPL-3.0 license Arduino FDX-B Reader DIY ISO 11784/11785 FDX-B RFID Reader Reader built on breadboard The goal of this project is to create hardware/software capable of reading RFID tags implanted in animals. Only tags that use the FDX-B protocol are supported since they appear to be the most common. Support for HDX protocol based tags would require a significant hardware redesign that I'm unwilling to do at the moment. The EM4100 protocol, that is commonly used by RFID fobs/ cards, could be supported with minor changes but that's outside the scope of this project. Hardware Schematic Open Source Hardware Project Circuit Simulation Tools * Oscilloscope * Multimeter (optional) * LCR meter (optional) Materials * Arduino compatible microcontroller [M1] * LM358P dual op-amp [U1] * PN2222A NPN transistor [Q1] * PN2907A PNP transistor [Q2] * 1N4148 fast switching diode [D1] * RFID antenna coil or wind your own with Enamel copper wire (magnet wire) [L1] * Capacitors quantity capacitance location(s) 4 depends on L1 C1, C2, C3, C4 1 10pF C5 1 330pF C6 1 4.7nF C7 * Resistors quantity resistance location(s) 1 1kO R1 2 470kO R2, R7 1 51kO R3 1 22kO R4 1 220kO R5 1 4.7kO R6 1 10kO R8 1 6.8kO R9 Design First we want to generate the 134.2kHz carrier frequency for the reader. We can do that by using any of the Arduino's PWM-capable timers to generate a square wave. Arduino timers can only achieve a frequency of 134.4kHz which is close enough for our purposes. The example sketch uses Timer1 to output the square wave on PB1 (Arduino Nano pin 9). The square wave from the Arduino controls the push-pull amplifier formed by R1, Q1, and Q2. The push-pull amplifier then drives the LC resonator formed by the antenna L1 and its associated tuning capacitors C1, C2, C3, and C4. The LC resonator will need to be tuned to resonate at the carrier frequency. The resonance frequency of an LC resonator can be calculated with the following formula (online calculator). $F = \Large \frac{1}{2 \pi \sqrt{L \times C}}$ For example, if we have a 2.8mH antenna coil that we want to resonate at 134.4kHz then the total capacitance of $C1 + C2 + C3 + C4$ should be 500.8pF. $134.40kHz = \Large \frac{1}{2 \pi \sqrt{2.8mH \times 500.8pF}}$ The closest capacitance that we can easily achieve is $500pF = 220pF + 220pF + 30pF + 30pF$, which is close enough. $134.51kHz = \Large \frac{1}{2 \pi \sqrt{2.8mH \times 500pF}}$ Tags will be easier to read with a properly tuned LC resonator. Tuning can be judged by measuring the peek-to-peek voltage of the LC resonator. A peek-to-peek voltage 3 to 4 times higher than the supply voltage should be achievable. Oscilloscope view of antenna With that, we have a device that can supply power to a tag, act as a clock signal, and provide a communication channel. If a tag enters the EM field of the antenna coil then the tag will power up and start modulating its data into the carrier. Oscilloscope view of antenna near tag Next we need to extract the transmitted data from the carrier. That can be done by passing the signal through series of filters, starting with the envelope detector formed by D1, R2, and C5. The optimal frequency for our envelope detector can be calculated from the carrier frequency and the frequency of the data signal with the following formula. $F_{o} = \sqrt{F_{c} \times F_{d}}$ The carrier frequency is still 134.4kHz and according to the the FDX-B protocol, the frequency of the data signal is a function of the carrier frequency and the data that is being transmitted. One bit of data is transferred for every 32 carrier cycles and a bit is identifiable by a state transition at the start and end of a bit. $4.2kHz = \Large \frac{134.4kHz}{32}$ i.e. 4200 kb/s Additionally, a "0" bit is identified by a state transition in the middle of a bit period. That means that our data signal can change as fast as every 16 carrier cycles and results in a maximum data signal frequency of 8.4kHz. $8.4kHz = \Large \frac{134.4kHz}{16}$ i.e. 8400 baud Now we can calculate that the optimal envelope detector should operate at 33.6kHz. $33.60kHz = \sqrt{134.4kHz \times 8.4kHz}$ The actual frequency of our envelope detector can be calculated with the following formula for an RC filter. $F = \Large \frac{1}{2 \pi \times R \times C}$ We can get close to the optimal frequency with a 470kO resistor and a 10pH capacitor. $33.86kHz = \Large \frac{1}{2 \pi \times 470k\Omega \times 10pH}$ Oscilloscope view of envelope detector Next we can use the low pass filter formed by R3 and C6 to cut off frequencies higher than that of our data signal, such as the carrier frequency. We can use the formula for an RC filter again to calculate a cutoff point at, or slightly above, the data signal frequency of 8.4kHz. A 51kO resistor and a 330pH capacitor will work well for this. $9.46kHz = \Large \frac{1}{2 \pi \times 51k\Omega \times 330pH}$ Oscilloscope view of low pass filter We should have a fairly clean data signal now that the filtering done. All that's left to do is amplify the signal to the logic level of the Arduino. For that, we can use an LM358 dual op-amp with both op-amps in inverting configurations and operating in series. By first passing the signal through a series capacitor, we can make the signal osculate around the set point of the op-amps. For that reason we will use the voltage divider formed by R8 and R9 to set the non-inverting inputs of the op-amps to a voltage near the midpoint of their output voltage. We will configure the first op-amp to have a gain of 10 to avoid distorting the data signal. Oscilloscope view of amp stage 1 The second op-amp is arbitrary configured with an further gain of 100. Oscilloscope view of amp stage 2 That gives us a digital signal which is suitable for parsing by an Arduino. See Also 125 kHz RFID tag reader EM4100 RFID Reader Mod Coil Inductance Calculator License GPLv3 About Arduino FDX-B reader built from discrete components. Topics arduino rfid pet em4100 fdx-b Resources Readme License GPL-3.0 license Activity Stars 52 stars Watchers 3 watching Forks 1 fork Report repository Languages * C++ 100.0% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.