Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use Weigand Keypad: Examples, Pinouts, and Specs

Image of Weigand KeypadDesign with Weigand Keypad in Cirkit Designer

Introduction

Explore Projects Built with Weigand Keypad

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Arduino UNO Controlled Security System with LCD Feedback and Keypad Entry: A project utilizing Weigand Keypad in a practical application
Arduino UNO Controlled Security System with LCD Feedback and Keypad Entry

This circuit is designed as a security keypad system with a relay-controlled alarm or lock mechanism. An Arduino UNO serves as the central controller, interfacing with a membrane matrix keypad for code input and an I2C LCD screen for user feedback. If the correct code is entered, the system toggles between armed and disarmed states; an incorrect code triggers the relay to activate a connected bulb (representing an alarm or lock) for a predetermined duration.

Open Project in Cirkit Designer

Technical Specifications

Pin Configuration and Descriptions

Below is a typical pinout for a Weigand keypad. Note that pin configurations may vary slightly depending on the manufacturer.

Pin Name Description Notes
VCC Power supply input Connect to 5V or 12V DC (check model).
GND Ground Common ground for power and signals.
D0 Data 0 line Outputs binary data (low signal).
D1 Data 1 line Outputs binary data (high signal).
LED LED control input Used to control the keypad's LED.
Buzzer Buzzer control input Used to control the keypad's buzzer.

Usage Instructions

Connecting the Weigand Keypad

  1. Power Supply: Connect the VCC pin to a 5V or 12V DC power source (depending on the keypad model). Connect the GND pin to the ground of the power source.
  2. Data Lines: Connect the D0 and D1 pins to the corresponding data input pins on the controller or microcontroller.
  3. LED and Buzzer Control: Optionally, connect the LED and Buzzer pins to GPIO pins on the controller for feedback control.
  4. Cable Considerations: Use shielded twisted-pair cables for long-distance connections to minimize interference.

Interfacing with an Arduino UNO

Below is an example of how to interface a Weigand keypad with an Arduino UNO. This example assumes the keypad uses the Wiegand-26 protocol.

Circuit Diagram

Sample Code

#include <Wiegand.h> // Include the Wiegand library

WIEGAND wg; // Create a Wiegand object

void setup() {
  Serial.begin(9600); // Initialize serial communication
  wg.begin(2, 3); // Initialize Wiegand on pins 2 (D0) and 3 (D1)
}

void loop() {
  if (wg.available()) {
    // If data is available, read the code and bit length
    Serial.print("Code: ");
    Serial.print(wg.getCode()); // Print the received code
    Serial.print(", Bits: ");
    Serial.println(wg.getWiegandType()); // Print the bit length
  }
}

Important Considerations

Troubleshooting and FAQs

Common Issues

  1. No Response from the Keypad

    • Cause: Incorrect wiring or insufficient power supply.
    • Solution: Double-check all connections and ensure the power supply meets the keypad's requirements.
  2. Incorrect or Inconsistent Data

    • Cause: Signal interference or incorrect protocol configuration.
    • Solution: Use shielded cables and verify that the controller is configured for the correct Weigand protocol (e.g., Wiegand-26 or Wiegand-34).
  3. LED or Buzzer Not Working

    • Cause: LED or buzzer control pins not connected or misconfigured.
    • Solution: Ensure the LED and Buzzer pins are properly connected to GPIO pins on the controller and controlled via software.

FAQs