Simple and cheap microcontroller for RFID projet

Thread Starter

treythomas

Joined Mar 2, 2010
6
I'm looking for a simple and cheap microcontroller to read serial output from an RFID reader and determine whether or not the tag scanned is "authorized" or not. It doesn't need much memory, just enough for a very basic program and some 10 digit numbers.

I've already done this with my Arduino, but that's definitely overkill for such a simple job. I'm trying to get this project working as cheaply as possible (mostly for the challenge, not to save money).

Can someone provide me with information about a microcontroller that would be a good fit for this project? I looked into the ATtiny13.. would this be a good chip for the job? Also, how would one go about loading programs onto one of these?

Thanks in advance,
Trey
 
Last edited:

Thread Starter

treythomas

Joined Mar 2, 2010
6
Sorry for the double post, but I forgot one part. I'm also trying to make this system as low-power as possible, since I'll be installing it in my car to operate the door locks/ignition. I don't want to have to worry about it running down the battery when the car isn't on.

Trey
 

BMorse

Joined Sep 26, 2009
2,675
Sorry for the double post, but I forgot one part. I'm also trying to make this system as low-power as possible, since I'll be installing it in my car to operate the door locks/ignition. I don't want to have to worry about it running down the battery when the car isn't on.

Trey

The RFID reader will consume more power than most low power uc's... if the interrogator is constantly scanning for a tag anyway... are you going to place something to trigger the interrogator to read or is it always going to be scanning for a tag?? This would have to be quite a powerful RFID tag reader for it to be able to scan a tag outside the car...... Most require the tag to be within inches of the interrogator.... and away from metal structures than can cause interference (such as sheet metal on the cars body...)....



I have used the same one in a couple of projects myself...

My .02
 

Thread Starter

treythomas

Joined Mar 2, 2010
6
BMorse, thanks for your response.

My plan is to put the reader in the small window on the rear seat driver side (my car is a coupe) - the window is tiny and it doesn't matter if it's blocked. I might be wrong, but I don't think the glass will affect the signal much. Mounting it in the window would allow me to get the tag less than an inch from the reader.

I realize the reader will use more power than the microcontroller, but minimizing the microcontroller's power consumption will help. My plan is to turn on the reader every one or two seconds, so that it's not constantly scanning. The response wouldn't be instantaneous, but I don't mind having to hold the tag up to the reader for a second.

But then again, I drive my car frequently so it wouldn't be left on for days at a time without the battery being recharged. I doubt the power consumption from this reader would be enough to run down my battery overnight or even a few days.

My main question here pertains to the microcontroller - what microcontroller would you recommend for simple tasks like this?

Thanks,
Trey
 

Markd77

Joined Sep 7, 2009
2,806
If you fancy a real challenge you could try a microchip PIC10F200...
6 pins, 256 bytes program memory, 16 bytes ram, no eeprom which could be a dealbreaker.
On the plus side it has an internal oscillator and 175uA operating current, 100nA sleep mode.
 

BMorse

Joined Sep 26, 2009
2,675
You will need to choose a low power uc with a UART, since the tag reader uses the uart to communicate at 2400 baud serial TTL....

B. Morse
 

Thread Starter

treythomas

Joined Mar 2, 2010
6
If you fancy a real challenge you could try a microchip PIC10F200...
6 pins, 256 bytes program memory, 16 bytes ram, no eeprom which could be a dealbreaker.
On the plus side it has an internal oscillator and 175uA operating current, 100nA sleep mode.
Haha I guess I'm not really looking for something difficult to build, I just want to see how cheaply I can make it happen. Does this chip have a UART? I didn't realize I needed one before BMorse's post:


You will need to choose a low power uc with a UART, since the tag reader uses the uart to communicate at 2400 baud serial TTL....

B. Morse
I'm glad you mentioned this, I wasn't really aware that microchips were made without UARTs I guess. Where is a good place to shop for these? I'm fairly new to this, the closest thing I've done to dealing with microcontrollers directly is an Arduino.

Thanks for the help
Trey
 

BMorse

Joined Sep 26, 2009
2,675
I would go for one a little cheaper, might have more I/O's than what you need right now but could always be useful for adding other devices later.....

I would use the PIC16F628,
This powerful (200 nanosecond instruction execution) yet easy-to-program (only 35 single word instructions) CMOS FLASH-based 8-bit microcontroller packs Microchip's powerful PIC® architecture into an 18-pin package and is upwards compatible with the PIC16F628, PIC16C62XA, PIC16C5X and PIC12CXXX devices. The PIC16F628A features 4MHz internal oscillator, 128 bytes of EEPROM data memory, a capture/compare/PWM, a USART, 2 Comparators and a programmable voltage reference that make it ideal for analog/integrated level applications in automotive, industrial, appliances and consumer applications.
and is also low power:

Low-Power Features:
• Standby Current:
- 100 nA @ 2.0V, typical
• Operating Current:
- 12μA @ 32 kHz, 2.0V, typical
- 120μA @ 1 MHz, 2.0V, typical
• Watchdog Timer Current:
- 1μA @ 2.0V, typical
• Timer1 Oscillator Current:
- 1.2μA @ 32 kHz, 2.0V, typical
• Dual-speed Internal Oscillator:
- Run-time selectable between 4 MHz and
48 kHz
- 4μs wake-up from Sleep, 3.0V, typical
the PIC16F628A-E/P is only $1.86

Check it out here >>> http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010210

And you can read up on Microchips NanoWattXLP technology here >> http://ww1.microchip.com/downloads/en/DeviceDoc/01146B_chapter%202.pdf

My .02
 

Markd77

Joined Sep 7, 2009
2,806
10F200 doesn't have a uart, the 16F628 is a popular and cheap chip that does.
It's not really that hard to implement a uart in software especially just receiving.
I'd be tempted to use a chip with a UART because it is one less thing to worry about.
The levels expected by the uart are inverted compared to the rs232 standard. Presumably the tag reader is also inverted but worth checking. I couldn't figure it out from the datasheet.
 

BMorse

Joined Sep 26, 2009
2,675
10F200 doesn't have a uart, the 16F628 is a popular and cheap chip that does.
It's not really that hard to implement a uart in software especially just receiving.
I'd be tempted to use a chip with a UART because it is one less thing to worry about.
The levels expected by the uart are inverted compared to the rs232 standard. Presumably the tag reader is also inverted but worth checking. I couldn't figure it out from the datasheet.

I have used the same tag reader on a previous project of mine with the PIC32MX uc, it works just fine with a pic.....

here is part of the code I wrote for the Pic32 (in C) for reading the tag via the interrogator module...

Rich (BB code):
unsigned char Read_RFID()
{//Must Open UART1 first!!
    int counter=0;                   //what byte we are on
    char strC;                         //compare result
    UART1_Open();
    mRFID_On();                     //Enable RFID Reader
    Delayms2(100);                 //Wait for Module to power up all the way
    while(rDATA!=13)               //wait for carriage return
    {
        while(!DataRdyUART1())
        {                                 //Add timeout routine here
        };//Wait for Data
        rDATA=ReadUART1();      //Read Data from UART1 RX
        if (rDATA!=10)
        {//Append Data to buffer
            CODE[counter]=rDATA;         //write data to buffer
            RFID_CODE[counter]=CODE[counter];
            counter++;                        //Increment buffer location
        }//End If 10
    };//End While(rDATA!=13)

//------------------------------------------------------------------------------
EXITREAD:
    mRFID_RXTX_Off();                //Disable RFID Reader
    counter=0;                        //Reset data Buffer counter
    CloseUART1();                    //Close Uart1
    Delayms2(10);

}//End ENABLE_RFID
B. Morse
 

Markd77

Joined Sep 7, 2009
2,806
We must have been typing at the same time bmorse, good call on the 628. The rfPIC12F675 sounds like an interesting option if the OP hasn't bought the tag reader already.
 
Top