- 1 Introduction
- 2 Examples
- 2.1 Example1 -- Use with LMIC library for LoRaWAN compatible
- 2.2 Example2 -- Getting GPS to work on a Raspberry Pi
- 2.3 Example3 -- How to get temperature sensor data from a remote Raspberry Pi via Wireless LoRa
- 2.4 Example4 -- Set up as a LoRa Gateway using the LowCostLoRaGw library
- 2.5 Example5 -- Set up as a LoRaWAN gateway and connect to TTN with RPI and Windows 10 IOT core
- 3 Usage Notice
- 4 Order Information
- 5 Schematic
- 6 TroubleShooting
- 7 Reference
What is the LoRa/GPS HAT
The Dragino LoRa/GPS_HAT is an expension module for LoRaWan for using with the Raspberry Pi.This product is intended for those interested in developing LoRaWAN solutions.
The LoRa/GPS HAT is based on the SX1276/SX1278 transceiver.The add on L80 GPS (base on MTK MT3339) is designed for applications that use a GPS connected via the serial ports to the Raspberry Pi such as timing applications or general applications that require GPS information.
The transceivers of the LoRa/GPS HAT feature the LoRa™ long range modem that provides ultra-long range spread spectrum communication and high interference immunity whilst minimising current consumption.The LoRa/GPD HAT can achieve a sensitivity of over -148dBm using a low cost crystal and bill of materials. The high sensitivity combined with the integrated +20 dBm power amplifier yields industry leading link budget making it optimal for any application requiring range or robustness. LoRa™ also provides significant advantages in both blocking and selectivity over conventional modulation techniques, solving the traditional design compromise between range, interference immunity and energy consumption.
This board can calculate and predict orbits automatically using the ephemeris data (up to 3 days) stored in internal flash memory, so the HAT can fix position quickly even at indoor signal levels with low power consumption.With AlwaysLocate™ technology, the Lora/GPS HAT can adaptively adjust the on/off time to achieve balance between positioning accuracy and power consumption according to the environmental and motion conditions.The GPS also supports automatic antenna switching function. It can achieve the switching between internal patch antenna and external active antenna.Moreover, it keeps positioning during the switching process.
Hardware version info
Hardware Source is in: LoRa GPS HAT source
- LoRa/GPS_HAT v1.0: The first hardware release for the LoRa/GPS_HAT.
- LoRa/GPS_HAT v1.3: Add a trace from LoRa DIO1 to RPi GPIO4(wiringPi definition). Add a trace from Lora DIO2 to RPi GPIO5(wiringPi definition). They are required by LMIC library in RPi.
- LoRa/GPS HAT v1.4:
- Change SMA connector to support active antenna
- Add AADET_N LED to show if external antenna is active.
- Connect GPS PPP pin to RPi BCM pin 18
- Modify Silkscreen for GPS TXD/RXD
- 168 dB maximum link budget.
- +20 dBm - 100 mW constant RF output vs.
- +14 dBm high efficiency PA.
- Programmable bit rate up to 300 kbps.
- High sensitivity: down to -148 dBm.
- Bullet-proof front end: IIP3 = -12.5 dBm.
- Excellent blocking immunity.
- Low RX current of 10.3 mA, 200 nA register retention.
- Fully integrated synthesizer with a resolution of 61 Hz.
- FSK, GFSK, MSK, GMSK, LoRaTM and OOK modulation.
- Built-in bit synchronizer for clock recovery.
- Preamble detection.
- 127 dB Dynamic Range RSSI.
- Automatic RF Sense and CAD with ultra-fast AFC.
- Packet engine up to 256 bytes with CRC.
- Built-in temperature sensor and low battery indicator.
- Based on MT3339.
- Power Acquisition:25mA,Power Tracking:20mA.
- Compliant with GPS, SBAS.
- Programmable bit rate up to 300 kbps.
- Serial Interfaces UART: Adjustable 4800~115200 bps,Default: 9600bps.
- Update rate:1Hz (Default), up to10Hz.
- I/O Voltage:2.7V ~ 2.9V.
- Protocols:NMEA 0183,PMTK.
- Horizontal Position Accuracy:Autonomous <2.5 m CEP.
- TTFF@-130dBm with EASY™:Cold Start <15s,Warm Start <5s,Hot start <1s;TTFF@-130dBm.without EASY™:Cold Start <35s,Warm Start <30s,Hot Start <1s.
- Timing Accuracy:1PPS out 10ns，Reacquisition Time <1s.
- Velocity Accuracy Without aid <0.1m/s,Acceleration Accuracy Without aid 0.1m/s².
- Sensitivity Acquisition -148dBm，Tracking -165dBm，Reacquisition -160dBm.
- Environmental:Operating Temperature -40°C to 85°C,Storage Temperature -45°C to 125°C.
- Dynamic Performance Altitude Max.18000m，Maximum Velocity Max.515m/s，Maximum Acceleration 4G.
- L1 Band Receiver(1575.42MHz) Channel 22 (Tracking) /66 (Acquisition).
- Frequency Band: 868 MHZ/433 MHZ/915 MHZ(Pre-configure in factory)
- Low power consumption
- Compatible with Raspberry Pi 2 Model B/Raspberry Pi 3.
- LoRa™ Modem
- FSK, GFSK, MSK, GMSK, LoRa™and OOK modulation
- Preamble detection
- Baud rate configurable
- Built-in temperature sensor and low battery indicator
- Excellent blocking immunity
- Automatic RF Sense and CAD with ultra-fast AFC
- Support DGPS, SBAS(WAAS/EGNOS/MSAS/GAGAN)
- GPS automatic switching between internal patch antenna and external active antenna
- PPS VS. NMEA can be used in time service
- Support SDK command
- Built-in LNA for better sensitivity
- EASY™, advanced AGPS technology without external memory
- AlwaysLocate™, an intelligent controller of periodic mode
- GPS FLP mode, about 50% power consumption of normal mode
- GPS support short circuit protection and antenna detection
You can see the RaspberyyPi2 B GPIO definition as below:
The wiring between LoRa/GPS HAT and RaspberryPi 2B:
You can see it more careful at below:
- PWR: Power Indicate LED. Turns on once there is power.
- RX: Indicate there is a wireless packet received in the LoRa module.
- 3D_FIX: The led blink ervey 100ms after the GPS fixing position.
- Automated Meter Reading.
- Home and Building Automation.
- Wireless Alarm and Security Systems.
- Industrial Monitoring and Control
- Long range Irrigation Systems
Dimensions and Weight
- Size: 60mm*53mm*25mm.
- Net weight: 30g.
- Package Size: 98mm x 81mm x 32mm
Example1 -- Use with LMIC library for LoRaWAN compatible
Video Example from Users
Video May be out of date, The latest instruction is here: Connect to TTN Network
Example2 -- Getting GPS to work on a Raspberry Pi
Example3 -- How to get temperature sensor data from a remote Raspberry Pi via Wireless LoRa
Example4 -- Set up as a LoRa Gateway using the LowCostLoRaGw library
The LowCostLoraGw source code provides good examples to shows how to use RPi to set data to the IoT provider and Dropbox. The LoRa Shield and LoRa/GPS Hat can work with these examples, by doing some modifications as below:
When use LoRa Shield with Arduino, what need to modify is:
In the sketch: // uncomment if your radio is an HopeRF RFM92W or RFM95W #define RADIO_RFM92_95
In the code: SX1272.h change #define SX1272_RST 3 to #define SX1272_RST 9 change #define SX1272_SS 2 to #define SX1272_SS 10
When use LoRa/GPS HAT with RPi 2/3, what need to modify is:
Solder the pin22 and pin24. for CS pin use in this library. otherwise you will see below error: pi@raspberrypi:~/lora_gateway$ sudo ./lora_gateway Unrecognized transceiver. ...
Example5 -- Set up as a LoRaWAN gateway and connect to TTN with RPI and Windows 10 IOT core
You have to be aware that Radio link quality and performances are highly dependent of environment.
Better performances can be reached with:
- Outdoor environment.
- No obstacles.
- No high level radio interferer in the ISM 868MHz band.
- At least 1 meter above the ground.
Radio performances are degraded with:
- Obstacles: buildings, trees...
- Inner buildings environments.
- High ISM 868MHz band usage by other technologies.
Radio communication are usually killed with bad topographic conditions. It is usually not possible to communicate through a hill, even very small.
The GPS module has a built in 15x15x4 patch Antenna, make sure the GPS antenna points to the sky. if the module must be placed in indoor enviroment where GPS antenna is poor. User can use external GPS antenna. The GPS module will auto switch between the patch antenna and external antenna.
The RF part of GPS module is sensitive to temperature, please keep them away from heat-emitting circuit.
- LoRa/GPS HAT 868: Load with SX1276, support 868M frenquency
- LoRa/GPS HAT 915: Load with SX1276, support 915M frenquency
- LoRa/GPS HAT 433: Load with SX1278, support 433M frenquency
- 1 x LoRa /GPS HAT
- 4 x Brass cylinders (M2.5 x 11 + 6)
- 4 x Screws ( M2.5 x 5)
- 4 x Nuts( M2.5)
- 1 x Glue Stick Antenna(868 MHZ, 433 MHZ or 915 MHZ depends on order)
- Packaging with environmental protection paper box
GPS doesn't power on
We found some early production version of LoRa/GPS Hat has wrong place of L1 and C3 components. If this happen, the GPS wont work,
Please swap them if such issue happen.
Debug GPS Serial Data via PC
Once the GPS module is power on, it will output GPS data via the GPS serial interface. User can use the computer to get this data for debug purpose.
Below is the hardware connection require to do that.
- Hardware Source: https://github.com/dragino/Lora/tree/master/Lora_GPS%20HAT
- Where to buy this board: http://www.dragino.com/buy.html
- RoHS Report: http://www.dragino.com/downloads/index.php?dir=datasheet/RoHS/&file=Lora_GPS_HAT_RoHS_Report.pdf
- Technical Support for LoRa/GPS HAT: firstname.lastname@example.org
- LoRa Shield: http://wiki.dragino.com/index.php?title=Lora_Shield
- L80-R GPS module home page: http://www.quectel.com/product/prodetail.aspx?id=62
- Getting GPS to work on a Raspberry Pi:https://blog.retep.org/2012/06/18/getting-gps-to-work-on-a-raspberry-pi/
- How GPS Works:https://www.maptoaster.com/maptoaster-topo-nz/articles/how-gps-works/how-gps-works.html
- GPSD: http://www.catb.org/gpsd/
- The Things Network forum:http://forum.thethingsnetwork.org/
- LoRa™ network:https://github.com/Lora-net
- Arduino-LMIC library:https://github.com/matthijskooijman/arduino-lmic
- LMIC source code for Raspberry Pi:https://github.com/ernstdevreede/lmic_pi/archive/master.zip
- UART for Serial Console or HAT on Raspberry Pi 3 :https://www.hackster.io/fvdbosch/uart-for-serial-console-or-hat-on-raspberry-pi-3-5be0c2
- Raspberry Pi 3 UART Overlay Workaround:http://www.briandorey.com/post/Raspberry-Pi-3-UART-Overlay-Workaround