PDA

View Full Version : RFID Dorm Lock



Billy K
11-17-2006, 01:37 AM
Although my projects are never "finished" this one is fully operational, so it's completed enough to be here. The RFID door lock makes getting in our room much simpler, now instead of putting in the key, turning it, turning it back, and pulling it out, we simply hold our card to the door and it unlocks! The trickiest part of this project was of course the lack of tools in a dorm room and lack of supplies. The servo is held on with sticky wax, a paper clip is used for the linkage, duct tape is another material used, and the whole thing is mounted on a scrap 2x4 as not to damage the door. A bs2 runs the program, and a servo turns the lock. I plan on adding a button later (to lock/unlock the door from the inside without a card), a separate lm7805 vreg for the rfid reader (the one on the super carrier board is getting VERY hot, is this normal?) and a relay to power down the servo when not in use. Attached are a few pics and the source code for the program (just a highly modified version of the code provided for the rfid reader)
http://i18.photobucket.com/albums/b104/billyk128/lock1.jpg
http://i18.photobucket.com/albums/b104/billyk128/lock2.jpg
And yes, those are twisty ties used for some of the wiring.

Kevin Wood
11-17-2006, 01:44 AM
In addition to adding another voltage regulator, you might want to mount the BoE to the 2x4 using standoffs. This will give some air circulation around the board.

Beau Schwabe (Parallax)
11-17-2006, 02:22 AM
billyk,

Nice!... you might want to implement a TIMEOUT in your SERIN routine to conserve power.



LOW Enable ' activate the reader
SERIN RX, T2400, [WAIT($0A), STR buf\10] ' wait for hdr + ID
HIGH Enable ' deactivate reader


Refer to pg 3
http://www.parallax.com/dl/docs/prod/audiovis/RFID-Reader-v1.2.pdf
"The current consumption of the module will increase dramatically when the module is active."

To implement a TIMEOUT, you might try something like this...



LOW Enable ' activate the reader
SERIN RX, T2400, 1000, NoData, [WAIT($0A), STR buf\10] ' wait for hdr + ID
NoData: ' <------------------ Jump here if no data received after 1 second
HIGH Enable ' deactivate reader
Pause 500 ' <------------------ Pause for 1/2 second (give things a rest)



▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

John R.
11-17-2006, 02:35 AM
Red Green would be proud! (If the women don't find you handsome, make sure they find you handy!)

Awsome job in making things work with what you have available.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John R.

8 + 8 = 10

Post Edited (John R.) : 11/16/2006 9:34:31 PM GMT

Billy K
11-17-2006, 03:30 AM
Thanks for all the advice! I'll make the modifications and post new pics & results as soon as I can get to it (it will probably be after thanksgiving as I'm going home and will bring back parts)

Billy

Billy K
11-17-2006, 05:57 AM
Main:
LOW Enable ' activate the reader
SERIN RX, T2400, 1000, NoData, [WAIT($0A), STR buf\10] ' wait for hdr + ID
HIGH Enable
GOTO Check_List

NoData: ' Jump here if no data received after 1 second
HIGH Enable ' deactivate reader
PAUSE 500 ' wait half second
GOTO Main ' loop

Check_List:
.......


we'll see how that works, it's kind of a big production to re-program the stamp as it's mounted on the door and no one has a laptop with a serial port. Update on how the "pause" works later tonight

EDIT: IT WORKS!!!
and now it looks cooler because the enable light blinks http://forums.parallax.com/images/smilies/roll.gif

Post Edited (billyk) : 11/16/2006 11:29:18 PM GMT

Paul Baker
11-17-2006, 08:21 AM
Haha, reminds me of when my best friend in college took apart his dorm doorknob, electrically isolated the knob from the ring and spliced a 120V zip line to each section. Touch only the knob and enter normally, accidentally touch the ring too and ZAP! He called it his hillbilly dorm security system. He almost got kicked out of the dorm when his RA entered his room on a suprise contraband inspection and touched both parts. He was written up for that, but they didn't recognize the arc welder in the corner made from a knife switch, jug of salt water and two carbon rods from the inside of batteries (which was the actual cause of the electrical outages eminating from his room and reason for inspecting his room).

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker (mailto:pbaker@parallax.com)
Propeller Applications Engineer
[/url][url=http://www.parallax.com] (http://www.parallax.com)
Parallax, Inc. (http://www.parallax.com)

Post Edited (Paul Baker (Parallax)) : 11/17/2006 1:25:06 AM GMT

Beau Schwabe (Parallax)
11-17-2006, 10:36 AM
billyk,

Glad it works!...SO is the regulator still getting "as hot" as before or is it not a noticeable difference?

Paul.... sounds familiar http://forums.parallax.com/images/smilies/smile.gif ..now the question is, why would there be a need for an arc welder in a freshman dorm room? hmmmm

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

Paul Baker
11-17-2006, 11:53 AM
To make sculptures out of pilfered cafeteria silverware, of course :)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker (mailto:pbaker@parallax.com)
Propeller Applications Engineer
[/url][url=http://www.parallax.com] (http://www.parallax.com)
Parallax, Inc. (http://www.parallax.com)

Billy K
11-17-2006, 01:06 PM
It's a little bit cooler but I'm going to get a separate regulator because I still think it's getting too hot. It's almost unbearable to hold my finger to the side of the heatsink. I've double checked the wiring (I don't think it's a short because it doesn't get hot until the rfid reader is hooked up), put it on standoffs, and it still heats up in less than 2 minutes. (I've tested it without the servo too) I looked it up, and the reader draws .090 amps, the stamp .003 amps. That's nowhere near 1 amp which is the max of the 2940. Could it be a defective regulator?

Also, you guys need to stop giving me dangerous like homemade arc welders! I don't want to get kicked out of school before I'm even half done with my freshman year!
And our silverware does suck too.

EDIT: Just a question, why is the 2940 used instead of the 7805?

Post Edited (Billy K) : 11/17/2006 6:31:02 AM GMT

Chris Savage
11-17-2006, 11:15 PM
Billy,
·
··· The LM2940 is a Low-Dropout Regulator.· It’s a little more efficient than a 7805 and less susceptible to thermal runaway.· The regulator on your board is most likely getting hot because of the combined current draw of the RFID and the Servo.· The servo being the more likely culprit.· You shouldn’t need to add an extra regulator.· That would actually end up consuming more current in the long run.· Take care.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support

Beau Schwabe (Parallax)
11-17-2006, 11:20 PM
Billy K,

What is the supply voltage you are powering the RFID Dorm Lock with? That could be the source of most of your heat.


The 2940 is used because it is a low-dropout regulator which will work down to 6 volts.
The 7805 requires more current just to sit there and do nothing than the 2940 does and will only work down to about 7 volts.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

Billy K
11-18-2006, 12:56 AM
I'm using an unregulated 12v 1a power supply from parallax. http://www.parallax.com/detail.asp?product_id=750-00007. As to the idea that the servo is the probable culprit, I've let it sit without the servo and the current draw from the rfid reader and stamp alone makes it heat up. Thanks again for all your advice. I appreciate it! http://forums.parallax.com/images/smilies/smile.gif
And here's what I plan to build when I get the parts in a week. (Just turning off the servo)
http://i18.photobucket.com/albums/b104/billyk128/rfidwithservo.jpg

Beau Schwabe (Parallax)
11-18-2006, 01:45 AM
Billy K,

12V dropped to 5V across·a linear regulator is going to need to dissipate 7V in the form of HEAT. If your circuit requires 200mA,
that's 1.4Watts of HEAT that the regulator must deal with·.... P = I * V

Use a power supply that is closer to your operating voltage and the regulator will be much happier.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

Post Edited (Beau Schwabe (Parallax)) : 11/17/2006 11:19:10 PM GMT

Billy K
11-18-2006, 03:16 AM
Thanks! Looks like I'll be purchasing the 7.5v wall wart soon.

Chris Savage
11-18-2006, 07:58 AM
Yes, now knowing the power source that is definitely your culprit.· I for some reason thought you had a battery on this.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support

sam_sam_sam
11-20-2006, 09:32 AM
Beau Schwabe (Parallax) said...

billyk,

Nice!... you might want to implement a TIMEOUT in your SERIN routine to conserve power.



LOW Enable ' activate the reader
SERIN RX, T2400, [WAIT($0A), STR buf\10] ' wait for hdr + ID
HIGH Enable ' deactivate reader


Refer to pg 3
http://www.parallax.com/dl/docs/prod/audiovis/RFID-Reader-v1.2.pdf
"The current consumption of the module will increase dramatically when the module is active."

To implement a TIMEOUT, you might try something like this...



LOW Enable ' activate the reader
SERIN RX, T2400, 1000, NoData, [WAIT($0A), STR buf\10] ' wait for hdr + ID
NoData: ' <------------------ Jump here if no data received after 1 second
HIGH Enable ' deactivate reader
Pause 500 ' <------------------ Pause for 1/2 second (give things a rest)




Thanks for Posting this will help in a project where i may use a battery pack with a RFID-Reader
I do not know if i would of thought of doing it that way

Sam

·

Billy K
11-21-2006, 12:31 PM
planning on adding a few more features when I get parts.
1. A switch that senses when the door is closed. This way, the RFID reader will only be turned on when it is closed, and the servo will only move into a locked position if it is closed.
2. A pushbutton switch on the inside. This will allow us to lock and unlock the door from the inside of the room without a card when the door is closed. If the door is in an open position and the button is pressed, I plan on adding a feature where if the door is closed within 10 seconds, the door automatically locks behind me.

boeboy
11-23-2006, 04:27 AM
That is·cool have you thought of adding a buzzer so that when it unlocks it will beep?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lets see what this does... KA BOOM (note to self do not cross red and black)

Post Edited (boeboy) : 12/23/2006 2:50:39 PM GMT

jdolecki
11-23-2006, 02:08 PM
You should hook up with this guy!

http://www.hackaday.com/2005/02/11/basic-stamp-controlled-kegerator/

Billy K
11-27-2006, 11:10 AM
Little update. I got a 7.5v 300ma transformer and hooked it up. The voltage jumps from around 11v to 9v as the card reader turns on and off due to the timeout. This caused the stamp to constantly reset itself. To fix this, I added (2) 1000uf electrolytics to the power supply and that fixed the issue, but vin still reads around 10v. Can I add a few resistors in parallel to the transformer to cause the voltage to drop further? Or is there a better soluton? (and would a ~40ohm resistor be best?)

Matt Battle
11-29-2006, 12:26 AM
Have you tried using a voltage regulator?

Billy K
11-29-2006, 01:45 AM
yup, it's on a voltage regulator. a 2940ct.

Sawmiller
12-04-2006, 01:57 AM
you could use a diode to drop a bit of the voltage.

dan