I have Wiegand 26bit bus.

  • DATA0 - GND = ~12.5V when idle
  • DATA1 - GND = ~12.5V when idle

I need some sort of scheme or something to convert 12V signal to 5V without interfere.

I have few thoughts:

  • Optocoupler. Will the R1 and LED interfere a lot?

    enter image description here

  • MOSFET. What would be the scheme?

  • MAX232 chip. a bit difficult at the moment to test

Please suggest something for this case. enter image description here


The scheme of EM Fields does work. But i have one more problem. There are 2 RFID readers connected in parallel. One is newer version than the other. They are configured to give Wiegand 26bit output.

1 parity bit + 8 bit site code + 16 bit card number + 1 parity bit = 26 bit

When i tried to read i received this

enter image description here

Card number is 140,2193

binary 1 10001100 0000100010010001 1, but i noticed that the older one gives extra 0(marked with red dots) after 1. That means DATA0 line is triggered to low after every 1. Security system reads card correct. What could cause the line go low?

  • \$\begingroup\$ Does the signal go down to ground when sending a 0? \$\endgroup\$ – Ignacio Vazquez-Abrams Jun 26 '15 at 16:14
  • \$\begingroup\$ Usually Wiegand is 5V, but this case its 12V. When a 0 is sent the DATA0 wire is pulled to a low voltage while the DATA1 wire stays at a high voltage. When a 1 is sent the DATA1 wire is pulled to a low voltage while DATA0 stays at a high voltage. \$\endgroup\$ – Martynas Jun 26 '15 at 16:19
  • \$\begingroup\$ A resistor potential divider would probably work but, like @ignacio said, what voltage represents logic 0 (please don't just say "low"). \$\endgroup\$ – Andy aka Jun 26 '15 at 16:19
  • \$\begingroup\$ If i connect Arduino in parallel, internal diodes of Ardtuino chip chops the voltage to ~5V, and Device A sometimes do not read the data... \$\endgroup\$ – Martynas Jun 26 '15 at 16:21
  • \$\begingroup\$ Thats the case, i have no osciloscope... and with multimeter i can measure nothing. And LOW i would guess 0V \$\endgroup\$ – Martynas Jun 26 '15 at 16:23

Use a couple of voltage comparators as shown below and select them for the speed you need.

R1 and R2 are used in conjunction with R5 and R6 to generate the hysteresis which will insure clean transitions at the comparator outputs, R3 and R4 are used to generate a 6 volt reference (the input switching point) for U1A and U1B, and R7 and R8 are pullups to 5V for the open collector outputs of the comparators.

enter image description here

  • \$\begingroup\$ This is basically what Ignacio said, but more in detail. This helps more :) I stuck here, so thanks for details. For the comparator LM393 will do the job? \$\endgroup\$ – Martynas Jun 26 '15 at 16:55
  • \$\begingroup\$ The LM393 might work, it depend on the how fast your data lines switch. Got some numbers? \$\endgroup\$ – EM Fields Jun 26 '15 at 16:58
  • \$\begingroup\$ I would guess pulse interval time between 200 uS and 20 mS \$\endgroup\$ – Martynas Jun 26 '15 at 17:00
  • \$\begingroup\$ @Martynas: It's a little different, because this answer can handle the case where both lines may be the same voltage whereas mine ignores that case. I haven't checked if it matters for Wiegand transmission. EDIT: It does matter, so ignore my answer. \$\endgroup\$ – Ignacio Vazquez-Abrams Jun 26 '15 at 17:00
  • \$\begingroup\$ Response Time of LM393 is 1.3 μs. From ti.com/lit/ds/symlink/lm193-n.pdf datasheet \$\endgroup\$ – Martynas Jun 26 '15 at 17:02

Regarding the erroneous results.

Seems you have crosstalk between data lines: switching noise from one data line triggers receiver of another data line.

The Solution is simple: try to lower the triggering level in the receiver circuit (decrease resistance of R4 resistor in EM Fields circuit) until the errors are gone.

  • \$\begingroup\$ Exactly Valdas :) Easy answer when you solved it in site :) \$\endgroup\$ – Martynas Jun 30 '15 at 16:21

Sounds like you need a level shifter or translator. Is this bi-directional?

Start here: http://www.digikey.com/product-search/en/integrated-circuits-ics/logic-translators

Since you are unidirectional a level shifter will work. I don't know you speed requirements or if you can handle a propagation delay, but this could likely work:


I know it has 6 circuits... I guess you'll just have to add more logic to use them :-)

Hope that helps!

  • \$\begingroup\$ No its not bidirectional. I need just to read \$\endgroup\$ – Martynas Jun 26 '15 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.