Close
0%
0%

RP2040 MiniPill LoRa

Raspberry Pi Pico based LoRa Board

Public Chat
Similar projects worth following
After implementing a few projects with LoRa and LoRaWAN in our community, we realized that we needed our own hardware base for further developments and workshops. For this reason, we developed a board based on the very common Raspberry Pi Pico and add a LoRa module (RFM95W-868) to it.

In the first step our board has become a little wider than the standard Raspberry Pi Pico, but it still remains in the standard grid, so that it fits easily on a breadboard. This means it is possible to develop both simple prototypes as well as add new extension boards. The board is also pin-compatible with the normal Raspberry Pi Pico.

This board can be programmed just like any other Raspberry Pi Pico, but to introduce young and interested people to the topic of LoRa, we decided to run MicroPython on the board by default. This allows us to provide a hardware as well as a software basis for workshops with students in STEM disciplines, for example. The first prototypes are now in the pipeline so we can test our software with them directly. In the future, we would like to design extension boards for our PCB with e.g. GPS, acceleration sensors, solar and battery and integrate them into our community projects.

  • Combine ABP and OTAA mode in one class

    Dominik Kuhn09/30/2024 at 13:41 0 comments

    By simplifying and extending our LoRaWAN class, we can develop applications with very little effort. Below is a small example in both modes to send a simple string message to The Things Network (TTN): 

    from machine import Pin, SPI
    import machine
    import time
    from random import randrange
    
    from PyLoRaWAN import PyLoRaWAN, ActivationType
    
    
    # The Things Network (TTN) device details (available in TTN console)
    # TTN device address, 4 Bytes, MSB (REPLACE WITH YOUR OWN!!!)
    devaddr = [0x26, 0x00, 0x00, 0x00]
    # TTN network session key, 16 Bytes, MSB (REPLACE WITH YOUR OWN!!!)
    nwskey = [0xE0, 0x92, 0xEA, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
    # TTN application session key, 16 Bytes, MSB (REPLACE WITH YOUR OWN!!!)
    appskey = [0xB2, 0xB5, 0xC8, 0xDF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
    
    
    deveui = [0x70, 0xB3, 0xD5, 0x00, 0x00, 0x00, 0x00, 0x00]
    appeui = [0x45, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
    appkey = [0x44, 0x99, 0xB4, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
    devnonce = [randrange(256), randrange(256)]
    
    
    spi = machine.SPI(0,
        baudrate=100000,
        polarity=1,
        phase=1,
        bits=8,
        firstbit=machine.SPI.MSB,
        sck=machine.Pin('GP2'),
        mosi=machine.Pin('GP3'),
        miso=machine.Pin('GP4')) 
    
    cs = machine.Pin( 'GP5' ) # , Pin.OUT, value=1)
    
    time.sleep(10)
    
    lorawan = PyLoRaWAN(spi, cs)
    lorawan.modem.set_output_power(16)
    lorawan.modem.set_spreading_factor(12)
    
    lorawan.join( ActivationType.ABP, auth={'devaddr':devaddr, 'nwskey':nwskey, 'appskey':appskey} )
    
    for i in range(5):
        lorawan.send_test_msg()
        time.sleep(60)
    
    time.sleep(5)
    
    lorawan.join( ActivationType.OTAA, auth={'deveui':deveui, 'appeui':appeui, 'appkey':appkey, 'devnonce':devnonce} )
    
    for i in range(5):
        lorawan.send_test_msg()
        time.sleep(60)

    We are still developing and present more details later. Then we will also publish the link to our GitHub repo with the hardware and software for our board. 

  • First tests with Micropyton

    Dominik Kuhn09/12/2024 at 18:05 0 comments

    We added a port to Micropython for this board, so to be able to make the first tests. We wrote several Python modules to send and receive all 4 data message types of the LoRaWAN 1.0.x and 1.1 standards. These message types are used to transport MAC commands and application data. So we were now able to communicate with TTN successfully in ABP and OTAA modes. In addition, we have written an overriding class for low level hardware control of the SX1276 module. 

    More details later.

  • Rev 1.1 - 2024.09

    Dominik Kuhn09/12/2024 at 17:41 0 comments

    • Optimazations:
        • Trace width adjusted for a 50 Ohm antenna based on the JLCPCB impedance calculator.
        • SMA connection mirrored, to remove a via to the upper side, which possibly made trouble.
        • Ground area around the antenna trace in the clearance set to 10 mil as in the JLCPCB impedance calculator.
        • Adding a 100nF ceramic capacitor (MLCC) close to the LoRa module.

    View all 3 project logs

    Enjoy this project?

    Share

    Discussions

    Similar Projects

    Does this project spark your interest?

    Become a member to follow this project and never miss any updates