Meshtastic DIY - How To Build Your Own Meshtastic Node NRF52840 & Lora Radio

Learn how to create your own DIY Meshtastic node using the NRF52840. Take advantage of the NRF52840's low power consumption, compact size, and integrated battery management system (BMS) to enhance your mesh communication experience.

Meshtastic DIY - How To Build Your Own Meshtastic Node NRF52840 & Lora Radio

In this guide, we'll show you how to build your own Meshtastic LoRa Node. While you could buy a WisBlock RAK node for just $24, you can create your own for about $12 using a $6 NRF52840 Pro Micro and a $6 LoRa chip.

Hardware

Now let's get started with the hardware you need:

NRF52840 Pro Micro

For this guide, we will use the NRF52840 Pro Micro, an excellent choice for building a Meshtastic LoRa Node. This compact board features an integrated Battery Management System (BMS) and Bluetooth connectivity, all while maintaining very low power consumption, allowing it to run on a small battery for days. However, it's important to note that the NRF52840 does not have WiFi capabilities, so features like the PAX counter or connecting to MQTT via WiFi won't be available. This board is best suited for applications that rely on Bluetooth and LoRa communication rather than WiFi connectivity.

🛑
It is not recommended to use a battery larger than 450mAh with this board. Although this limitation isn't officially documented, some users on Reddit have reported issues with larger batteries. We have not tested this ourselves.

LoRa Module Ra-02 DIP

When it comes to the LoRa chip, many options are sold as Surface Mount Components (SMCs), which are very small and can be challenging to handle without damaging the board. For this reason, we opted for the RA-02 DIP version. This version is mounted on an adapter board, giving you easy access to all the pins and making it as simple as building with Lego blocks. Keep in mind that you'll need to solder the headers to the board.

To keep costs low, consider checking with your local electronics shop—they may offer soldering services, saving you the hassle and expense of purchasing soldering equipment.

If you want to use a different frequency, you may not find a DIP version (with pins) readily available. In that case, you'll need an adapter board like the one shown in the picture below. We attempted to find a reliable source for these boards but couldn't find one online, so check your local area for potential sellers.

💡
The firmware we will use in this guide is designed to support both SX126X and SX127X LoRa chips. However, we have only tested it with the SX127X, which is the specific chip mentioned in this guide.
PCB adapter for LoRa RA-01 module

GIZONT 433 Mhz 10 dbi Gain

The RA-02 LoRa module usually comes with an antenna, but it's often of very poor quality, providing a range of only 10-50 meters. We tested the GIZONT antenna (link provided), and it performed significantly better. While it’s possible we just got lucky with a well-calibrated antenna, feedback from Meshtastic users suggests that GIZONT is a reputable store.

When choosing an antenna, make sure to select the correct frequency. In our tests, we used a 40 cm antenna for base stations, like those placed at home or on a balcony, and a 24 cm or 20 cm antenna for handheld devices.

3.7V 110mAh 301230 Lithium Polymer Li-Po

The 3.7V 110mAh 301230 Lithium Polymer Li-Po battery is an excellent choice for powering compact projects like the NRF52840 Pro Micro, thanks to its small size and lightweight design. With the NRF52840's low power consumption and built-in Battery Management System (BMS), this battery can keep your Meshtastic LoRa node running for several days, and the BMS will also recharge the battery when connected to a power source. This setup is ideal for portable or remote applications. However, it’s important to avoid using batteries larger than 450mAh with this board, as some users have reported issues with larger batteries, even though this limitation is not officially documented. In our tests, the 110mAh battery provided a good balance of size and power, suitable for handheld devices or nodes that don't require extended uptime.

To connect the battery, simply attach the red wire to the B+ pin and the black wire to the B- pin on the NRF52840 Pro Micro board. This straightforward connection allows the BMS to manage charging and discharging efficiently, ensuring safe and stable operation of your device.

🌳
To help reduce electronic waste and save the environment, consider reusing batteries from disposable products like vape pens or other small electronic devices. These batteries can often be repurposed for DIY projects, such as powering your Meshtastic LoRa Node. Just make sure to test their capacity and voltage to ensure they are safe and suitable for your project.

Assembly

The hardware is all ready and set now to the wiring. For this, we will follow the following Schematics

433 MHZ LoRa Module Ra-02 DIP

LoRa Module Pin: MISO -> nRF52 Pin: P0.02

LoRa Module Pin: MOSI -> nRF52 Pin: P1.15

LoRa Module Pin: SCK -> nRF52 Pin: P1.11

LoRa Module Pin: NSS -> nRF52 Pin: P1.13

LoRa Module Pin: DIO0 -> nRF52 Pin: P0.29

LoRa Module Pin: DIO1 -> nRF52 Pin: P0.10

LoRa Module Pin: RESET -> nRF52 Pin: P0.09

LoRa Module Pin: 3v3-> nRF52 Pin: VCC

LoRa Module Pin: GND -> nRF52 Pin: GND

0.96-inch I2C OLED

Oled Module Pin: SCL -> nRF52 Pin: P0.11

Oled Module Pin: SDA -> nRF52 Pin: P1.04

Oled Module Pin: 3v3-> nRF52 Pin: VCC

Oled Module Pin: GND -> nRF52 Pin: GND

⚠️
After Completing The Wiring, It's Crucial Not To Overlook The Final Step – Connect Your Antenna
💡
Capacitors are good practice but you can skip it
💡
To establish the ground connection, connect the four ground pins on the Lora board. Strip the wires from the other side, then use another female cable to connect a wire to the ground on the nrf52840 and strip the other side. Finally, tie the four wires from the Lora board to the wire from the nrf52840 ground, ensuring a secure and reliable ground connection. Make sure to use electrical tape to avoid circuit short
💡
It's important to note that the order of the connections might vary. Follow the labels and io ports on your specific components and the provided schematics to ensure accurate wiring. Paying attention to these details ensures that you establish the correct connections and avoid potential issues or damaging your components

Flashing The Software

Before flashing your node with firmware, you first need to update the bootloader, as most of these NRF52840 Pro Micro boards come with an outdated version. Although the process is straightforward, it might take some time.

To update the bootloader or even flash the firmware, you'll need to put the node into DFU (Device Firmware Update) mode. Start by connecting the node to your PC using a data cable. Then, short the GND and Reset pins once or twice, depending on your board. A new drive should appear on your computer.

First, check the INFO_UF2.TXT file on this drive to determine your current bootloader version. Make a note of this version, then visit Adafruit's GitHub page for the nRF52 Bootloader releases. Find the next release that comes after your current bootloader version, but remember, you cannot skip versions—you need to update incrementally.

For example, if your bootloader version is 0.6.0, you should update to 0.6.1 next. In the release assets, find the files corresponding to your board. For the NRF52840 Pro Micro, look for nice_nano_bootloader-X.X.X.HEX and nice_nano_bootloader-X.X.X.UF2. Sometimes these files are zipped, so you may need to extract them. Use Ctrl + F to quickly find "nice_nano_bootloader" and download everything relevant.

Once you have the .HEX and .UF2 files, put your node in DFU mode if it is not, then drag and drop the .HEX file onto the drive. After it transfers, do the same with the .UF2 file. The device will disconnect and restart once the .UF2 file is transferred. Check the bootloader version in the INFO_UF2.TXT file to ensure it has been updated to the next version. Repeat this process until your node's bootloader is fully updated to the latest version.

After updating the bootloader, download the custom UF2 file provided in the link here. Put your node back into DFU mode, then drop the file onto the drive for your node. The device will restart, which may take a minute or two, and then you’ll be ready to start pairing.

💡
The firmware we will use in this guide is designed to support both SX126X and SX127X LoRa chips. However, we have only tested it with the SX127X, which is the specific chip mentioned in this guide.
💡
This firmware is custom-made and is not officially provided by Meshtastic. Although it includes the latest updates, it will not receive any further updates from us, and the OTA (Over-The-Air) update feature is not available. Use it at your own risk, as we have not fully tested all features and cannot take responsibility for any permanent hardware damage. In our tests on two devices with approximately 85mAh batteries, the firmware successfully sent and received messages, and charging functionality was working. However, the voltage reporting may require some bug fixes.

Pairing Devices

With the hardware assembled and the firmware flashed you're now ready to power up the Meshtastic LoRa Node and pair it with your phone. This step marks the exciting moment when your custom-built device begins its communication journey.

  • Download the Meshtastic app on your phone. The app is available for download on both the App Store (iOS) and Google Play (Android).
  • Head over to the Bluetooth page and wait a little bit, you should see a device popping up there.
  • Choose the Meshtastic device you want to pair with from the list. The device's Node ID and other relevant information should be visible in the app.
  • When prompted to enter a pairing PIN, type "123456" on your phone and wait a moment for the connection to establish. Next, you'll be asked to select your region—choose "EU433." The node will restart, and you’ll be all set to go.

Your new Meshtastic LoRa Node is now ready to serve in a variety of applications, whether it's for remote communication, outdoor adventures, or as part of a larger network of devices. With this build, you've tapped into the power of open-source projects and the DIY spirit, joining a community of enthusiasts dedicated to innovative and decentralized communication solutions.

As you explore the capabilities of your Meshtastic LoRa Node, remember that there's always more to learn and improve. Consider experimenting with different antennas, battery sizes, and configurations to further optimize performance. And as always, share your experiences and insights with the community to help others on their own DIY journeys.

Enjoy the freedom and flexibility that comes with your new custom-built Meshtastic LoRa Node. Happy building and stay connected!