ATtiny85 + 100 ohm resistor = RFID tag?

Go To Last Post
16 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

http://scanwidget.livejournal.com/32928.html

Sure, its a hack, but its a dam good one. I saw this on Hack-a-Day and just had to share it.

I suppose this would work on a whole range of tiny's, would this work on a tiny10? Talk about a perfect application for one of those.

"A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools."
-- Douglas Adams

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's not a 100ohm resistor, it looks more like a 1000uH inductor with 10% tolerance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes it's a 1mH (1000µH) ±10% inductor (or coil as he calls it).
Please note the third ring is red and not brown as you can see if you look at the hires picture. So even if it had been a resistor it would have been 1kohm and not 100ohm.

Brown - black - red - silver

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would love to see the jury of the Atmel/Arrow “Design Smarter with Atmel AVR Processors” contest when receiving such a proposal :-)

Stealing Proteus doesn't make you an engineer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

From the AVR-GCC source code: http://svn.navi.cx/misc/trunk/av...

http://svn.navi.cx/misc/trunk/av...

/*
 * Software-only implementation of a passive low-frequency RFID tag,
 * using an AVR microcontroller.
 *
 * Copyright (c) 2008 Micah Dowty 
 * See end of file for license terms. (BSD style) 
 *
 * Supports EM4102-style tags, and the HID 125 kHz prox card protocol.
 * The card format and ID number are set below, with #defines.
 *
 * Basic schematic:
 *
 *              ATtiny85
 *              +--------------+
 *            --| RST      Vcc |--
 *    +- L1 ----| B3/CLKI  SCK |--
 *    +---------| B4      MISO |--
 *            --| GND     MOSI |--
 *              +--------------+
 *
 * L1 is about 1 mH. It and the AVR are the only components.
 * All other pins should be unconnected.
 *
 * AVR notes:
 *
 *   - Low-voltage parts are better, but I've had success using
 *     this with the non-extended voltage range parts as well.
 *
 *   - Program the fuses for an external clock with no divider.
 *     On the ATtiny85, this means setting lfuse to 0xC0.
 *     Note that after you set this fuse, your programmer will
 *     need to supply a clock on pin 2 for subsequent programming
 *     operations.
 *
 * Optional parts:
 *
 *   - Power decoupling capacitor, between 0.1 and 10uF.
 *     Bigger is generally better, as it will increase the
 *     usable range- but if you use this tag with readers that
 *     have a pulsed carrier wave, bigger caps may take too long
 *     to charge.
 *
 *   - A load capacitor, in parallel with L1. This will depend
 *     on your coil. For physically small coils, the internal
 *     capacitance of the AVR seems to be enough. For larger coils,
 *     it may be necessary to use a cap here. Experiment to find the
 *     best value. 
 *
 *   - A header, for in-circuit programming. You'll need to expose nearly
 *     every pin on the chip, since the AVR will also need an external
 *     clock.
 *
 *   - If you want to make an active (powered) tag, you could hook a 3V
 *     battery up to the Vcc and GND pins on the AVR. To decrease the power
 *     usage when idle, you may want to hook a large (a couple megohm)
 *     pull-down resistor to the clock input, to be sure CLKI doesn't float
 *     when there is no RF field present.
 *
 * Theory of operation:
 *
 *   Like all passive RFID tags, this circuit is powered by the 125 kHz
 *   carrier wave emitted by the RFID reader. In our case, the coil is
 *   just connected to two AVR I/O pins. We're actually powering the AVR
 *   through its protective clamping diodes, and the power is retained by
 *   the AVR die's internal capacitance.
 *
 *   This is a very weak power source, and the AVR typically gets little
 *   over a volt of Vcc. As a result, most of the AVR's oscillators won't
 *   start. We can, however, use the carrier wave itself as a clock as well.
 *   This also makes the software easy, since the instruction clock is also
 *   the RF clock. We're already clamping the coil voltage into something
 *   resembles a square wave, so this makes a good external clock source.
 *
 *   To send data back to the reader, passive RFID tags can selectively
 *   attenuate the reader's carrier wave. Most RFID tags do that with a
 *   transistor which shorts their coil. We accomplish this by driving the
 *   coil I/O pins to ground, by toggling the DDRB register. Since the I/O
 *   drivers on the AVR are weaker than the RF signal, we still get enough
 *   of a pulse to provide the CLKI input.
 *
 *   And that's about all there is to it. The software is quite simple- we
 *   are mostly just using assembler macros to convert the desired RFID tag
 *   code into sequences of subroutine calls which output bits. We can't
 *   get too fancy with the software, since it's only executing at 125 kHz.
 *
 */
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh my! LOL!

/Jesper
http://www.yampp.com
The quick black AVR jumped over the lazy PIC.
What boots up, must come down.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


The blog has moved to another website:
Quote:
This blog entry has moved

Sorry for the inconvenience, but I moved my blog and this post now has a new URL:

http://micah.navi.cx/2008/09/usi...

A new version of the source code was made a week ago (Version 1.1, 2010-06-15):
http://svn.navi.cx/misc/trunk/av...

Quote:
Improved HID modulation contributed by Luke Koops
HID parity bit support contributed by Cesar Fernandez

Last Edited: Tue. Jun 22, 2010 - 09:20 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Looks like a good use for someone to put all those extra Tiny15L's I have ;)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Blog entry about the new version 1.1 firmware:

AVRFID 1.1 Firmware http://micah.navi.cx/2010/06/avr...

Quote:
Since then [ver. 1.0], I received a couple patches:

  • Luke Koops improved the FSK modulation for HID tags, so that the resulting waveform is much more regular.
  • Cesar Fernandez described the HID card format in more detail, and implemented a parity calculation. The 45-bit code is actually composed of four distinct fields:
    • A 20-bit manufacturer code or header, constant for all HID cards.
    • An 8-bit site code, unique to the particular security installation.
    • A 16-bit unique ID. These are often printed in decimal on the back of the card, and they seem roughly sequential.
    • An odd parity bit, covering the other 44 bits.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Does this mean that a AVR works with a 1.5V cell if you make an extern osc. I have to check that :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Does this mean that a AVR works with a 1.5V cell if you make an extern osc.

About 5 years ago we developed a Mega48V battery-powered app. In testing it seemed to work reliably down to ~1.1V .

I'd expect new P/PA chips to be even more forgiving.

IIRC there was a new announced AVR designed for single-cell power. But that has a charge pump on board.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Does this mean that a AVR works with a 1.5V cell if you make an extern osc.

From the ATtiny85 data sheet front page:
Quote:
Speed Grade
– ATtiny25V/45V/85V: 0 – 4 MHz @ 1.8 - 5.5V, 0 - 10 MHz @ 2.7 - 5.5V
– ATtiny25/45/85: 0 – 10 MHz @ 2.7 - 5.5V, 0 - 20 MHz @ 4.5 - 5.5V

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Looks like a good use for someone to put all those extra Tiny15L's I have
Nope. The application requires an AVR that can be clocked by an external source. The tiny15 has only an internal oscillator.

Regards,
Steve A.

The Board helps those that help themselves.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If it can start on 1.5V , it can take over and charge pump it's own power ;)

But can we trust that the reset will work!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a chain of ATtiny45v powered from a string of LiFePO4 cells, where each pulses the reset of the next up the line through a 0.1uf capacitor. That propagation stops working around 2.5 volts per cell, which corresponds to a ~1.3 volt reset pulse.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Koshchi wrote:
Quote:
Looks like a good use for someone to put all those extra Tiny15L's I have
Nope. The application requires an AVR that can be clocked by an external source. The tiny15 has only an internal oscillator.

I didn't read the specifics; sounds scary though. I don't think I would trust it for much more than fun.

I guess those chips are just destined for the round filing cabinet :?