RFID Protected mini-fridge
A while back I created a few threads leading up to this project. Now, they culminate into the project log below!
My inspiration: http://revision3.com/systm/rfid
I've wanted to do this many years for the longest time, but i had no idea that there were cheap RFID systems (i was always planning on using mag swipe cards as the cards are free from practically every hotel and the readers are cheap and use serial). The RFID system i use sells fro $50 usually, but earlier this summer, radioshack had a $10 special... that was cheap enough for me to byte!
In the systm episode they use the example of a Beer locker, but since i am not yet 21 (the legal drinking age in the US) this fridge won't be used to store beer. Doing so would be illegal and irresponsible. :
;D
Status: 100% done
Apologies! Yeah, I know I should have taken more pictures along the way, but here is what I've got. I couldn't take too many of them because my hands were always full with stuff. The code I have posted (at the very end of the post) and the schematic I am using is similar to this: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1275369184/3#3
When i started, that schematic was what i planed to use... but i have never made a PCB and didn't want to spend the $ to get one made, i figured that because this project is basic enough, i could just go with a very slimmed down arduino board.
Hardware:
- Arduino mini board - http://www.anatools.com/anarduino-kit/ (ebay)
- Micro servo (ebay)
- Epoxy
- Radio shack project box, lm 7805 regulator
- Mini fridge - $20 craigs list
- Wire, misc mounting hardware
Basically, it's an RFID reader attached to an arduino attached to a servo and power supply. Scan a card, and we'll check it for validity and then open the servo or do nothing.
I've commented the code pretty well, and the Serial.println(“”); statements should clear up the rest of it. If in doubt, just ask me. Also, I am welcome to comments and critique about my coding style. I know there are faster ways to do some things, and there are some things that I really miss from Java that don't work in the arduino environment. Either way, I welcome the feedback .
The Future:
- solid state relay and thermistor + LCD for control of the compressor for fine tuned control over temperature.
- web interface for locking / unlocking / viewing log of logins / admining cards / checking the status of the door (open / closed)
- eeprom + RTC for logging the id used and the time
- your suggestion here!
-- And here's what you've been waiting for! --
Pics!
Powering the Device
The fridge's design has an indoor light and thermostat, so 120V comes to the inside. This made it easy to tap into and add a small cellphone power supply. 120V gets turned into 5V at 800Ma and takes up almost no space. I left plenty of slack in the lines to allow for changing tensions as the door is opened and closed. I haven't done anything to secure the line to the wall as it holds its self pretty well.
The cable is naturally designed to do lots of bending, so i am not too concerned with the door's hinge wearing it out.
- CAPTION -
- CAPTION -
- CAPTION -
- CAPTION -
Locking the device
This was actually the hardest thing to design / develop. What you see here is the far more reliable and compact second revision. Basically, its a micro hobby servo from ebay epoxied to the side of a standard gate lock and i use some 14 gauge wire to tie the servo horn to the gate lock. This design has a few great advantages: The lock can move independently of the servo horn. This allows me to close and lock the door with out the servo opening. IE: if the door locks while it is open, you can still close the door and have it lock with out having to move the servo. This also allows my fail-safe to work; that transparent looking string tied to the gate lock is so 64 pound fishing line that is tied to a washer in the electronics control box. If the power is out, i can still open the fridge by taking off the panel and tugging the string. There is a second fail-safe that i did not mean to build in to the design: the pin (attached to the wall of the fridge) that the latch (attach to the door) lock on can be pulled out with enough force; it is held on my just two screws taped into thin plastic and insulating foam. I had to do this after i disabled the servo and closed the door and my intended fail-safe broke. After fixing the initial flaw with my original fail-safe, i decided to fix this unintended fail-safe by using some very strong epoxy. I do not have any exact numbers, but it should be much harder to yank the pin out now.
- CAPTION -
- CAPTION -
- CAPTION -
- CAPTION -
Making this think
FIRST AND FOREMOST! Sorry for the mess / crappy looking electronics. I am one of those people that has a minimum standard - make it work. The ends justify the means, and viola, you see my quality standards.
As i said above, i am using a cut down version of the arduino that i got off the ebay for cheap. This device is powered by the cellphone power adapter that i mentioned above; a 7805 adapter cleans up the power before i feed it to the RFID antenna, the servo and the controller.
the power lines are covered by the duct-tape, and the controller is secured to the side of the box by duct-tape, there is a bit of slack in the power line, so i've stuffed that into the box as well.. this makes it a bit more cluttered
Really, this stuff is pretty simple. I used a total of 3 data lines on the arduino. 1 drives the servo, 1 enables / disables the rfid tag, and one listens to the serial port on the rfid reader.
- CAPTION -
- I included this so you can see about how thick the door is. You can see how far the servo's wires need to travel to get into the control box. The door is filled entirely with foam, so carving room out for wires is easy. Drilling is also very easy; the only difficulty is the steel door cover. -
- CAPTION -
- CAPTION -
- CAPTION -
- CAPTION -
- The best soda ever. Period. -
Video: