Building an Environmental Sensor Node
Building an Environmental Sensor Node
This guide walks through assembling a production-ready environmental sensor node using the RAK WisBlock platform with the BME680 sensor, then configuring it for MeshCore firmware deployment.
Bill of Materials
- RAK19007 WisBlock Base Board (v2)
- RAK4631 WisBlock Core (nRF52840 + SX1262)
- RAK1906 WisBlock Sensor (BME680)
- LoRa antenna (868 MHz or 915 MHz depending on region), SMA-to-IPEX pigtail
- 3.7 V LiPo battery (1000 - 3000 mAh) with JST 2.0 connector
- In-line fuse or polyfuse for the LiPo positive lead (outdoor/lithium safety)
Safety note: A single-cell LiPo must never be charged below 0 °C (32 °F) - doing so plates lithium and risks a cell fault or fire. If this node will be deployed where winter temperatures drop below freezing, use a charger/PMIC with a low-temperature charge cutoff (NTC-based), and verify the RAK19007's cold-charge behavior before cold-weather deployment. Always include an in-line fuse on the battery positive lead.
Assembly Steps
- Prepare the base board. The RAK19007 features
threefour sensorslot connectorsslots (SlotA, B,C/C, D); slots A-C take 10 mm modules and slot D takes larger 23 mm modules (and supports GNSS). No soldering is required - all WisBlock modules use proprietary 40-pin or 24-pin board-to-board connectors. Press the RAK4631 core firmly onto the core slot until it clicks. - Attach the BME680 sensor module. The RAK1906
fitsis an I2C sensor and can go in any of the I2C sensor slots (A-C for 10 mm modules); Slot A(is just a convenient default. It uses the 24-pinconnector).connector. Align the gold contacts and press until seated. The module sits flush with the base board surface. - Connect the LoRa antenna. Attach the IPEX end to the U.FL connector on the RAK4631 (labelled LoRa). Ensure the antenna is fully connected before powering on to avoid PA damage. Route the SMA pigtail through a cable gland in the enclosure wall.
- Connect the battery. Plug the JST 2.0 LiPo connector into the battery port
on the
RAK19007.RAK19007 - verify connector polarity first, as RAK battery-connector polarity is not universal across LiPo vendors. The base board includes an onboardBQ25504 PMIC handles charging via theUSB-Cport.LiPoBalancecharger that stops charging once the battery is full. Over-discharge protectionandgenerallyover-dischargecomescut-offfromarethebuiltbatteryin.pack's own protection circuit (PCM) rather than the base board, so use a protected cell. - Flash the firmware.
Use the MeshCore SENSOR variant.Download thelatestappropriate RAK4631 MeshCore firmware.uf2file(e.g.foraRAK4631CompanionSENSORor Repeater build) from the MeshCore GitHub releases page. MeshCore has no dedicated "SENSOR" firmware variant - sensor support is a compile-time feature selected at build time, so confirm a sensor-capable build before relying on one. (Alternatively you can flash standard Meshtastic firmware, whose Telemetry module supports the BME680 directly.) Put the RAK4631 into bootloader mode (double-tap reset - the driveRAK4631should appear), then drag-and-drop the.uf2file.
Firmware Configuration
After flashing, connect over USB serial (115200 baud) or BLE (via the companion app / meshcore-cli) to
configure the node:node. The MeshCore device CLI uses commands such as:
set telemetry_intervalname 900"SensorNode-01" # SendSet sensorthe datanode everyname
15gps minutes
set gps_enabled 0off # Disable GPS for indoor/static nodes
set power_saveadvert.interval 115 # EnableAdvert deepcadence sleepin betweenminutes transmissions(or set node_nameflood.advert.interval "SensorNode-01"in savehours)
reboot
TheNote: MeshCore has no set telemetry_interval, set gps_enabled,
set power_save, or set node_name command - those are Meshtastic-style
names that do not exist in MeshCore. Power saving (powersaving on) is documented as
a repeater-role feature. If you are running Meshtastic instead, set the environment telemetry
interval with meshtastic --set telemetry.environment_update_interval 900.
In Meshtastic, a supported BME680 sensoron the I2C bus is auto-detected viaat startup; MeshCore selects
sensor hardware at compile time rather than by an I2C busauto-scan. scanOnce configured, confirm
telemetry is being produced on boot.a Verifylistener readingsnode appearor invia the serialtelemetry log:request BME680:protocol. T=22.3COn H=54.1%the
P=1013.2hPaBME680's IAQ=58. An0-500 IAQ valuescale below(which requires the Bosch BSEC library and a calibration period):
0-50 indicatesgood, good51-100 airmoderate, quality; above 101-150 indicateslittle moderatebad pollution./ unhealthy for sensitive groups, 151-200 bad,
201-300 worse, 301-500 very bad.
Enclosure and Weatherproofing
Drill two M16 cable gland holes in the bottom face of the enclosure - one for the LoRa antenna SMA cable and one for a USB-C charging cable if periodic wired charging is desired. Thread the cable glands and tighten until the rubber grommet compresses around the cable. Place the desiccant packet inside and install the Gore-Tex vent plug on a side wall to allow pressure equalisation without moisture ingress. Apply silicone sealant around any remaining penetrations.
Mount the PCB assembly on the supplied standoffs inside the enclosure using M3 screws. Ensure the BME680 sensor on the RAK1906 faces toward the vent plug - airflow across the sensor significantly improves humidity response time and reduces self-heating error.
Label the outside of the enclosure with the node name, installation date, frequency region, and an emergency contact. Photograph the final assembly before sealing for maintenance records.
Commissioning Checklist
- Antenna connected before power-on
- Firmware version confirmed in boot log
- Sensor readings visible in serial output
- Node appearing in MeshCore network map within expected hop count
- Telemetry packets visible at expected interval on a listener node
- Enclosure sealed, cable glands tightened
- In-line fuse fitted on the battery positive lead