Giter Club home page Giter Club logo

ch32v003-nfc's Introduction

CH32V003 NFC

Emulating a NFC tag directly on the CH32V003, inspired by SimpleNFC using ch32v003fun. This repository allows this 10-cent microcontroller to act as a ncf tag, requiring only a few passive components. The implementation here emulates a ISO/IEC 14443-3A, NFC Forum Type 2 Tag containg Ndef data. Though, any other tag supporting the 14443-3A standard should work as well. Currently supported commands reading and writing to the tag storate (including the UID), as well as the commands required for establishing communication.

Image

The code in this repository relies on the built-in OPA in the CH32V003, including the corresponding pins D0, D4 and D7. Further TIM2 is needed for transmission through load modulation. Finally, a 13.56MHz oscillator provides the clock signal that matches the NFC signal.

The current implementation is very basic, and does not handle anticollision and state changes according to specifications. Instead, this tag responds to every query it receives. Luckily, this is no problem when no other tags are present in front of the reader.

Hardware

Image The antenna is a square planar coil of 36.83mm outer length, consisting of 6 turns of 0.254mm track spaced 0.254mm apart. This, with a capacitor C5 of 47pF, has a resonance frequency of 13.56MHz.

  • D1 Rectifies the incoming AC-signal
  • C8 and R1 act as a low-pass filter, rejecting the 13.56MHz carrier.
  • C6, R5 and R4 are a further low-pass filter that acts as a reference for the OPA to detect incoming pulses.
  • R3 is the input resistor, as well as the modulated load for transmission.
  • R2 weakly pulls up the signal to avoid false triggers.

โš ๏ธ The schematic above relies on the protection diodes in the IC. To better protect the microcontroller it may be advisable to add protection diodes.

Applications

There is a lot that can be done over nfc, such as:

  • Emulating a tag
  • Reading sensors
  • Controlling peripherals
  • Programming the microcontroller
  • So much more...

ch32v003-nfc's People

Contributors

martinessink avatar

Stargazers

celestin avatar  avatar doragasu avatar  avatar  avatar  avatar  avatar solosky avatar MCUer avatar  avatar Vasco Santos avatar  avatar Deer McDurr avatar  avatar

Watchers

 avatar  avatar

Forkers

celestin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.