Shop OBEX P1 Docs P2 Docs Learn Events
Basic Stamp and Wiegand — Parallax Forums

Basic Stamp and Wiegand

ChristjChristj Posts: 13
edited 2008-08-18 23:47 in BASIC Stamp
Is BasicStamp (BS2, BS2sx, BS2p) recommended for reading Wiegand data? Any suggestions?

Thanks in advanced.

--chris

Comments

  • SRLMSRLM Posts: 5,045
    edited 2008-08-17 03:36
    Is this what you are talking about?

    http://en.wikipedia.org/wiki/Wiegand_interface

    If so, it looks like you could use a BS2 without much trouble. The voltage is 5 volts, so that is good. The article gives a complete discription of the communication protocol, so it seems like you could just plug and play. Just tell me that you're not using this for nefarious purposes...
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-08-17 04:24
    The pulses are too short (50usec) to be able to catch them all by monitoring two different input lines. What I would do is stretch the "ones" line pulses to about 100usec using a one-shot. Then feed the output of that, along with the "zeroes" line into a NAND gate. What you'd be looking at on the NAND's output are short (0) and long (1) positive-going pulses 2msec from leading edge to leading edge. PBASIC's PULSIN is your friend here. With some clever programming (left as an exercize for the reader), you should be able to keep up with the data rate. If you want to play it safe, go with the faster Stamps.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
  • ChristjChristj Posts: 13
    edited 2008-08-18 11:25
    Can BS2p be recommended for this? Hope I can attach the Stamp's pin to Wiegand's line directly.

    TIA.

    --christj
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-08-18 15:55
    According to the reference cited by SRLM, the Wiegand protocol uses two lines: one for zeroes and one for ones. As I stated above, I don't think you'll be successful monitoring two lines with the Stamp, since the pulses are so short. Better to fold them into one, as I illustrated.

    OTOH, are you hoping to monitor a raw Wiegand device (i.e. magnetic sensor) output directly? That would be a different story altogether.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
  • ChristjChristj Posts: 13
    edited 2008-08-18 16:01
    I want to catch the data (wiegand26 format) sent by RFID reader.

    --christj
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-08-18 16:46
    That's a two-line protocol, so — again — at the very least, you will need some external hardware if you plan to use a Stamp. In your particular system, what are the actual pulse widths and pulse spacings?

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
  • ChristjChristj Posts: 13
    edited 2008-08-18 23:47
    The pulse width 50 uS and 2 ms in between. Any suggestion for one shoot chip to stretch the pulse? Is Timer 555 enough?

    Thanks.

    --chris
Sign In or Register to comment.