This project provides build instructions and 3D print files for a basic but powerful DIY Meshtastic node with the following features:
- Pocket sized
- Battery powered, 40+ hour run time (Up to 2 weeks with double 18650 version)
- ~1 watt maximum output on internal battery power
- ~2 watt maximum output on USB power
- Based on two easy-to-obtain COTS modules
- Relatively easy assembly and soldering with no custom PCB required
- Optional GPS
The castellated edge connections on the E22 module, along with the pin assignment flexibility of the NRF52 MCU, allow most signals to pass between boards with no wiring. Just careful positioning, a little solder, and three header pins connect all signals. Point-to-point wiring is used only for power.
The E22 gives this node outstanding performance in a compact package. The hinged and swiveling antenna matches the physical design of the node, shielding the battery power switch from accidental bumps. This node works well when folded, yet makes no compromises when straightened up at your destination.
These instructions assume you have basic electronics soldering equipment, supplies and tools, and are reasonably competent at soldering surface mount and thru-hole PCBs. If you have no experience soldering, don't give up; you can probably learn to solder in a few hours. There are plenty of tutorial videos out there. But don't do your early practice on this project.
Similarly, it's best if you are familiar with other Meshtastic nodes as this is not an introduction to Meshtastic.
Note: Product links are examples of components with the required specifications and do not imply a recommendation of a specific part or supplier. These are not affiliate links.
-
"Pro Micro compatible" NRF52840 dev module
Such as the Teyleten, Tenstar Robot or Nice!Nano. Some of these can be found for less than $3 each.
-
Ebyte E22 900M33S LoRa module
Usually $15-20, available from Amazon or AliExpress.
-
1000mAh LiPo cell with protection board or protected 18650 cells
The 50mm x 20mm x 10mm cells from Amazon or AliExpress fit this case design.
Smaller cells can still provide useful battery life, but be sure they are capable of over 1 amp output without significant voltage drop. Higher C cells will produce slightly higher RF output. Larger cells will require a larger case. You may also want a matching JST PH 2.0 socket like this one from AliExpress.
-
Mini micro 3-pin SPDT toggle switch
The battery switch needs to be smaller than is common; I used this one from Amazon which is 8.2mm x 5.1mm and just fits.
-
915/868 MHz Antenna
A high-quality hinged dipole fits and works well.
Unfortunately, three out of three different brands I purchased from Amazon did not come close to high quality, and two of the three seemed to be less efficient multi-band antennas.
The one that came with my Station G2 was close, needing only a slightly longer element to bring the resonant frequency down a bit from ~960 MHz. The result looks very good now on the VNA.
The ALFA Network ARS-915PR I ordered from ROKLAND appears well tuned on my VNA.
When choosing antennas, be aware of the difference between SMA and RP-SMA. It is, unfortunately, possible to attach an RP-SMA antenna to an SMA jack, but there will be no electrical connection, and you may damage the E22. Always make sure you see a pin on one end or the other when connecting.
-
SMA female right-angle 10 or 15cm Pigtail
Like these from Amazon or AliExpress 10cm may not be enough for the 2 18650 version of the case.
-
Wire
22-24 AWG stranded Silicone wire is recommended to reduce voltage drop and keep RF power output up to spec.
-
Two battery sensing voltage divider resistors
Almost any pair of the same value, axial-lead resistors will work to divide the battery voltage in half so that it can be measured safely by the ADC. 10K - 1M ohm is recommended, as lower values may impact battery life. 1/4 - 1/8 watt will work, but 1/8 watt is easier to fit. 1% recommended, but up to 10% will work. You may need to adjust the ADC multiplier override ratio for accurate battery voltage readings, especially if you don't use 1% tolerance or choose a higher resistance than recommended.
-
Common 2.54 mm pin header
These usually come with the NRF52840 board.
-
Heat-resistant insulating tape
Every workbench should have a roll of this Stuff. Often called Kapton tape.
-
Optional low power GPS module
GPS modules only need power, ground, and two serial connections. This one is relatively low power, fits well and has a small active antenna which can be placed a a short distance from the other boards to reduce RF noise.
| E22 Pin Number | E22 Signal | NRF52 Pin | Method |
|---|---|---|---|
| 12 | GND | N/C | No connection |
| 13 | DIO1 | P0.29 | Direct solder |
| 14 | BUSY | P0.02 | Direct solder |
| 15 | NRST | P1.15 | Direct solder |
| 16 | MISO | P1.13 | Direct solder |
| 17 | MOSI | P1.11 | Direct solder |
| 18 | SCK | P1.10 | Direct solder |
| 19 | NSS | P1.09 | Direct solder |
| 11 | GND | GND | Header pin |
| 10 | VCC | B+ | Wire |
| 7 | TXEN | P1.00 | Header pin |
| 6 | RXEN | P0.11 | Header pin |
| NRF52 Pin | Battery sense voltage divider |
|---|---|
| P0.31 | R1 + R2 |
| B+ | R1 |
| GND | R2 |
| Source | Function | Destination |
|---|---|---|
| NRF52 pin B+ | Battery positive | Battery switch common |
| NRF52 pin GND | Ground | Battery negative |
| NRF52 5V USB | 5 volts | Battery switch off |
| Battery switch on | Battery | Battery positive |
| Pin | Function |
|---|---|
| P0.06 | Serial2 RX |
| P0.08 | Serial2 TX |
| P1.04 | SDA |
| P1.06 | SCL |
| P1.02 | GPS RX |
| P1.07 | GPS_TX |
Instead of a custom PCB, the castellated edge of the E22 module is soldered on the insulated back of the NRF52 module. Construction time may be 2-4 hours.
When soldering the castellated edge, be sure not to solder pin 12 of the E22 module. It's an unused ground, and the corresponding pad of the NRF52 module will be used for the battery sense voltage divider.
Strip and tin each wire before soldering it in place.
The OpenSCAD source and STL files are included here. Print the case_18650.stl version if you plan to use a protected 18650 cell, otherwise, use the case.stl file. The OpenSCAD source is included if you want to modify the case. If you don't have a 3D printer or a friend with one, some public libraries have one. There are also companies that sell this service.
PLA works fine. Use your highest quality settings. Supports should not be required. Test fit the cover after printing. It should snap on tightly.
Be sure to perform the initial flash of the firmware on the NRF board before proceeding with the assembly, so that the debug pads on the bottom of the board will be available in case anything goes wrong. This also ensures that the TXEN pad is not driven when it shouldn't be, which could damage the E22.
Follow the Meshtastic instructions to upgrade to the
Adafruit bootloader using
Method 1: UF2.
Download and install the
latest version
of the update nice nano bootloader,
e.g., update-nice_nano_bootloader-0.9.2_nosd.uf2.
If you may later want to use OTA firmware updates, flash the bootloader
included here instead.
Note that since there is no reset button, you need to carefully and briefly short the RST and GND pads twice within 1/2 second to activate bootloader mode. Be sure you short only the correct pins, 3rd and 4th from the end. Small tweezers work well. It may take a few tries; look for the red LED to remain off or slow "breathing" to show success.
Once the bootloader is installed, you can use the same method to install the Meshtastic firmware. Note, this node is not yet supported in the Meshtastic firmware source, so I have provided a development firmware binary. The source is here.
After everything is flashed, plug just the NRF board into USB power and verify you can pair and connect to it with the Meshtastic app.
If you will connect a battery larger than about 500 mAh, you probably want to short the two square "BOOST" pads on the back of the board near the RST and VCC pads to reduce charge time; Solder stripped wire-wrap wire, or separate a couple of coarse wire strands, or just bridge the pads with solder, keeping it as thin as you can.
A layer or two of polyimide or other high-temperature tape between the boards is recommended to avoid any chance of shorting exposed vias. Leave the E22 pads on the edge with VCC exposed, but cover the back surface of the pads on the other edge.
Cover the entire pin 12 GND pad next to DI01 on the E22 to avoid any chance of shorts when the resistors are later installed.
After applying and trimming the heat-resistant tape, position the boards back to back, such that pads P0.09-P0.29 on the Pro Micro NRF52840 line up with pads NSS-DI01 (pins 19-13) on the E22. Align the boards carefully such that last eight pads on each board are directly opposite, but not quite touching.
⚠️ Warning: Only seven of the eight aligned pads will be bridged, so the NRF board should overhang the E22 enough that you can see the entirety of each pad on the bottom of the NRF board.
Hold or very gently clamp using rubber bumpers the boards in this position.
If you position the boards carefully, with ~.1mm gap between the inner edges of the pads on the NRF and the castellated edge of the E22, you can make the connections with solder bridges and still easily unsolder them to separate the boards later in case you brick it and need to access the programming pads on the bottom.
If you are manually holding the boards in place, it helps to apply solder to a central pad on both boards before you position them so you can make the first connection with out needing a third hand. After that, you can set the boards down to finish the other six connections.
Start by soldering the two connections on each end, 009 to NSS and 029 to DI01. Solder from the NRF board bottom pad to the edge of the corresponding castellated E22 pad. Before proceeding to solder the 5 remaining connections on this edge of the boards, check that the spacing is correct and that each connection is correct as in the table above.
For battery-powered builds, you will want a voltage divider to sense the battery voltage. Solder a resistor between P0.31 and B+ or RAW and an identical resistor between P0.31 and GND on either side of the board.
To reduce power supply noise, you can also solder a ceramic SMD capacitor between the VCC and GND pads on the E22. Note that while this is best practice in general and the E22 data sheet recommends filter capacitors, it does not specify a required value and it is probably OK to leave this out.
On the other edge of the boards, solder short solid conductors from RXEN to P0.11, from TXEN to P1.00, and from GND to GND. Notice the GND connection is offset by one position so it will be at a slight angle relative to the other pins which are straight across. Insulation is not needed here, but the use of trimmed header pins is recommended. The rigid pins help hold the boards together and reduce the chance of breaking solder connections on the first edge.
Next, we need to connect the E22 VCC; Solder a short length of insulated wire from VCC on the E22 to the B+ or RAW pad.
⚠️ Warning: Never connect USB or power up the E22 without an antenna or 50-ohm load connected, or it may be damaged. And never set SX126X_MAX_POWER define to more than 8 when building firmware for the E22 900M33S, or it will be damaged.
Use a continuity tester to carefully check each soldered connection and also check for any unintended shorts between adjacent pads.
Test fit the board in the case with the USB connector level and inserted into the USB hole. Then, gently press the boards down to seat the edge of the E22 RF shield against the wall in the middle of the case so it can't slide away from the USB hole. If the USB connector won't fit the hole because of filament sag, carefully trim to fit. If the boards won't easily fit down against the wall so that the RF shield is flat against the bottom of the case, carefully remove some material from the wall with a sharp knife or file. If the USB connector is not held firmly in place in the USB hole, add a layer or two of tape to the wall.
Clip all three terminals of the battery switch so they are a bit shorter than the original length of the outside two terminals, and test fit it in the case.
Solder wires to the two farthest terminals, closest to the SMA.
Use a nut or a few washers inside the case to adjust the exposed length of the SMA jack so that the antenna fits properly. Tighten the nut snugly while holding the jack so the pigtail touches the bottom of the case where it connects to the SMA jack to allow room for the battery switch. Test fit the antenna; it should get tight just before it reaches the nut. If it contacts the nut first, adjust the inside spacing.
Carefully connect the pigtail U.FL to the E22, and be careful not to pull or twist it off during the remainder of the assembly.
Never power up the E22 or connect the USB without an antenna or load connected or it may be damaged.
As you make the remaining connections, place the boards and battery switch in position and trim wires close to the required length so they will fit neatly in the case.
Solder the wire on the battery switch terminal closest to the SMA to one of the LDO terminals, which are connected to the USB VBUS pads (You can leave this off if you don't want the option of higher power.) Unfortunately, USB power is not connected to a pad on this board. But, it is easy to use a continuity tester to find a convenient LDO pin that connects to the USB power pins. The USB VBUS pads are the larger pads second from either end of the USB connector.
Move the battery switch toggle to the off position, closest to the case.
Connect the wire from the middle battery switch terminal to the B+ or raw pad, or to the VCC pads of the E22.
If you don't have a jack to fit the battery connector, and you don't need the battery charger that may have come with the battery, you can use its jack and wire for the battery connection. Or, you may carefully solder the battery lead directly if you don't want the battery to be removable.
Connect the remaining (closest) battery switch terminal to the positive (red) battery lead or the correct battery jack wire.
Fashion battery holder contact pads from a thin piece of shiny metal which will take solder. I cut small pieces of .2mm nickel battery welding strip, but a piece cut from the lid of a tin can might also work.
Once you determine where the contact pads will be mounted, test fit the pads with the battery. Solder wire to each contact pad in a location where it will not get caught when the battery is installed. You can use double sided adhesive foam mounting tape to mount the battery contact pads in the battery holder section of the case.
If the battery does not fit snugly, add a second layer of mounting tape. If the battery does not make solid electrical contact at the negative contact, you can add a bit of solder to create a bump near the middle.
Connect the remaining (closest) battery switch terminal to the positive contact pad at the switch end of the case.
Tighten the battery switch nut snugly while preventing the switch from rotating.
The off position of the battery switch is towards the case, and the on position is towards the SMA jack. Note, however, that the node will also be powered on when the switch is off if USB power is connected.
Check that the battery switch is in the off position and that the antenna and U.FL are still connected.
Solder the negative (black) lead of the battery, contact, or jack wire to a GND pad.
If you used a connector for the battery, connect it. Arrange wires and place the battery in the case.
When used with a mobile device, no GPS is needed as the mobile device can be configured to provide it's location. If, however, you want to use this node as a tracker, a GPS can easily be added.
The NRF52840 dev module includes a switched 3.3V power output which we take advantage of to extend battery life by powering the GPS module only when needed. When the GPS is enabled, battery life will be reduced, especially inside buildings where a fix is harder to obtain. You can still expect the battery recommended here to last a full day.
If you use the recommended GPS module or one with the same form factor and pin out, you can connect the Rx and Tx pads via header pins and use wires only for power and ground. If you use a different GPS module, be sure to connect Rx to Tx and Tx to Rx.
First, solder two header pins, long side down to the P1.02 and P1.07 thru holes on the NRF52840 module and then remove the plastic spacers.
Trim the pins to fit the GPS module and place it on the pins with it's metal shield flat against the NRF chip as shown.
Solder the GPS module in place and solder wires to connect the 3.3V and GND pads from the NRF52840 module to the GPS module as shown.
Insulate the back of the GPS antenna with tape and connect the U.FL. Position it in the case as far away from the other boards as possible so that it faces up and away from obstructions.
If you haven't already, slide the board assembly fully into place.
Carefully install the case lid, taking care not to pinch wires. You may want to use some tape to keep the longer wires in place at the side of the case, away from the protruding parts of the lid.
If built as described here, this node can be powered by either USB or the internal 1 S Lithium battery.
When the battery switch is on (towards the SMA jack), the battery is connected to both the battery terminal of the NRF board and VCC of the E22. If the USB port is plugged in when the battery switch is on, the onboard charger will charge the 1000 mAh battery in about 3 hours, assuming you shorted the square pads as suggested.
When the battery switch is off (towards the case), the battery is completely disconnected, and the USB voltage is connected to the B+ pad and VCC of the E22. This means that the battery will not charge with the switch off, and that the node will operate only from USB power.
| Battery Switch | USB Power | Node On | Charging | TX Power |
|---|---|---|---|---|
| On | Connected | ✅ | ✅ | ~1 watt |
| Off | Connected | ✅ | ❌ | ~2 watts |
| On | Not connected | ✅ | ❌ | ~1 watt |
| Off | Not connected | ❌ | ❌ | none |
⚠️ Warning: The antenna MUST be connected anytime USB power is connected or the battery switch is on, including when charging, to avoid damaging the E22 module.
When the antenna is installed, it helps protect the battery switch from being inadvertently changed. The 3D design files include an optional safety device which, when screwed onto the SMA jack, will prevent the battery switch from accidentally being turned on. Use this in case you wish to carry the node with the antenna detached. If you really must charge the battery without an antenna connected, connect a 50-ohm load.
When operating on battery power, the voltage supplied to the E22 module is between 4.2 and 3.0 volts. The maximum output power of the E22-900M33S will vary from about 1.2W to about 0.5W as the battery voltage drops.
When operating on 5-volt USB power with the battery switch off, the E22 is
capable of a maximum output power of about 2 watts. The Meshtastic firmware
variant diy/easy-nrf-pro-micro_e22 is configured to expect battery
voltage, thus, when powered via 5-volt USB, configuring the node for 30 dBm
(1 watt) output should produce about 33 dBm (2 watts).
Because they are designed for higher current applications, many cheap battery protection boards are set to cut off at less than the safe minimum of 3.0 volts. To avoid damaging your battery or reducing its service life, it is recommended to monitor the battery voltage and turn off or charge your node before the battery is exhausted.
When charging, the blue LED will remain lit until the battery is 80-90% charged. Then it will cycle on and off at various intervals while the charge is completed and maintained.
When running from battery power, the red LED closest to the USB connector will periodically flash very briefly. When running from USB power, it will flash every 2 seconds.
If you installed and enabled the GPS, its LED will light while looking for a fix. It will flash at 1 Hz when a fix is obtained and turn off when when idle.
This style of construction can also be used in a solar node. The E22 ground plane does reduce the Bluetooth range and makes it more directional which is usually not a problem for a pocket node, but if you need to update a solar node OTA, you may want to remove the red chip antenna and solder the coax to an external antenna in it's place. Note that the second pad which the chip antenna is soldered to is not a ground, so you will need to find another ground, perhaps by carefully removing some solder mask from the ground plane in a convenient location.
When used with a solar power manager which provides a 2 amp 5 volt regulated output, you can connect it to the B+ pad. In this case wire the resistor voltage divider to the lithium battery positive terminal instead of the B+ pad.
A big thank-you to Bob Van Valzah for testing the node and reviewing and improving this document!































