LoraWAN Stick is an open-source printed circuit board by lostangles, from the lostangles/LoraWAN-Stick repository on GitHub. It is a 2-layer board of 124.1 × 22.9 mm with 37 parts on 83 nets, routed with 638 tracks and 115 vias.
It is built around the ATMEGA32U4-AU, MCP73831 and SPX3819S. Its parts include 9 resistors, 8 capacitors, 5 ICs, 4 diodes and 2 connectors. It belongs with the radio and wireless and interfaces and adapters boards and the AVR (ATmega, ATtiny) boards of this library.
PCB combining Atmega32u4, MTK3339 GPS module, and RN2903 LoraWAN module.
Functionality
I wanted to make a single PCB that had some GPIO, communication interfaces, a module to transmit LoraWAN packets, and a way to get current location. The LoraWAN stack is offloaded from the 32u4 and rests in a PIC microcontroller inside the RN2903. This allows a simple interface of simply passing the payload from the 32u4 to the RN2903 without having to worry about the LoraWAN stack inside your project.
The LoraWAN-Stick incorporates the LiPo charging circuitry common to the Adafruit Feather line of dev boards, as well as follows the same pinout for attachment of Adafruit Featherwings. Because both the RN2903 and GPS module use serial communications, serial communications with other nodes may be difficult; the GPS module uses the hardware UART, and communication to the RN2903 uses software serial. From my experience, having multiple software serial interfaces tends to work in unexpected ways, and should probably be avoided without thorough testing.
Pins
Pinout follows Adafruit Feather format as I wanted to be able to add compatability of Adafruit Featherwings to this project.
The 32u4 only has a single hardware UART, hard wired to the TX/RX of the GPS module. These pins are broken out on the header.
The RN2903 is controlled by serial, but because the 32u4 has only a single UART, a software serial interface must be used. The RN2903 is hardwired with its RX on pin 5 and TX on pin 10. Reset for the RN2903 is hard wired to pin 6 and should be pulled high when not in reset state. The RN2903 Pickit3 programming header is also broken out to update the firmware on the RN2903 directly.
#uC Info
The 32u4-AU microcontroller that I used here comes preconfigured to use the internal oscillator, thus the C7, C8, and XTAL pads can be left empty. When configuring the microcontroller for the first time, it will not show up as a USB device until the bootloader has been flashed to it via ISP. Once the bootloader has been flashed, it should show up as an Adafruit Feather 32u4 under Device Manager, and can be programmed/configured in the same manner as any of the Adafruit 32u4 Feathers.
#Radio Interface
The RN2903 by default communicates on 56000 baud. The SoftwareSerial library is more reliable at slower speeds; to set the baudrate in the RN2903, you must send a low signal on the TX line for at least two character lengths, followed by 0x55 at the new baudrate requested. Using the Arduino libraries, this might look like:
#Fuse Settings
The bootloader included configures the 32u4 in 8 MHz in the same configuration as the Adafruit 32u4 Feathers.
The uC can be configured to run with an internal oscillator or an external oscillator. If you use the 32u4-AU variant, the built in oscillator can be used in lieu of an external oscillator. The fuse settings to configure the uC as such would be something like:
It measures 124.1 × 22.9 mm and has 2 copper layers, 1.6 mm thick.
What parts does the LoraWAN Stick use?
37 parts, built around the ATMEGA32U4-AU, MCP73831 and SPX3819S. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the LoraWAN Stick KiCad files?
From the lostangles/LoraWAN-Stick repository on GitHub, at the commit this page was made from: the board is LoraWAN-Stick.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Can I use the LoraWAN Stick design in my own project?
Its repository states no licence, so its author keeps all rights: ask lostangles before reusing the design.