ATtiny Chip Abused in RFID Application

One of Atmel’s smallest microcontrollers, the ATtiny, is among the most inexpensive and reliable chips around for small applications. It’s also one of the most popular. If you don’t need more than a few inputs or outputs, there’s nothing better. As a show of its ability to thrive under adverse conditions, [Trammell Hudson] was able to shoehorn an ATtiny into an RFID circuit in a way that tests the limits of the chip design.

The RFID circuit only uses two of the ATtiny’s pins and neither of which is the ground or power pin. The ATtiny is equipped with protective diodes on its input pins, and if you apply an AC waveform to the input pins, the chip is able to use the leakage current to power itself. Once that little hurdle is crossed, the ATtiny can do the rest of its job handling the RFID circuitry.

This project takes a deep dive into the internals of the ATtiny. If you’ve ever wondered what was going on inside of everyone’s favorite tiny microcontroller, or if you’re looking for an RFID circuit that keeps parts counts to an absolute minimum, this is the project for you.  The ATtiny is more than just a rugged, well-designed chip, though. It’s capable of a lot more than such a small chip should be able to.

Thanks to [adnidor] for the tip!

21 thoughts on “ATtiny Chip Abused in RFID Application

      1. I even discovered this hack 22 years ago, 1996. That’s a bit older than [Micah]’s take of it with an AVR, despite her great expertise and great ideas on countless projects, she was not the first on this one nor is [t4f] a year earlier (2009) with a PIC 12F683. Who has older proof ? 😀
        Search for a bulgarian design with a PIC 12C508 for a Microchip contest called design for dollar$.

    1. Lol. I must have discovered this article on HaD a few years back, and then I linked it on reddit a few days ago. And now it has made a full circle. But this hack is so awesome, it really deserves repeated posts.

    1. The small capacitor is a decoupling cap and there to remove the AC interference, I believe. This is especially needed when the power supply is an oscillating radio frequency.

    2. Ummm … no? Think of it like putting the big electrolytic capacitor of your standard AC to DC power supply circuit before the bridge rectifier. Not going to work. The point of this article is that the ATtiny recifies the AC from the RFID coil internally. You can’t add stability with an external cap. Sorry.

      1. Did you consider:
        The coil is connected to I/O pins that (internally) have diodes to VCC and GND.
        Then the cap on the VCC to GND provides the reservoir to hold the charge collected,

        1. You are right [Redhatter].
          A cap on the GPIOs should be in parallel with the coil and help make it resonate at 125kHz.
          But decoupling cap and zener shall be put after the internal rectifier made by the body diodes, and this is possible as this is the Vcc and Gnd pins of the chip!

    1. I’ve tried various caps between vcc and gnd, and found no difference with or without. The only cap that makes a difference is the one in parallel with the coil. Credit card sized coils work fine without a capacitor, but tiny coils (1-2 cm) work only if inductance is matched with a cap for resonance.

  1. The capacitor across the coil is a little puzzling. The Atiny does not function on AC. The internal clamping diodes are the full bridge rectifier. A capacitor on the output would store the energy and smooths the voltage as a normal AC to DC power supply would.

    In this circuit, the voltage across the capacitor is depended on the magnetic field of the card reader. When using a higher powered card reader, the voltage can rise above the Atiny spec and destroy it. I would recommend adding a zener diode across the DC input as well.

    My guess on the capacitor on the input is rejecting high-frequency noise.

  2. Resonance, the capacitor across the coil is for Resonance and increase the voltage value. Another one in vcc-gnd would indeed decouple the supply 0.1uF? Maybe less…
    The rectification of the ac wave is done through the ESD input diodes (se input circuit of a cmos).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.