Proximity help?

Hello! I just got my first proximity card reader today, and I have absolutely no clue how to hook it up. It's a HID ProxPoint 6005. Here are the pins:

Red- 5-16 Volts dc
Black- ground
Green- data0/data
White- data1/clock
Drain- shield ground
Orange- green led
Brown- red led
Yellow- beep control
Blue- hold
Violet- card present

If someone could please help me set this up with my Arduino, that would be great! I don't have a card because I lost it. I'll try to find it soon.

Thanks,
-Soapy29

The data pins are either data0 and data1 for Weigand output or a data an clock pin which will work like an SPI bus master.

Weigand pulses the data0 pin for a 0 bit and the data1 pin for a 1 bit.

The other format you are probably supposed to sample the data line on the falling or rising edge of the clock line pulses. The easiest way to read it is to hook the clock line to an interrupt pin and sample the data line in the ISR.

I'm a noob. I barely got what you said.

Oh. I've seen people plug a wire strait into the tx port before. So would I tie the data0 and data1 together?

Soapy29:
Oh. I've seen people plug a wire strait into the tx port before. So would I tie the data0 and data1 together?

No. That will not work.

So I take data0, plug that into dig3, and take data1, and plug that into dig4, right? Then what. Oh and if I apply power to it, and I scn a card, the light turns green and beeps.

Not sure what you mean by 'dig3' and 'dig4'.

Read up on interrupts: http://www.arduino.cc/en/Reference/AttachInterrupt

Figure out which model you got (Weigand or data&clock). If you make a guess and get it wrong, nothing will work. Google found me a manual for the "HID ProxPoint Plus 6005" and it indicated that the model number was slightly different for the two protocols.

I think it's a weigand because on the green wire it says data0/data, and on the white wire it says data1/clock. What are the difference? And dig3 it digital 3 on the Arduino. Oh, thanks for the replies.

Does you unit have any model number information on it?

Let's see... Where's my camera...

Ah. These pictures are of all for corners of the device. Can you get anything out of them?




OK. The 6006B2B00 makes me think that you do have the Weigand model.

Connect 'data0' to pin 2 (interrupt 0) and 'data1' to pin 3 (interrupt 1).

volatile unsigned long tagID = 0;
volatile int bitCount = 0;

void ISRone(void)
{
  bitCount++;
  tagID <<= 1;
  tagID |= 1;
}

void ISRzero(void)
{
  bitCount++;
  tagID <<= 1;
}

void setup()
{
  Serial.begin(57600);

  pinMode(2, INPUT);
  digitalWrite(2, HIGH);  // Enable pull-up resistor
  attachInterrupt(0, ISRzero, FALLING);

  pinMode(3, INPUT);
  digitalWrite(3, HIGH);  // Enable pull-up resistor
  attachInterrupt(1, ISRone,  FALLING);

  tagID = 0;
  bitCount = 0;
}

void loop()
{
  if(bitCount >= 26)
    {
    Serial.println(tagID, HEX);
    tagID = 0;
    bitCount = 0;
  }
}

Alright. The serial port is all random. No two codes are alike. But it reads them. Now what?

But if you scan the card and hit reset, it has the same code every time.

Could be the code is not 26 bits. Try this version:

volatile unsigned long tagID = 0;
volatile unsigned long lastBitArrivalTime;
volatile int bitCount = 0;

void ISRone(void)
{
  lastBitArrivalTime = millis();
  bitCount++;
  tagID <<= 1;
  tagID |= 1;
}

void ISRzero(void)
{
  lastBitArrivalTime = millis();
  bitCount++;
  tagID <<= 1;
}

void setup()
{
  Serial.begin(57600);

  pinMode(2, INPUT);
  digitalWrite(2, HIGH);  // Enable pull-up resistor
  attachInterrupt(0, ISRzero, FALLING);

  pinMode(3, INPUT);
  digitalWrite(3, HIGH);  // Enable pull-up resistor
  attachInterrupt(1, ISRone,  FALLING);

  tagID = 0;
  bitCount = 0;
}

void loop()
{
  //  See if it has been more than 1/4 second since the last bit arrived
  if(bitCount > 0 && millis() - lastBitArrivalTime >  250)
    {
    Serial.print(bitCount, DEC);
    Serial.print(" bits: ");
    Serial.println(tagID, HEX);
    tagID = 0;
    bitCount = 0;
  }
}

It also be me using power via USB. I'll try an altronix 12v power supply. My dad who works for VTI security suggested that.

I'm wrong. The code works, but how do I simplify it so a noob like me can add some stuff?

Like how would I make it say something like

if (tagID==tag code here){
Serial.print("Accepted");
do something else here;
}
else{
Serial.print("Denied")
}

etc

Oh and it's 37 bits.

Soapy29:
Oh and it's 37 bits.

The unsigned long is only going to hold the last 32 bits of the 37-bit value. That should probably still be enough to uniquely identify each tag.

Well the if statement I posted above didn't work. How do I find only one tag?