Just trying to make sense of things...

RFID Lock Prototype: Ethernet Enabling

Sunday, 15 March 2009 09:32 by jordan.terrell

I've made a bit of progress on my RFID Lock prototype.  I've got it recognizing valid RFID tags, and rejecting invalid ones.  I've also got it recognizing all the keys on a keypad, and if the deadbolt is in the unlocked state, pressing the lock button will lock the deadbolt.

One might think that this prototype is done - ready to be installed.  Not so!  The next phase of the project is what, I think, is going to make the lock interesting.  I'm going to add Ethernet support!  The end goal is to have a secured custom web site that will let me manage the list of RFID tags that are able to unlock the deadbolt, time windows when individual tags are active, plus logging and notification.  When I use my card, I don't need to be notified, but if a family member uses their card (someone who, under normal circumstances, shouldn't be unlocking my door) I will be notified via email/SMS.  I can also imagine having the "hidden key under a rock", but have it not be active - if someone who I haven't given a key to needs to unlock my door, I can remotely activate the hidden key for a brief period of time.  In talking with John Park about this prototype at MAKE: Day, he asked if I was going to have some kind of remote unlock directly from the web site.  Probably not - I'll stick to requiring an RFID tag.

Since I've been using Arduino for my microcontroller platform (technically it is the Atmel ATMEGA168 microcontroller), much of the design heavy lifting for including Ethernet connectivity has been done for me.  There is an Ethernet hardware shield and an Ethernet software library.  It's all based around the WizNet W5100 Ethernet chip. At first, I just bought the W5100 chip from Saelig, thinking that I could build a breakout board I can use on a breadboard.  Being that it has 80 pins (73 of which can be connected to) it was going to be a rather long breakout board, but I've been having trouble with the board layout.  The PCB manufacturer that I want to use requires traces to be 8 mils (0.008 inches) wide and spaced 8 mils apart.  You might think that that is very small, but since I'm trying to route this on a board that is spaced about one (1) inch wide, it is proving difficult.  If they would allow 6 or 7 mil width/spacing on a two layer board, I would have been done already.

SchmartBoard with ATMEGA168-20AU For those familiar with Arduino and the Arduino Ethernet shield, this might seem like an unnecessary task.  My argument is that I want to learn more about the W5100 chip and how to embed it in a circuit because 1) I like understanding how things work under the covers, and 2) I'm not planning to use the Ethernet shield in my final design.  I plan on building a custom PCB.  To do that, I'm going to need to be able to program an Atmel ATMEGA168-20AU - it's the same chip that is on the Arduino Mini board.  To put the Arduino bootloader on the chip, I'm using the FTDI FT232RL BitBag approach.  I wanted the have some way of easily programming the chips without them having to be in a permanent circuit, so I bought a SchmartBoard of the appropriate size from Mouser, and using painters tape I affixed the chip to the surface (see photo).  Now I can install the bootloader on this chip without having to put In-Circuit Serial Programming (ICSP) pins on my RFID lock PCB.  I tried to use a SchmartBoard for the W5100 Ethernet chip, but the traces in the center of the board were too short.  So I ended up buying a standard Ethernet shield for now so I can work through the rest of the firmware development.

Once I have a stable build of the firmware using the Ethernet shield, I will make another post.

DSC_9621   DSC_9622