Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use pi hat wm1302 : Examples, Pinouts, and Specs

Image of pi hat wm1302
Cirkit Designer LogoDesign with pi hat wm1302 in Cirkit Designer

Introduction

The Pi Hat WM1302, manufactured by Seeed Studio, is a LoRaWAN® gateway module designed to work seamlessly with Raspberry Pi boards. It is based on the Semtech SX1302 baseband chip, which provides high-performance LoRa® communication capabilities. This module is ideal for building LoRaWAN gateways for IoT applications, enabling long-range, low-power communication between devices.

Explore Projects Built with pi hat wm1302

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Battery-Powered Raspberry Pi Pico GPS Tracker with Sensor Integration
Image of Copy of CanSet v1: A project utilizing pi hat wm1302  in a practical application
This circuit is a data acquisition and communication system powered by a LiPoly battery and managed by a Raspberry Pi Pico. It includes sensors (BMP280, MPU9250) for environmental data, a GPS module for location tracking, an SD card for data storage, and a WLR089-CanSAT for wireless communication. The TP4056 module handles battery charging, and a toggle switch controls power distribution.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi Pico W-Based Smart Home Automation System with Motion Detection and Environmental Monitoring
Image of Smart Home Automation 1: A project utilizing pi hat wm1302  in a practical application
This circuit features a Raspberry Pi Pico W microcontroller connected to various sensors and actuators, including a DHT11 temperature and humidity sensor, an RCWL-0516 microwave radar motion sensor, a photocell (LDR) with a resistor for light detection, and a two-channel relay controlling a bulb and a fan. The microcontroller runs code to monitor environmental conditions and motion, displaying information on an LCD and allowing remote control via MQTT messages over Wi-Fi. It supports both automatic sensor-based operation and remote app control, with pushbuttons to switch between modes.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-CAM Smart Security System with PIR Sensor and BMP280, Battery-Powered and Wi-Fi Controlled
Image of ESP 32: A project utilizing pi hat wm1302  in a practical application
This circuit is a wireless surveillance system using an ESP32-CAM module, a PIR motion sensor, and a BMP280 sensor. The ESP32-CAM captures images and sends them via Telegram when motion is detected by the PIR sensor, while the BMP280 provides environmental data. The system is powered by a 3.7V battery, regulated to 5V using an LM340T5 7805 voltage regulator, and includes a TP4056 for battery charging.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi Pico W-Based Multi-Sensor Security System
Image of 300DT: A project utilizing pi hat wm1302  in a practical application
This circuit is designed for a security system that detects fire, sound, light changes, movement, and IR triggers using a Raspberry Pi Pico W as the central microcontroller. It includes a flame sensor, sound sensor (KY-038), LDR photoresistor, ultrasonic sensor, IR sensor, and a piezo speaker for alerts. The system monitors the environment for any disturbances and alerts personnel through the piezo speaker when an anomaly is detected.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with pi hat wm1302

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 Copy of CanSet v1: A project utilizing pi hat wm1302  in a practical application
Battery-Powered Raspberry Pi Pico GPS Tracker with Sensor Integration
This circuit is a data acquisition and communication system powered by a LiPoly battery and managed by a Raspberry Pi Pico. It includes sensors (BMP280, MPU9250) for environmental data, a GPS module for location tracking, an SD card for data storage, and a WLR089-CanSAT for wireless communication. The TP4056 module handles battery charging, and a toggle switch controls power distribution.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Smart Home Automation 1: A project utilizing pi hat wm1302  in a practical application
Raspberry Pi Pico W-Based Smart Home Automation System with Motion Detection and Environmental Monitoring
This circuit features a Raspberry Pi Pico W microcontroller connected to various sensors and actuators, including a DHT11 temperature and humidity sensor, an RCWL-0516 microwave radar motion sensor, a photocell (LDR) with a resistor for light detection, and a two-channel relay controlling a bulb and a fan. The microcontroller runs code to monitor environmental conditions and motion, displaying information on an LCD and allowing remote control via MQTT messages over Wi-Fi. It supports both automatic sensor-based operation and remote app control, with pushbuttons to switch between modes.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of ESP 32: A project utilizing pi hat wm1302  in a practical application
ESP32-CAM Smart Security System with PIR Sensor and BMP280, Battery-Powered and Wi-Fi Controlled
This circuit is a wireless surveillance system using an ESP32-CAM module, a PIR motion sensor, and a BMP280 sensor. The ESP32-CAM captures images and sends them via Telegram when motion is detected by the PIR sensor, while the BMP280 provides environmental data. The system is powered by a 3.7V battery, regulated to 5V using an LM340T5 7805 voltage regulator, and includes a TP4056 for battery charging.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of 300DT: A project utilizing pi hat wm1302  in a practical application
Raspberry Pi Pico W-Based Multi-Sensor Security System
This circuit is designed for a security system that detects fire, sound, light changes, movement, and IR triggers using a Raspberry Pi Pico W as the central microcontroller. It includes a flame sensor, sound sensor (KY-038), LDR photoresistor, ultrasonic sensor, IR sensor, and a piezo speaker for alerts. The system monitors the environment for any disturbances and alerts personnel through the piezo speaker when an anomaly is detected.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Smart agriculture and environmental monitoring
  • Industrial IoT (IIoT) applications
  • Smart cities and infrastructure
  • Asset tracking and logistics
  • Home automation and remote sensing

Technical Specifications

The WM1302 Pi Hat is designed to provide robust LoRaWAN gateway functionality. Below are its key technical specifications:

General Specifications

Parameter Value
Manufacturer Seeed Studio
Part ID Modulo LoRaWAN
Baseband Chip Semtech SX1302
Frequency Bands 868 MHz (EU) / 915 MHz (US)
Communication Protocol LoRaWAN
Operating Voltage 5V (via Raspberry Pi GPIO header)
Power Consumption < 2W
Operating Temperature -40°C to +85°C
Dimensions 65mm x 56mm x 18mm

Pin Configuration and Descriptions

The WM1302 Pi Hat connects to the Raspberry Pi via the GPIO header. Below is the pin configuration:

Pin Number Pin Name Description
1 3.3V Power supply for the module
2 5V Main power supply for the module
3 GPIO2 (SDA) I2C data line
5 GPIO3 (SCL) I2C clock line
8 GPIO14 (TXD) UART transmit line
10 GPIO15 (RXD) UART receive line
12 GPIO18 Interrupt pin for LoRaWAN communication
14 GND Ground

Usage Instructions

How to Use the WM1302 Pi Hat in a Circuit

  1. Hardware Setup:

    • Attach the WM1302 Pi Hat to the GPIO header of a Raspberry Pi.
    • Ensure the Raspberry Pi is powered off before connecting the module.
    • Connect an appropriate LoRa antenna to the SMA connector on the Pi Hat.
  2. Software Setup:

    • Install the Raspberry Pi OS on your Raspberry Pi.
    • Update the system packages using the following commands:
      sudo apt update
      sudo apt upgrade
      
    • Install the required libraries and dependencies for LoRaWAN communication:
      sudo apt install git cmake build-essential
      
    • Clone the LoRaWAN gateway software repository provided by Seeed Studio:
      git clone https://github.com/Seeed-Studio/lorawan_gateway.git
      cd lorawan_gateway
      
    • Build and install the software:
      mkdir build
      cd build
      cmake ..
      make
      sudo make install
      
  3. Configuration:

    • Edit the configuration file to set the frequency band and other parameters:
      sudo nano /etc/lorawan_gateway/global_conf.json
      
    • Save the file and restart the gateway software.
  4. Testing:

    • Use the provided tools to test the LoRaWAN gateway functionality.
    • Ensure the gateway is connected to a LoRaWAN network server.

Important Considerations and Best Practices

  • Always use a compatible LoRa antenna to avoid damaging the module.
  • Ensure proper grounding to minimize noise and interference.
  • Use a stable power supply to prevent communication issues.
  • Follow local regulations for operating in the specified frequency bands.

Example Code for Arduino UNO Integration

Although the WM1302 Pi Hat is primarily designed for Raspberry Pi, it can communicate with other microcontrollers like Arduino via UART. Below is an example of how to send data to the WM1302 using an Arduino UNO:

#include <SoftwareSerial.h>

// Define RX and TX pins for SoftwareSerial
SoftwareSerial loraSerial(10, 11); // RX = pin 10, TX = pin 11

void setup() {
  // Initialize serial communication with the LoRa module
  loraSerial.begin(9600);
  Serial.begin(9600);

  // Wait for the module to initialize
  delay(2000);
  Serial.println("LoRa module initialized.");
}

void loop() {
  // Send a test message to the LoRa module
  String message = "Hello, LoRa!";
  loraSerial.println(message);
  Serial.println("Message sent: " + message);

  // Wait for 5 seconds before sending the next message
  delay(5000);
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. The module is not detected by the Raspberry Pi:

    • Ensure the Pi Hat is properly seated on the GPIO header.
    • Verify that the power supply is sufficient for both the Raspberry Pi and the Pi Hat.
    • Check the I2C and UART connections in the software configuration.
  2. LoRaWAN communication is not working:

    • Confirm that the correct frequency band is configured in the global_conf.json file.
    • Ensure the antenna is securely connected and matches the frequency band.
    • Verify that the gateway is registered with a LoRaWAN network server.
  3. High noise or interference in communication:

    • Use proper shielding and grounding techniques.
    • Avoid placing the module near high-power RF devices.

FAQs

Q: Can the WM1302 Pi Hat be used with other single-board computers?
A: While it is designed for Raspberry Pi, it can be adapted for other SBCs with compatible GPIO headers and software support.

Q: What is the maximum range of the WM1302 Pi Hat?
A: The range depends on environmental factors but can reach up to 15 km in rural areas and 2-5 km in urban areas.

Q: Does the module support LoRaWAN Class B or Class C devices?
A: Yes, the WM1302 supports LoRaWAN Class A, B, and C devices.

Q: Can I use the module without an internet connection?
A: Yes, the module can operate in offline mode for local LoRa communication, but an internet connection is required for connecting to a LoRaWAN network server.