LoRaWAN, RN2483 and BME680

Some of the best moments are those when exciting technologies come together to create even greater products or results. This is such an example.
cisco_IR900_lora_ lora_card rn2483_lora
Taking advantage of the latest IoT advancements, the LoRaWAN is a network protocol intended for wireless battery operated Things. Geographic areas ranging from the size of a city to the size of an entire country can be covered with just a few LoRa base stations, finally offering a viable IoT connectivity solution with minimal infrastructure. Read more on LoRa on the Lora Alliance website. LoRaWAN data rates range from 0.3 kbps to 50 kbps.
Microchip’s RN2483 is a dual 433/868 MHz module based on wireless LoRa® technology. It comes with LoRaWAN Class A protocol embedded, so it’s really an excellent way to get started right away.
Finally, the Bosch BME680 is no stranger to this blog, as it was already used in the uRADMonitor model D as a low power, feature rich sensor, for measuring temperature, pressure, humidity and VOC for air pollution.
Thanks to the excellent Innovation Labs initiative, supported by Orange, Tech Lounge and Cisco, I got my hands on an industrial Cisco IR900 router with a 868MHz Lora board, a RN2483 test board and several RN2483 SMD modules. The LoRa backend is implemented by Flashnet. After participating at the MWC2016 in Barcelona I had promising ongoing talks with several LoRa related companies, yet amazingly a local Romanian joined effort brought me all the hardware in record time. I put them to some good use right away: the plan was to build a low power, long life environmental surveillance unit, powered by a single CR2032 battery using LoRa for data upload.

Remote environmental sensor

LoRa and the low power BME680 are perfect for the job. A single CR2032 will satisfy all our power requirements for this application. I designed the circuit
lora_bme680_pcb
The board was double layer, and using toner transfer and ferric chloride, it came out perfect:
lora_bme680_pcb_1 lora_bme680_pcb_2 lora_bme680_pcb_3
The PCB files are available here.

The assembled device

The detector uses an Atmega328p which is set to sleep most of the time. It currently transmits approximatively once per every minute, using the watchdog to wake up. The transmission lasts for half a second, and the consumption during that time is an average of 12mA. The FT232 is there mostly for debugging purposes while developing the software, but can also be used to get the data via cable. You can leave it aside. The 8MHz external crystal is not used, we go for the internal oscillator to save power. The BOD is also disabled.
lora_bme680_circuit_1 lora_bme680_circuit_2 lora_bme680_circuit_3

3D Printed case

I designed a plastic case using 123D Design, and had it printed right away with the 3D printer I shown you a while back. The printer’s heat bed got a little attention too: it was already installed, but not connected due to lack of time. So now the printer was able to use this as well. The results? Not bad: the plastic case needed some minor adjustments, but eventually fitted the device nicely.
lora_bme680_box_1 lora_bme680_box_2 lora_bme680_box_3

Download the gcode files here.

The software

This part was a little more complicated. To achieve the goal we need two things: the firmware running on the atmega328, driving the functionality of the entire circuit, and secondly: handling the backend part of LoRaWAN, to retrieve the actual data transmitted wirelessly and do something useful with it.
LoRa-network
If you look at the image above, you’ll get an idea on the implementation. The firmware reads the BME680 sensor approximatively once per minute (we’re using the watchdog, so time intervals are not accurate).
eclipse_code_bme680
With this data, we wake up the RN2483 which is also sleeping regularly, and have it transmit the data before going back to sleep. The data goes to the LoRaWAN backend, in this case, a Flashnet server (thank you, guys!)
LoRaWAN_backend_bme680
The 24 bytes payloads represented as hex are encrypted arrays holding identification information as well as sensor data, in this case they hold all the important parameters including temperature, pressure, humidity and voc measurements from the BME680, as well as device ID, software and hardware version and battery voltage to measure discharge.
cron_script_lora
A cron based script running on a second server, regularly polls this data, decrypts it and decodes it to then add it to the database. Finally, from there the data goes to any frontend consumer, including the uRADMonitor website and the Android application released for uRADMonitor.
lora_bme680_uradmonitor_air
This unit is experimental, but you can see the live data on the uRADMonitor website.
So what we do here is to demonstrate a remote battery application over LoRa, while implementing a small size, self sufficient environmental monitor for air pollution, using the BME680. This tiny box could be installed in a remote location and left to run continuously for several years.

This article has 18 Comments

  1. Hi mate
    I dont understand how you receive the data. You have got transceiver modul RN2483 . What modul i am suposed to use for receiving data ???
    Me1

  2. The RN2483 talks to the Lora gateway, the IR900 Cisco router you see in the pictures.

  3. Cheers Radu. I am sorry , I have dificulties to see last picture. I can see all pictures apart from last one….strange error. Anyway, I like your projects, specialy GM counters…

  4. Hello,

    Thanks a lot for sharing your experiences with the community, I would also like to make a similar sensorboard, can you please tell me who to contact to ask for BME680 samples.

    thank you for your help
    rifo

  5. Dera Radu, If I only use the RN2483 with arduino, what capacity of filter (capacitor) in 3.3v recomend me?.

    Thanks for your answer.

    Regards

    Héctor.

  6. I don’t think it would be critical. Go for a few hundred uF and you should be ok.

  7. Hi, i need the Pinout and Board layout for the BME680.
    Do you have any Datasheet?

    PLEASE 🙂

  8. As I am under NDA with Bosch, I can’t release the BME680 code. What else are you interested in ? The RN2483 communication is trivial.

Leave a Reply