Shop OBEX P1 Docs P2 Docs Learn Events
serial to wiegand — Parallax Forums

serial to wiegand

stefstef Posts: 173
edited 2010-10-17 03:22 in Propeller 1
Hi all

I Have back again the same problem. I'm using an access controle system that has the only interface possability as wiegand. I now want to interconnect my numberplate recognition server to that access controle system. So I can use the car numberplate as badge number. I convert the numberplate's on the server to ascII value. So I need to have a serial to wiegand converter that is converting 20 numbers (serial send) to a wiegand interface 80 bit.
I was thinking of the propeller. I used him now in a lot of project and the serial side is no problem. The wiegand side is a bit more tricky. Is thier sombody already having any experiance with it? Is it possible. Are thier examples (soft and hardware)?
I realy would apreciate any help. I think wiegand would be a nice ad on to the OBEX.

Thanks in advance

Stef

Comments

  • kwinnkwinn Posts: 8,697
    edited 2010-10-15 09:26
    Stef, I googled weigand interface and read the info at "http://en.wikipedia.org/wiki/Wiegand_interface". The electrical interface and protocol should be possible using the prop. The problem may be with the data protocol. Much more information is needed.

    Your description (20 digits to 80 bits) had me thinking of a packet consisting of 20 x 4 bcd digits while wikipedia says "The original Wiegand format had one 1 parity bit, 8 bits of facility code, 16 bits of ID code, and a trailing parity bit for a total of 26 bits."

    A complete description of the protocol would be needed, as well as the access method (swipe card, rfid, etc.).
  • kwinnkwinn Posts: 8,697
    edited 2010-10-15 09:55
    After reading your post more carefully it sounds like you already have the license plate reader and server set up and you want to convert the license plate number from ascii to the wiegand format and send it to the wiegand hardware as per the attached block diagram.

    Is this what you want to do ?
  • ColeyColey Posts: 1,110
    edited 2010-10-15 10:11
    Hi Stef.
    This should be relatively easy for you to implement.
    We have just developed a smart Wiegand splitter (1 Reader input to 8 outputs) that works with 26 to 64 bits of Wiegand data.
    All of the code was developed in PropBASIC.
    As the board is a commercial product I won't be releasing the source but I will write a simple output routine for you to experiment with.

    attachment.php?attachmentid=74465&stc=1&d=1287162542
    Features:-

    1 No. Weigand Data Input Port
    8 No. Opto Isolated Wiegand Data Output Ports
    1 No. RS485 Serial Transceiver
    1 No. Micro SD Card Slot

    Operating voltage 9-14V DC


    Regards,

    Coley
    846 x 690 - 280K
  • ColeyColey Posts: 1,110
    edited 2010-10-15 10:20
    Here is an app note that will help you too....
  • ColeyColey Posts: 1,110
    edited 2010-10-15 12:04
    Here is some code in PropBASIC.

    It outputs a 32 bit Wiegand data stream on P0 and P1 every second.

    It should be simple to expand it to do more bits.

    You should also make sure that the Wiegand circuit is driven via either a darlington array or an opto isolator, don't connect the Prop directly to the Wiegand interface without some form of current limitation.

    Regards,

    Coley
  • stefstef Posts: 173
    edited 2010-10-15 14:29
    Hi Kwinn and coley

    Kwinn : Yes that is exactly what i try to do.

    Coley : Thanks for the information. I want to make it in spin. That will be easier for me because I already dit some small project in it. What do you sugest for opto isolator circuit? I read dat you have a commercial board. I'm working for a large company that is doing system integration and access controle systems. are you interested to sell such a board? I was looking to make it myself but by lack of time I can/will buy it if possible. Our access contole system can handel any wiegand card format until 80 bit. Also the normal 37 bit and 26 bit. You can understand that converting numberplates to ascii Value is creating large numbers. it is nessacery because wiegand can only handel numbers. I'm very interested in making it as a callange but I have not mutch experiance in curcuit boards. That is why I 'm not sure how to connect the wiegand lines to the propeller.
    So any help is welcome.

    I like this forum very mutch. Everyone is very helpfull and I already learned a lot buy just reading the posts. Keep it all up.

    stef
  • LawsonLawson Posts: 870
    edited 2010-10-15 15:00
    As far as isolation goes the Analog Icouplers with power would be a nice "Mercedes" solution. 2-channel with power (haven't had need for one ... yet!)

    Lawson
  • kwinnkwinn Posts: 8,697
    edited 2010-10-15 16:18
    Stef, I think your best bet would be to buy a board from Coley but if you did want to make your own you could use one of these (H11L1M, H11L2M, H11L3M). They are more than fast enough based on the app note timing description.
  • stefstef Posts: 173
    edited 2010-10-16 02:50
    Hi Kwinn

    Thanks for the part numbers. I looked at it and even I'm not an electronic nerd I'm going to try to hook up some to my propeller. I orderd H11L2M. They where on stock at the local store. Have you perhaps a simple schematic on how to place the resistors so I don't damage the propeller?
    If this is working fine I like to know also how to read wiegand. Can I use the same part to isolate the wiegand from the propeller. Is input more dificult as output?? Hase someone also an litle example where I can start from to read the input. I based my output on the example of coley (Thanks again for his help).

    stef
  • ColeyColey Posts: 1,110
    edited 2010-10-16 03:55
    stef, I have sent you a PM.

    Regards,

    Coley
  • stefstef Posts: 173
    edited 2010-10-16 04:38
    Thanks coley

    I sended you a PM reply back.

    Stef
  • kwinnkwinn Posts: 8,697
    edited 2010-10-16 10:38
    Stef, the attached schematic should work. Be sure to read note 1 before proceeding.

    I am basing this on the info I found on the web and what Coley posted. I have not worked on the weigand systems, so I am not an expert. Perhaps Coley can take a look at it for you.
  • stefstef Posts: 173
    edited 2010-10-16 14:24
    Hi Kwin

    Thanks for the schematic. Now I 'm a bit confused. Wy is P0,P1,P2 and P3 used. I thouth it was don only wit P0 and P1. So just only two pins.

    stef
  • kwinnkwinn Posts: 8,697
    edited 2010-10-16 21:21
    No reason you could not do it with just 2 pins. You would have to switch them between inputs and outputs for reading and writing. As I said, I am not an expert on the weigand systems. Is this a bus with multiple devices on it or just a connection between 2 devices such as a card reader and a lock?
  • ColeyColey Posts: 1,110
    edited 2010-10-17 01:18
    stef,

    Here is the optocoupler circuit I used on my board.
    Each of the 8 output ports is optically isolated (power and data) from the Propeller and each of the other 7 ports.
    Each port has an operating voltage range of 5 - 14 VDC so that covers most if not all access control systems.
    Each port is powered by the host access control system so there are 4 connections, +V, 0V, Data_0 and Data_1.
    The optocoupler I used is ISD5X, it has transistorised outputs making it ideal to drive the Data lines down to 0V.

    attachment.php?attachmentid=74495&stc=1&d=1287303374

    I hope this helps.....


    Regards,

    Coley
    841 x 530 - 8K
  • stefstef Posts: 173
    edited 2010-10-17 02:18
    Hi

    Ok know i think I follow. In the first schematic (from kwinn) P0 an P1 are input and p2,p3 are output. If I don't need input (for the first project) I can leave out P0,P1.

    In the second schematic (from coley) P8 and P9 are output.

    Right??

    Coley. In your schematic what is the purpos of r1 and ch1? Is it just for indecating thier is power on the reader?? i think. Otherwise correct me.
    Is thier a way to indicate data traveling on D0 or D1 without using an other output of the propeller with an LED on it and solving it by software routine.?

    Thanks for your reactions. This helps a lot.

    Stef
  • stefstef Posts: 173
    edited 2010-10-17 02:21
    HI forgotten this.

    So if it is done by a optocoupler, is a 4N25 also usable?

    Stef
  • ColeyColey Posts: 1,110
    edited 2010-10-17 03:22
    stef,


    yes R1 and CH1 are just to indicate that the Wiegand port is active.
    You may also find that R2 and R4 are not required as there are likely to be pullups already installed on the access control system pcb.
    You could add LED's to that circuit but you would have to check that there isn't too much current drawn through the output pins.
    I'm not familiar with 4N25 optocoupler but a quick look at the datasheet says it is quick enough for this application so it's worth a try.

    Regards,

    Coley
Sign In or Register to comment.