RFID with SumoBot PCB?
Terry Simons
Posts: 2
Hi,
I'm attempting to get the RFID reader working with the SumoBot PCB, which unfortunately does not have Vcc, but since the RFID reader takes 5V, I thought perhaps Vdd would be ok to use?
So Here's how I have it wired up:
RFID VCC -> SumoBot Vdd
RFID /ENABLE -> SumoBot P0
RFID SOUT -> SumoBot P1
RFID GND -> SumoBot Vss
I'm using code from the "Simple Security System" example in the RFID manual (http://www.parallax.com/dl/docs/prod/audiovis/RFID-Reader-v1.1.pdf), which I used in part to determine how to wire the reader, and I'm a relative newbie when it comes to electronics, so please be gentle. [noparse];)[/noparse]
When the bot powers up, the LED on the RFID reader is green. The light goes red after enable, and I've added debug statements to verify that enable succeeded.
What I'm totally at a loss with is the reading part. My RFID tags don't appear to be triggering a read, and I'm really not sure why. Maybe I'm missing something about how this stuff needs to be wired up?
I've simplified the "Simple Security System" code down to a readable version that is specific to my chip, removing all of the extraneous checks. This is just for the sake of this post. I've been doing all of my prototyping with the full "Simple Security System" code.
When I run the code listed below, my debug terminal prints:
Activating Reader
Preparing to read...
But the read never succeeds when I wave my RFID tags near the reader. I'm not sure what might be going wrong here... any ideas?
Here are the relevant bits of code:
I'm attempting to get the RFID reader working with the SumoBot PCB, which unfortunately does not have Vcc, but since the RFID reader takes 5V, I thought perhaps Vdd would be ok to use?
So Here's how I have it wired up:
RFID VCC -> SumoBot Vdd
RFID /ENABLE -> SumoBot P0
RFID SOUT -> SumoBot P1
RFID GND -> SumoBot Vss
I'm using code from the "Simple Security System" example in the RFID manual (http://www.parallax.com/dl/docs/prod/audiovis/RFID-Reader-v1.1.pdf), which I used in part to determine how to wire the reader, and I'm a relative newbie when it comes to electronics, so please be gentle. [noparse];)[/noparse]
When the bot powers up, the LED on the RFID reader is green. The light goes red after enable, and I've added debug statements to verify that enable succeeded.
What I'm totally at a loss with is the reading part. My RFID tags don't appear to be triggering a read, and I'm really not sure why. Maybe I'm missing something about how this stuff needs to be wired up?
I've simplified the "Simple Security System" code down to a readable version that is specific to my chip, removing all of the extraneous checks. This is just for the sake of this post. I've been doing all of my prototyping with the full "Simple Security System" code.
When I run the code listed below, my debug terminal prints:
Activating Reader
Preparing to read...
But the read never succeeds when I wave my RFID tags near the reader. I'm not sure what might be going wrong here... any ideas?
Here are the relevant bits of code:
' ========================================================================= ' ' File....... RFID.BS2 ' Purpose.... RFID Tag Reader / Simple Security System ' Author..... (c) Parallax, Inc. -- All Rights Reserved ' E-mail..... support@parallax.com ' Started.... ' Updated.... 07 FEB 2005 ' ' {$STAMP BS2} ' {$PBASIC 2.5} ' ' ========================================================================= ' -----[noparse][[/noparse] Program Description ]--------------------------------------------- ' ' Reads tags from a Parallax RFID reader and compares to known tags (stored ' in EEPROM table). If tag is found, the program will disable a lock. ' -----[noparse][[/noparse] Revision History ]------------------------------------------------ ' -----[noparse][[/noparse] I/O Definitions ]------------------------------------------------- Enable PIN 0 ' low = reader on RX PIN 1 ' serial from reader Spkr PIN 2 ' speaker output Latch PIN 3 ' lock/latch control ' -----[noparse][[/noparse] Constants ]------------------------------------------------------- T2400 CON 396 ' -----[noparse][[/noparse] Variables ]------------------------------------------------------- buf VAR Byte(10) ' RFID bytes buffer ' -----[noparse][[/noparse] Initialization ]-------------------------------------------------- Reset: HIGH Enable ' turn of RFID reader LOW Latch ' lock the door! ' -----[noparse][[/noparse] Program Code ]---------------------------------------------------- Main: DEBUG "Activating Reader", CR LOW Enable ' activate the reader DEBUG "Preparing to read...", CR SERIN RX, T2400, [noparse][[/noparse]WAIT($0A), STR buf\10] ' wait for hdr + ID DEBUG "Done reading...", CR HIGH Enable ' deactivate reader
Comments
Maybe I had a loose wire or something... [noparse]:D[/noparse]
So... is Vdd safe to use in place of Vcc? It seems to be working.
- Terry