Shop OBEX P1 Docs P2 Docs Learn Events
RFID and Propeller — Parallax Forums

RFID and Propeller

ReiserificKReiserificK Posts: 24
edited 2009-05-30 20:53 in Propeller 1
Note: This post is also in the sensors message board, as I wasn't sure which one to put it in.

Hi everyone, in the fall, I will be going to college, and I would like to make a device to open my dorm room with an RFID tag. I have a few questions. First, can I buy the USB reader from parallax, and hook it up to a propeller protoboard USB with a usb cable, or do i need to buy the TTL version? (I would rather buy the USB, for ease of use connecting it to a computer.) Second, will I have difficulties reading through an inch of wood? Third, if I use a servo to pull the door handle, will it burn out if it stalls for a few seconds when the door handle is in the open position?

Thanks in advance
Reiserifick

P.S. - sorry about the double posting

Comments

  • LeonLeon Posts: 7,620
    edited 2009-05-28 02:48
    Door locks usually use solenoids, not servos.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • WNedWNed Posts: 157
    edited 2009-05-28 14:44
    Hi,
    Good luck in college!
    You shouldn't have to worry about "stalling" the servo. You'd program it to pull the handle to a certain position, then hold it. If it has to fight a bit of resistance while it pulls, that should be OK... say, if you have to jiggle the door to help it unstick now and then. I'm always amazed at how strong standard RC servos are. I'm curious, though. Are you going to leave your door unlocked, and just have the servo activate the door latch? Doesn't sound very secure. Also, you might want to pull the electric lock mechanism from a junked car, and use that. Save you having to program servo travel and hold, etc., just throw a 12vdc relay and slam, it's open / slam, it's closed.
    The data sheet for the RFID has effective distances listed. I don't remember what they are, but I remember being disappointed that they are rather close... the one inch door may be too much. You can look at the sheet on the product page of the Parallax site.
    As for the USB connection, if you don't need the USB port for anything else once the Proto Board is programmed, you can use it for communicating. You just make sure to load your program to EEPROM, then you can shut the board down, install it by the door or where ever, plug in the RFID, and test it.

    Ned

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "They may have computers, and other weapons of mass destruction." - Janet Reno
  • ReiserificKReiserificK Posts: 24
    edited 2009-05-28 17:23
    Leon said...
    Door locks usually use solenoids, not servos.

    Leon

    Yes, however, I should have stated that I can't extensively modify the door.

    Also, the plan is to leave the door locked at all times, and have some mechanism (possibly a servo) pull the door handle from the inside to open the door. The locks on the doors are incorporated into the "handle", meaning no deadbolt, and the doors can always be opened from the inside, regardless of lock state. I read the RFID data sheet, and it stated that sending the DTR line (this is for the USB version) high (or low, cant remember which) would enable the reader. With the Protoboard USB, is the DTR line controllable by the prop? I read it was handled by the Serial-USB circuit, and if this is the case, I wont be able to interface the RFID board easily.
  • WNedWNed Posts: 157
    edited 2009-05-28 18:36
    OK,
    Given the additional info... I think I know the type of door you're talking about. It has a lever type handle, right? And it operates independently of the outside handle. A servo should work with that quite well, but let's face it, you're going to have to drill some mounting holes at the very least. Double sided tape is just not going to handle it.
    Have you already bought the RFID reader?
    If not:
    ... and you only plan to use it with the Propeller, you should probably get the non-USB version.
    ... and you might use it with a PC or a Propeller, you should consider getting the non-USB version. Does the PC you might use it with have a DB9 serial connector? If yes, get the non-USB Reader.
    The reason I go into this is that once you add USB, you end up with some "black box" functionality that takes away some of your flexibility.
    On the Proto board side of it, it doesn't matter whether or not you have USB because you've got 30 other pins to play with for communicating.
    It really looks like the easiest thing to do will be to use a few "normal" pins, not the built in USB on the Proto board, and connect to the RFID reader as if you are making the connection from a stamp.
    ** Be sure you use a limiting resistor ** This means putting a 1k resistor in the RFID Out line to limit the current into the Prop Input. From what I've read in other posts the output from a Prop pin should be sufficient to drive the Enable pin on the reader.
    This is from the RFID PDF:
    http://www.parallax.com/Portals/0/Downloads/docs/prod/audiovis/28140-28340-RFID Reader-v2.1.pdf said...
    The tags
    available in the Parallax store have a read distance of approximately 3 inches. Actual distance may vary
    slightly depending on the size of the transponder tag and environmental conditions of the application.

    So that's good news!

    Ned

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "They may have computers, and other weapons of mass destruction." - Janet Reno
  • ReiserificKReiserificK Posts: 24
    edited 2009-05-28 21:47
    Thanks, WNed,

    Thats exactly correct. Do you have any ideas for actuating the lever handle? I was thinking possibly a continuous rotation servo with an optical encoder turning some sort of pulley, but that could get messed up if someone uses the handle that it is attached to. Also, the plan is to use it with the propeller. If I want to use it later on, I can always use the prop as an intermediary between the RFID reader and the computer, so I think I'll get the TTL RFID board. Any other ideas?
  • WNedWNed Posts: 157
    edited 2009-05-28 22:46
    Well, if you can, use a normal servo because it's easier to give the servo a position and hold it than it is to time its rotation to a given point and try to stop it. Continuous rotation servos are not like motors that you turn on / off. You still make them move by giving them positional information, it's just that the position will make them run forward to seek that position, backward to seek the position, or stop because it thinks it found the position.
    I would try to connect the servo lever to lever. You simply need to set the length of the servo lever just long enough to get the latch to disengage sometime during a, say, 160 degree arc of servo movement. So, if you mount the servo above the door handle, then have an arm extended from the servo angled up, away from the door handle... I'm guessing that the handle is set horizontal, not vertical... So the door handle and the servo arm are on the same plane (the door), but the servo arm is angled up a little. Then put a connecting shaft suspended from the servo arm so that when the servo turns, the shaft pushes down on the door handle. Do not connect the shaft to the door handle, and all you have to do is push the handle down by hand to open the door manually. You will need to put mounting holes in the door for the servo mount and for a guide bracket near the lower end of the connecting shaft to keep it from sliding off of the door handle.
    You program the servo to turn 160 degrees down, wait for a few seconds (unless you want to put a magnetic switch on the door frame to detect door movement), then turn back up to where it was. Done!

    Ned

    The servo angle is too steep, but I'm sure you get the idea.

                      o
                      |\
                      | \
                      |  \
                      |   \
                      |   [noparse][[/noparse]o]  (servo)
                      |     
                      |
                      |
                      -----------O 
                    (door handle)
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "They may have computers, and other weapons of mass destruction." - Janet Reno

    Post Edited (WNed) : 5/28/2009 11:01:23 PM GMT
  • ReiserificKReiserificK Posts: 24
    edited 2009-05-29 01:27
    I like that idea. A standard servo has enough torque to do this?
  • WNedWNed Posts: 157
    edited 2009-05-29 01:38
    Standard servos have a surprising amount of torque. Be sure you have a separate, 6vdc power supply for the servo since it will draw a lot of power when it opens the door and you probably don't want it to reset your Prop every time it does... Be reasonable though, if the lever is hard for you to turn, don't expect the servo to work magic. You should get a servo and start playing with communicating between the Prop and servo over the Summer, then you'll get an idea of how well the servo will handle the, uh, handle. There are several servo objects available on the Propeller Object Exchange.

    Ned

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "They may have computers, and other weapons of mass destruction." - Janet Reno
  • ReiserificKReiserificK Posts: 24
    edited 2009-05-29 02:31
    By separate power source, do you mean on a different wall wart? (As a side note, I've been working on a Prop controlled autonomous E-Maxx truck this year, and I've been running the steering servo off the main logic power, as I haven't gotten around to changing it [noparse]:)[/noparse]. )
  • WNedWNed Posts: 157
    edited 2009-05-29 12:38
    Battery pack, wall wart, whatever... I realize it sounds like a pain, but if you could somehow do a search on "mysterious glitches" in this forum, you'd find about 80% of them end up being servo current draw messing with the processor. I doubt one servo steering a truck is a significant power draw.
    Just be aware of the possibility of servo current draw playing tricks on you.

    Have Fun,
    Ned

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "They may have computers, and other weapons of mass destruction." - Janet Reno
  • ReiserificKReiserificK Posts: 24
    edited 2009-05-30 01:09
    Would it be possible to have some sort of current stabilizing circuit to eliminate the need for two power supplies?
  • localrogerlocalroger Posts: 3,452
    edited 2009-05-30 14:03
    You can wire a large electrolytic capacitor across the output of the prop's voltage regulator (say, 1000 microfarads); should the servo brown out the feed voltage the cap will power the prop through the brownout. You can also do this before the regulator, but then you need to feed the cap and regulator through a diode so that when the brownout occurs the cap won't also be trying to power the servo.
  • ReiserificKReiserificK Posts: 24
    edited 2009-05-30 15:09
    I was thinking something along those lines. Thanks!
  • LeonLeon Posts: 7,620
    edited 2009-05-30 16:00
    Why note power the servo from the unregulated supply? I can power my own Propeller boards from a 6V wall-wart.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • ReiserificKReiserificK Posts: 24
    edited 2009-05-30 16:35
    Do you mean run the servo off the servo power header, but use the Vin setting, rather than 5v? (using a 6v power supply to the prop)
  • localrogerlocalroger Posts: 3,452
    edited 2009-05-30 20:53
    You have to be careful not to overvoltage the servo -- lots of wall warts put out 1.4x or more their rated voltage under light load, and this will burn up the servo. (I got the fried servo to show for it.) Also, if you draw enough current to undervoltage the wall wart, you'll STILL undervoltage the Prop too because you'll undervoltage the regulator input.
Sign In or Register to comment.