This is a basic battery powered LoRa weather station based around a Bosch BME280 and Heltec CubeCell HTCC-AB01 development board. Data is sent via The Things Network (TTN) to your choice of dashboard!
Thanks to the built in battery management and solar charging functionality of this board, as well as ultra low power consumption, we're finally able to put LoRa-connected sensors almost anywhere we want! I started out with this board building a simple weather station based on a BME280 sensor to record temperature, humidity and barometric pressure and test how long a battery will last using this board.
This is a port of https://github.com/chrisys/mini-lora-weatherstation to PlatformIO.
Main differences to the original project:
- Ported to PlatformIO
- Supports Cayenne LPP
- It uses the Adafruit BME280 Library, because this library allows to compensate wrong temperature readings
- Bosch BME280 breakout board (AliExpress - I chose these because the pinout exactly matches that of the dev board enabling you to solder it straight on)
- Heltec CubeCell HTCC-AB01 (AliExpress - be sure to select the correct LoRa frequency for your country)
- 3.7V LiPo cell (I'm using a 650mAh one) with a micro JST connector
- Optional: 6V 110x60mm solar panel (AliExpress)
- Platform IO I'm happily using the VS Code extension.
- CubeCell framework in PlatformIO
- A free TTN account (register here)
- You need to be in range of a TTN gateway (here's a map) or have built or bought your own gateway.
To decode the data on the TTN side, a custom payload format decoder function is required. This is included in payload-decode.js
. Simply paste the contents of this file into the Decoder
input area under Payload Formats
within the TTN console.
I used a Creality Ender 3 loaded with white PETG filament to print this case. Word has it that PETG is a good material to use for outdoor items that are going to be exposed to weather and UV. Time will tell.
- 1x Base (mini-lora-ws-base.stl)
- 6x Open layers (mini-lora-ws-openlayer.stl)
- 1x Closed layer (mini-lora-ws-closedlayer.stl)
- 1x Top layer (mini-lora-ws-top.stl)
- Optional: 1x Solar panel bracket
- M4 tap
- M4 stainless steel machine screws (for securing the top layer)
- M2 tap
- M2 stainless steel machine screws (for securing the CubeCell board to the base)
The holes in the top of the posts and in the upright stand for the CubeCell board on the base are tapping size for M4 and M2 respectively. This means that after it is printed you can run a standard tap into the hole and get some decent quality threads.
Once you've printed the parts they should fit together - tolerances should be large enough to cater for minor variations in prints but you may need to clean up the edges of the holes in the layers if your first layer is a bit squashed.
If you're adding a solar panel that layer can be placed between the top layer and the bracket.
Instead of 3D printing, I purchased a complete radiation shield from an online store for about 14€ and used a cable strap to hold the parts in place. The solar panel will be mounted to a post using a separate carrier.
Works as well and was much cheaper than printing all the parts!