Thursday, February 25, 2010

RFID Operated Door

Ever wanted a door to open using an RFID tag? I did. So I made it happen.

So how does it work? How about a few pictures:

(Mostly) overall view

A view of RFID reader board taped to the door

Yes, I did attempt to tape a computer supply to my door. It failed as you can see.

The motor and the bracket it is attached to.

Front view of the motor mount, with the belt attached. The motor is a no-name brand motor I found for cheap on Ebay. I searched "12v high torque motor" and bought a 60rpm model. Most of the ones I looked at came with a mechanical drawing of the mounting holes, so I used that to design the bracket.

The door knob with the belt attached, and the controller board. The three buttons are for motor up, motor down, and auto-open. I use the up/down buttons to adjust the position of the motor, and the auto-open to automatically open the door from the inside. There is also an LED on there which lights when a card is read.

For the RFID reader board, I am using an ID-20 RFID reader (available here). The chip is pretty easy to use, just give it power and swipe a readable card and it outputs the data from it. The range is also pretty good: it reads about 2cm away, through the door.

To read the data and run the motor, I am using a Freescale HCS08QG8 micro-controller, which is what I had on hand. It is the 16 pin model, so I had plenty of pins to play with. I also bought a few relays to switch on the motor power using the micro-controller.

For fun, I wired a tri-color LED to sit in the peep-hole for the door.

The LED glows blue all the time...

...until a valid card is swiped, which turns the LED green. It (should) turn red for an invalid card, but I don't have any to try it with.

The schematic for the entire circuit.

To connect the LED and auxiliary board, I am using Cat5, since it cheap and has 8 conductors. I am using some generic wire I had lying around for the motor.

Things to note about the circuit:
The way I wired the relays allows the micro-controller to switch on and off the power, and switch the direction of the motor. I am using transistors to activate the coils in the relays, because the micro-controller can not put out enough power.

For the pull-ups shown for the buttons, I intended to use the pull-ups built into the chip. For the first day I had it setup like that, but I was woken up at 6am by my door opening it self. I later found out it was most likely caused by interference. The Freescale chip is known for having weak pull-ups, especially for wires over 6 inches. Basically, the wires running to the auxiliary board were acting like antennas. I added external pull-ups and turned off the internal ones, and haven't had a problem yet.

Overall I'm happy with the system. I haven't used my keys in over a week, and it's quite nice. I am also glad to see I could do this without making permanent modifications to the door. I am looking into designing a coil for the reader, and I'll post about that if it happens!

So what do you think? Any other pictures or info you want?

Sunday, January 31, 2010

Learning Guitar, Day 26 & 27

Took a break for the last two days, mostly because I've been pretty busy, but partially to just take a break. I'll pick it back up tomorrow.

Saturday, January 30, 2010

Learning Guitar, Day 25

Another quickish day today.

Stumbleupon gave me a link to a site explaining a spanish guitar scale. I gave it a try, and it sounds pretty good. It is based on the first four frets and some of the open strings so it is pretty stretchy, but I like the sound of it. I may try throwing in some of those notes when improvising, whenever I start doing that.

C chord still sucks. Not much more I can say about that really.

I'm thinking I should start practicing my scales with a metronome soon. I am starting to understand the benefits of using a metronome, even as boring as it is. It really does become muscle memory because I do it so many times.

Thursday, January 28, 2010

Learning Guitar, Day 24

So I did manage to get in all of my exercises today. I reviewed my chords, and did more practice with my scale exercises.

C chord really sucks now. G chord is cake, and C chord is torture. I still have to consciously think of how to place my hand, and even then half the time I mute strings, or the B string buzzes. Gah...

I did manage to learn to play the main part of Tisbury Lane, and I can even play it the way it was meant to be played. When I first tried a few days ago, it didn't feel right, like a note or something was missing. After going through it again, I realized I needed to mute the two-string chords some of the times I play them. I gave that a try, and it sounded exactly correct. I watched a bunch of youtube videos of people playing this song, and I learned a lot, including how to play the last three notes without moving my hand, and the correct way to mute the strings. I can't play the song very fast, but it sounds good!

More tomorrow!

Monday, January 25, 2010

Learning Guitar, Day 23

Today was a pretty quick practice. I went over my chords, and found G and C to be about equal in difficulty now. I didn't have enough time to do chord changing practice, but I did do some scales. I had the same problems as yesterday, but my hand was a lot less tired today.

Tomorrow I will make sure to get all of my practice exercises in.

Learning Guitar, Day 22

So I only just noticed my day numbers are off somehow. Oh well...

I started today by immediately trying out the C and G chords, and I had a major reversal in difficulty. Suddenly I could play the G chord almost all the time, and the C chord was annoyingly hard. I re-watched the video for it, and was able to play it, but it still didn't feel quite right.

I tried the one minute changes again:
C-Am: 26
C-A: 18
C-G: 18
G-E: 27
G-D: 28
My sudden understanding of G showed with this exercise. And my failure at C showed too, especially with the C-G change. Every time I played the C chord, it sounded too tinny (like one string was buzzing). I think I need to work on that more...

My scales are becoming a little easier, but I still don't feel like I can stretch as far as I would like. My biggest problems right now are making sure to press hard enough with my ring finger and pinkie, and pulling off my pinkie fast enough to not get annoying buzzing. Picking the right string is also getting annoying.

I'm actually getting more exciting about playing, since many songs use the C and G chords, so I'm finding I can play much more than before. I also found myself strumming random chords today, and enjoying it. It was a weird feeling, but I definitely liked it. More to come? :)

Sunday, January 24, 2010

Learning Guitar, Day 21

Finally started some new material today!

I started with the G and C chords. G sucks. There is no other way to put it. It just sucks. It took me around 25 times to get it to all sound correctly. No matter what I did, it didn't sound correct. I would put down my first and second fingers, but then my ring finger would push the string off the neck. If I focused on my ring finger, my first two fingers would mute the strings below them. Eventually I got it to sound ok, and then the next time it was crappy again. I gave up for a bit and went on to try the C chord.

C was much easier for me. It took less time for me to get it to sound good. Apparently I'm supposed to mute the thickest string with my ring finger. I'm focusing right now on just getting the chord right and I'll work on the muting later.

I went back to G, and I got it to sound ok, but more failures followed. I slowly discovered that if I angle my hand a little bit, all the strings sound fine. It took a little practice to remember to do that though.

I then tried out the recommended 1 minute chord changes:
C-Am: 23
C-A: 16
C-G: 11
G-E: 16
G-D: 12
The first change was very simple, just moving my ring finger over. It took a little tweaking of my middle finger to get it sounding good though. For the C-A change, for some reason I find A difficult to form when I don't start with my index finger, which is why I got so few in there. C-G was probably the most annoying change I have ever done. G-E was pretty easy, I just need to practice going back to G. And for G-D, I blanked out a bit on what a D chord should look and sound like. Muscle memory put my fingers in the right place, but it was a weird feeling.

I took a break after doing those, and later came back to do some scales. I started with a finger exercise where I start on the 5th fret, thickest string, and go through all my fingers, then down a string and repeat. It doesn't sound too pretty, but it is a great exercise. I then tried out the Am pentatonic scale, which sounds nice but is less work.

I found myself struggling to get my fingers in good spots on the frets for the exercise, so I started forcing them where I wanted them with my right hand. I also struggled going back down the scale, since moving up a string requires putting down all my fingers to start. In the end I could play both scales ok, but not at any great speed (of course).

I then started messing around with stretching out my hand. I'm finding it amazing how fast I can adapt to things. For fun I tried starting with my index finger on the 4th fret, then middle on the 6th, ring on the 7th, and pinkie on the 8th. It hurt, and I had to force my fingers there with the other hand. I did it a couple times, taking a quick break for my hand in between each. After ~10 tries, I could do it without the help of my right hand. A few more times and it stopped hurting as much. Scary, right?

I then tried stretching out across 6 frets, 4th, 6th, 7th, 9th. I could do it, but it hurt even more. I decided to stop, but I think it's something to look into later.

Today was a success. I learned a bunch, and even got some finger exercise in. And by practicing the blues scale, I am one step closer to playing the blues! :)