RFID Wiegand issue with newer Builds after 03_2018

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
laserrichi
New user
Posts: 3
Joined: 05 Apr 2019, 18:23

RFID Wiegand issue with newer Builds after 03_2018

#1 Post by laserrichi » 05 Apr 2019, 18:39

Hi,
i have an issue with Wiegand Reader that i use.
It works with ESPEasy Build Versions from March 2018. But not real 100% stable but it works after second Code input.

Newer Builds works very bad or not. The latest Builds with Core 2.41 2.42 or 2.60 are very bad.

I can rule out hardware errors, and I measured the timings with an Oscilloscope, the Input levels of 5V and Levelshifter to 3.3V are perfect.

laserrichi
New user
Posts: 3
Joined: 05 Apr 2019, 18:23

Re: RFID Wiegand issue with newer Builds after 03_2018

#2 Post by laserrichi » 07 May 2019, 17:15

no any idea ? I think it is Timing, newer Versions of espeasy have many more features, and the sampling rate of the input ports are lower ?

If i Debug the reader Messages i see:
EspEasy: RFID : reset bits: 50 (bits are different if not work)

and if its work i see
EspEasy: RFID : Tag: 4566 Bits: 26

My Reader send wiegand with 26Bits

ChrisX
New user
Posts: 2
Joined: 04 Jun 2019, 07:33

Re: RFID Wiegand issue with newer Builds after 03_2018

#3 Post by ChrisX » 04 Jun 2019, 07:45

hm i also have problems .. i get no Tags ... You have a old version to flash?

laserrichi
New user
Posts: 3
Joined: 05 Apr 2019, 18:23

Re: RFID Wiegand issue with newer Builds after 03_2018

#4 Post by laserrichi » 12 Aug 2019, 21:37

i use this Version https://github.com/letscontrolit/ESPEas ... a-20180319
Not tested the latest versions, with different cores.
which card reader are you using?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: RFID Wiegand issue with newer Builds after 03_2018

#5 Post by TD-er » 13 Aug 2019, 00:04

If you're having reports like these, you better create an issue for it on GitHub.
I made one for this issue: https://github.com/letscontrolit/ESPEasy/issues/2544

3dalex07
Normal user
Posts: 16
Joined: 24 Oct 2022, 15:30

Re: RFID Wiegand issue with newer Builds after 03_2018

#6 Post by 3dalex07 » 15 Nov 2022, 09:38

It is posible in plugin 8 (wiegand) to add some timeout for key reading ?
if key readet ok ignoge data from wiegand interface for 1 sec or more

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: RFID Wiegand issue with newer Builds after 03_2018

#7 Post by Ath » 15 Nov 2022, 10:40

3dalex07 wrote: 15 Nov 2022, 09:38 It is posible in plugin 8 (wiegand) to add some timeout for key reading ?
if key readet ok ignoge data from wiegand interface for 1 sec or more
Can you create an issue on Github, so it won't be forgotten? You will need a (free) Github account to be able to create issues. Please also link your post from here in the issue.
/Ton (PayPal.me)


alfiriel
New user
Posts: 4
Joined: 13 Apr 2023, 09:32

Re: RFID Wiegand issue with newer Builds after 03_2018

#9 Post by alfiriel » 13 Apr 2023, 09:55

Hello,
I have also Problems with ESP32 and Wiegand.
Seems the problems appear only with long cable.

I used two different Wiegand26 Readers for every test, with both readers I have the same results:
Aliexpress Link 1st Reader
Aliexpress Link 2nd Reader

My Setup
  • Connected GPIO032 directly to Wiegand D1 (white) (without power shift)
  • Connected GPIO012 directly to Wiegand D0 (green) (without power shift)
  • ESP32 Powered with USB cable 5V
  • Wiegand Reader powered with own 12 V power supply
Everything worked fine on my desk. I received the numbers I entered as well as the tag numbers.

Problem:
As soon as I switched to the real installation, it was not longer working. I got the mentioned "RFID : reset bits: nn" mesages in the ESP log.
Tested back on my desk everything worked fine.

What I have testet:
  • put long cable (5 meters) between ESP and Wiegand Reader -> not working, received only "RFID : reset bits: nn" mesages in the ESP log
  • put short cable (30 centimeter) between ESP and Wiegand Reader -> everything fine
  • tried to plug a resistor of 10 ohm between ESP GPIOs and LONG cable -> not working, received only "RFID : reset bits: nn" mesages in the ESP log
  • with resistor of 10 ohm between ESP GPIOs and SHORT cable -> everything fine
Next step I will test a Build before 03_2018. Maybe this will work.
Can anyone help with this issue? Do you need more information from my side?

Thank you and reagards.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: RFID Wiegand issue with newer Builds after 03_2018

#10 Post by TD-er » 13 Apr 2023, 10:10

Can you test with some twisted pair cable?
For example D0 & GND twisted and D1 & GND twisted

Placing a resistor in series with the data lines can also be a good idea to prevent 'ringing'.
However I am not sure about its best value.
Just as an indication, the Espressif datasheet mentions 500 Ohms as series resistor for the serial pins and I think the signal frequency of these is somewhat in the same ball-park.

alfiriel
New user
Posts: 4
Joined: 13 Apr 2023, 09:32

Re: RFID Wiegand issue with newer Builds after 03_2018

#11 Post by alfiriel » 13 Apr 2023, 10:44

TD-er wrote: 13 Apr 2023, 10:10 Can you test with some twisted pair cable?
For example D0 & GND twisted and D1 & GND twisted

Placing a resistor in series with the data lines can also be a good idea to prevent 'ringing'.
However I am not sure about its best value.
Just as an indication, the Espressif datasheet mentions 500 Ohms as series resistor for the serial pins and I think the signal frequency of these is somewhat in the same ball-park.

Hello,
I just found out that the cable lengh is not the problem itself.
For t esting, I flashed an ESP8266 with firmware: ESP_Easy_mega-20180319_normal_ESP8266_4096.bin
And its working fine! With short and long cable!
(only tag working, no number input but I think this feature was added after this firmware version)

You mentioned a resistor within the data lines. Haven't I done that?
PIN - Restistor - 5 m cable - WiegandReader
Or did you meant something else?

Will flash the ESP8266 with the latest firmware now. Just to exclude the ESP as the problem.

Regards

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: RFID Wiegand issue with newer Builds after 03_2018

#12 Post by TD-er » 13 Apr 2023, 11:13

If it is working with the long cable on an older ESPEasy build, then it is less likely you're experiencing noise interference.

You mentioned a 10 Ohm resistor in series, which might be a good fit.
Too bad the best value for such a resistor is often only determined by testing, since this value also depends on the capacitance of the cable.
To be honest, I have no idea what order of resistance should be a proper value to test, but I do remember the suggested value by Espressif for the serial port, which is 500 Ohm. As that's quite a different value from the 10 Ohm you mentioned, it could perhaps make a difference here.

We may need to check the plugin code to see what has changed in the past 5 years :)
Problem is, since 2018 also the SDK has changed quite a lot.
So it might very well be that the old SDK also did something like enabling pull-up resistors


Anyway, what also really is problematic with your ESP32 wiring is that you're using GPIO-12.
You should absolutely NOT use that pin for anything that might pull that pin to some level during boot.
The state of that pin during boot determines the voltage supplied to the flash chip.
If you're lucky the ESP will only become unstable due to low voltage. If you're unlucky, you may fry the flash chip.

Also GPIO-12 thus has some pull-up or -down resistor present on the pin to enforce the correct pin state at boot.

alfiriel
New user
Posts: 4
Joined: 13 Apr 2023, 09:32

Re: RFID Wiegand issue with newer Builds after 03_2018

#13 Post by alfiriel » 13 Apr 2023, 12:27

Hello,
thank you for your long reply.
I will "solve" my problem now by adding the ESP in a mounting box directly next to the wiegand reader.
The inputs will be transferred by the ESP via MQTT to my server.
So I cannot see higher security risks if the ESP is mounted outside the building.

Thank you for your help anyways!

alfiriel
New user
Posts: 4
Joined: 13 Apr 2023, 09:32

Re: RFID Wiegand issue with newer Builds after 03_2018

#14 Post by alfiriel » 13 Apr 2023, 12:32

TD-er wrote: 13 Apr 2023, 11:13 [...]
Anyway, what also really is problematic with your ESP32 wiring is that you're using GPIO-12.
You should absolutely NOT use that pin for anything that might pull that pin to some level during boot.
The state of that pin during boot determines the voltage supplied to the flash chip.
If you're lucky the ESP will only become unstable due to low voltage. If you're unlucky, you may fry the flash chip.

Also GPIO-12 thus has some pull-up or -down resistor present on the pin to enforce the correct pin state at boot.
[...]
And thank you for this note! I am really new in the ESP business, this is my first project. So I thought I can use any pin.
I use this Pin Chart and though all light green pins can be used anytime.

Regards

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: RFID Wiegand issue with newer Builds after 03_2018

#15 Post by Ath » 13 Apr 2023, 12:37

/Ton (PayPal.me)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: RFID Wiegand issue with newer Builds after 03_2018

#16 Post by TD-er » 13 Apr 2023, 12:37

Here another reference from some 'random' site :)
https://espeasy.readthedocs.io/en/lates ... e-on-esp32
N.B. the links on there are also useful.

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests