Sign in to follow this  
Followers 0
BINREV SPYD3R

RFID Enabling Your Front Door (with a Parallax BASIC Stamp & 13.5

2 posts in this topic

mainboardwithrfid-small.jpgI decided to try and improve the reliability and responsiveness of my previous RFID front door project (based around a client / server design), by re-implementing it using the Parallax BASIC Stamp 2e, and the 13.5MHz APSX RW-210 RFID reader as a standalone device. I was also looking to gain some practical experience with BASIC Stamp programming.

The BASIC Stamp is a microcontroller (small, cut down computer) with a CPU, Memory, and input/outputs. The APSX RW-210 is a 11.43cm x 6.8cm relatively low profile RFID reader with a specified read range of around 18cm (I however found that around 10cm was more typical when using the "Vicinity Card Transponder" also supplied by APSX, and similar compatible ICODE SLI cards).

The design is fairly straight forward, a custom circuit board links the BASIC Stamp to the RFID reader, and is powered by 12v. When a valid card is recognised, it provides 12v output to a door strike, and buzzer for 3 seconds. When an invalid card is recognised, it pulses 12v to a buzzer only for 250 milliseconds 3 times in a row (see below for video demo). It also features a trigger input which when connected to ground will simulate a valid tag bring presented to the reader (this is used to "buzz" open the door from a remote location).

rfidboardconn-small.jpgI started by soldering on a connector to the RW-210, and making up a test cable to power the device and connect it up to the BASIC Stamp. When testing I used the "Super Carrier Board" from a BASIC Stamp 1 Starter Kit.

Then I wrote the software, see below for download link (with the help of the BASIC Stamp Manual) to communicate with the reader / buzzer / door strike. It is worth noting that the Parallax reader communicates via serial using ASCII, whereas the RW-210 uses HEX. Also any "DEBUG" statements put into the code during development should be commented or removed since they will slow down program execution.

prototype-small.jpgThe transmit pin on the RW-210 should be connected to the pin set to receive serial communicates on the BASIC Stamp, and the receive pin on the RW-210 should be connected to the pin set to transmit serial communications on the BASIC Stamp.

The RW-210 must be connected to a regulated 5v supply, the Parallax carrier board can be connected to 6-30v. For ease during development I used two separate power supplies.

Component parts list:

  • Stripboard (Maplin: FL17T)
  • PCB-Mounting Terminal Blocks (Maplin: RH80B)
  • Rectifier Diode (Maplin: QL73Q)
  • 4 Core Alarm Cable (Maplin: XS54J)
  • 4w PCB Right Angel Plug (Maplin: L65AZ)
  • 8w PCB Latch Housing (Maplin: YW23A)
  • 5v Red LED (Maplin: CK46A)
  • 5v 1A Fixed Regulator (Maplin: CH35Q
  • Capacitor Pack (100 uF required) (Maplin: N68BT)
  • Resistor Pack (10k Ohm, 220Ohm, 470 Ohm required) (Maplin: N63BH)
  • Miniature Buzzer (Maplin: FL40T)
  • PCB Terminals (Maplin: YW25C)
  • 2.5 Power Line Socket (Maplin: JK12N)
  • Right-Angled D-Sub 9-Way Socket (Maplin: FG25C)
  • ABS White Plastic Box (Maplin: CC81C)
  • IRF540A MOS-FET (Maplin: N10AH)

mainboardback-small.jpgAfter the design / code had been tested working I went ahead and started building a custom circuit board. The board accepts 12v input which is regulated down to 5v for powering both the BASIC Stamp, and the RW-210 (via the use of a Voltage Regulator IC, and a capacitor). There is also a diode to prevent breaking the board by reversing the polarity of the 12v input.

The BASIC Stamp can only output up to 5v on its pins, with a limited current, therefore I chose to use two MOS-FETs to act as an intermediary and switch the 12v buzzer / door strike. The MOS-FETs have 3 pins that should be connected to the BASIC Stamp, supply (-v) i.e. ground, and supply (+v) via the buzzer or door strike [wiring diagram]. Depending on your requirements it may be possible to use relays / transistors instead.

Three terminal blocks (green) are used to supply power to the board (during development), connect to the buzzer, and connect to an external case mounted power LED. Two PCB mounting terminal blocks are used to connect to the RW-210, and break out the 12v power / 12v electronic strike, and trigger connections. Several LEDs easily show if the board is powered, and the state of the two outputs (buzzer / door strike) for development / debugging purposes.

comport.jpgI also decided to soldered on a 9 pin serial socket direct to the board since it is far easier to simply connect up a laptop in situ via a standard serial cable, than it is to remove the BASIC Stamp from its socket, plug in into the carrier board, power up the carrier board, then remove it from the carrier board and put it back on the custom circuit board again. The pins are also very easy to bend / break off when repeatedly inserting / removing it from sockets. The serial port was found to be loose after being soldered onto the circuit board, therefore it was further secured via two restraining wired at either side. See the Parallax BASIC Stamp manual for details on wiring the port, also remember to bridge pins 6 and 7.

mainboard-small.jpgOverall the new design has turned out to be a vast improvement. Response time is now pretty much immediate whereas before it could occasionally take a few seconds of waving around the RFID card on the reader for it to recognise, and then a further few seconds for the signal to travel to the server, and then back from the server to the door relay. Reliability has also been increased due to reduced points of failure i.e. not being dependent on the server / software, network cable in-between, and separate relay powering the door strike.

Both the custom circuit board, and the RW-210 fitted neatly (but only just) into the existing ABS box used in the previous project, although this did require a number of the taller components to be slightly bent over.

The new design has resulted in a loss of flexibility since programming in new RFID cards / tags requires a screw driver (to open the ABC box), laptop with software, and serial cable, rather than editing a simple text file. However this is not required very often. If it was the process could be further improved via the use of e.g. a "Moxa NE-4100T TTL serial to Ethernet embedded device server" (as used in the previous project) permanently connected to the onboard serial port to allow over network reprogramming via the BASIC Stamp editor. This approach could also be used to facilitate e.g. remote logging of tag usage.

rfidboard-small.jpgIt is worth noting that the Parallax device is a 125MHz reader, whereas the RW-210 uses 13.5 MHz. In general the RW-210 appears to be a more professional unit, supporting two way communications with the tags (for reading / writing data), along with reading multiple tags at the same time in "Fast Mode".

APSX also offer the RW-310, a bigger reader, with a larger read range. If you are ordering from the UK be prepared to pay an additional $75 shipping, on top of the $54.65 reader price and around £20 import duty.

ICODE SLI ISO15693 (RW-210 compatible) cards are available in the UK from ib technology at a cost of £5.50 each. I ordered 5 which came to £34.00 after postage. I also purchased a pack of 10 Keyring RFID tags (Mini Keyfob I-Code SLI) from Mannings RFID Shop at a total cost of £14.52 however the smaller size of the keyring tags had a noticeably detrimental affect on read range.

I was able to purchase the BASIC Stamp 2e on eBay for a very reasonable £30 considering what I would have had to pay otherwise from Parallax directly (shipping / import duty). The seller I purchased from does not always have active auctions on eBay therefore if you are looking to purchase one email me (nick84 at binrev.com and I will pass on his contact details.

During the project, I found the shareware "Tenlon Serial Port Debug Tool" extremely useful in debugging communications issues during programming. Also the Parallax book What’s a Microcontroller came in handy for showing how to actually wire up inputs / outputs to the BASIC Stamp.

Thanks to Parallax forum members Mike Green and Chris Savage for their information on using the BASIC Stamp output pins to control other devices.

Download: RW-210 BASIC Stamp 2e source code (.bse)

Download: Invalid / Valid Tag video demo (divx) [

]

 

http://www.digitaldawgpound.org/nick84/post=189
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0