Shop OBEX P1 Docs P2 Docs Learn Events
RFID Card reader USB 28340 FALSE READINGS — Parallax Forums

RFID Card reader USB 28340 FALSE READINGS

Please help. My USB reader gives me false reading every minute. Something like "F0000F0000". Its very annoying!
I'm using a Visual Basic Express application and my code below. How can avoid this? its something wrong with the reader or code?

Private Sub DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles myComPort.DataReceived
ComboBox2.Invoke(New myDelegate(AddressOf updateTextBox), New Object() {})

End Sub
Public Delegate Sub myDelegate()
Public Sub updateTextBox()
'Combobox2 invoked
data = data + myComPort.ReadExisting()
If Len(data) = 12 Then
ComboBox2.Text = Microsoft.VisualBasic.Mid(data, 2, 10)

Dim timeOut As DateTimeOffset = Now.AddMilliseconds(1500) ' wait
Do
Application.DoEvents()
Loop Until Now > timeOut
data = myComPort.ReadExisting()
myComPort.DiscardInBuffer()
data = ""
'myComPort.DtrEnable = True

End If
End Sub

Comments

  • The "RF" in RFID is radio frequency and therefore RFID is susceptible to any external interference. It is up to you to place checks in your software to throw out ridicules data that doesn't resemble a valid tag.
  • The "RF" in RFID is radio frequency and therefore RFID is susceptible to any external interference. It is up to you to place checks in your software to throw out ridicules data that doesn't resemble a valid tag.

    I know that but how?
  • As suggested in the Product Guide for the RFID readers, read the tag information two or more times and discard any values that are not the same two or three times in a row. It also can help if you already know the tag IDs you will need to sense. You can keep them in a table in your program or in some kind of external database.
  • This sounds to me more like noise pulses on the virtual RS232 line, which seems unlikely but less unlikely than this being RF interference. I would explore using a timer to clear out received data if it doesn't complete a 12-character packet in a reasonable interval, like 100 milliseconds. I suspect this is due to the reader power-save-cycling the output port into the always-on FTDI serial converter. That would give you one bogus character each time it happens, and never in the middle of a transmitted packet.
  • "This sounds to me more like noise pulses on the virtual RS232 line, which seems unlikely but less unlikely than this being RF interference" ... You might be surprised. An early implementation we had on our garage door at home would Chime when a potential "valid" tag was detected. A valid tag constituted then the parity matched between the rows and columns of the received data. The garage door would only trigger if the tag ID matched to one in the database, but it would chime on ANY tag that matched parity. Random chimes happened all the time until I modified the code. The reader was the "Joe Grand Parallax special" Serial RFID reader... So yes random RF noise can trigger the reader. You just have to write the software so that it only compares against a known database for proper ID's.
Sign In or Register to comment.