Arduino based board for a Atmospheric Sensor BME280 LoRaWan Node. The LoRa Node measures barometric pressure, humidity, and temperature every 5 min. After the measurements, the ATtiny85 goes into sleep mode and is awakened by the watchdog timer. The RFM module sends the values to the TTN backend with Activation by Personalization (ABP) a fixed spreading factor and one of the four random channels. This project is based on the TinyLoRa-BME280 project [1].
| Ref | Value | Description |
|---|---|---|
| BT1 | 3034 | Battery Cell Holder |
| BT1 | CR2032 | Battery Cell CR2032 (210 – 230 mAh) |
| U1 | BME280 | SparkFun BME280 |
| U2 | ATtiny85-20SU | Atmel 8-bit AVR Microcontroller |
| U3 | RFM95W-868S2 | Low Power Long Range Transceiver Module |
| - | Wire | Wire for the antenna, 8.6 cm |
The ATmega microprocessor needs an arduino bootloader. To burn a bootloader to the blank chip see [2]
| ATtiny85 | RFM95 | BME280 |
|---|---|---|
| PB3 | CS (Slave Select) | |
| PB4 | NSS (Slave Select) | |
| PB2 | SCK | SCK |
| PB1(DO) | MOSI | SDI |
| PB0(DI) | MISO | SDO |
The Arduino IDE has to be properly installed.
Add the Libraries to you IDE:
Install the Attiny Baord Manager
Multiple managers can be separated with a comma.
Install TinyLoRa-BME280 v1.1
Open Examples > TinyLoRa-BME280_v1.1-master > ATtiny_LoRa_BME280
Burn the sketch to the Chip using an Arduino UNO [2]
The Payload is encoded as byte array.
| byte | content |
|---|---|
| 0..1 | temperature (*100) |
| 2..3 | humidity (*100) |
| 4..8 | barometric pressure |
To decode the values add this code in the TTM Console as decoder under Paload Formats.
function Decoder(bytes, port) {
temp = ((bytes[0]) << 8)
+ ((bytes[1]));
hum = ((bytes[2]) << 8)
+ ((bytes[3]));
pres = ((bytes[4]) << 24)
+ ((bytes[5]) << 16)
+ ((bytes[6]) << 8)
+ ((bytes[7]));
return {
pressure: ( pres / 100 ),
temperature: ( temp / 100 ),
humidity: ( hum / 100 )
};
}
License CC BY 4.0 - Attribution 4.0 International