LoRa-Node-DHT22

First LoRa node in the real world

Batterie + Solar + 3D Gehäuse + Arduino Pro Mini + RFM95W + DHT22

Finally a real application

Hello friends,

apologize for the rare posts, I’ve been employed in a makerspace for a few weeks now and I’m not coming to write something. Great fun, but documenting here in the blog…

So, as mentioned in the headline: The first node is running 🙂 Sending every 10 Minutes.

Livedata

Temperature:

Humidity:

Battery:

 

Construction

LoRa-Node-DHT22-Solar

The board from the post  “My first own TTN node with self designed PCB” certainly known to you, otherwise read the article;)

The structure is thus very simple. The board has everything we need, the DHT22 temperature sensor is simply soldered to the Arduino and ready.

The solar cell is very small, the battery also only in AA (14500) format. No problem with sunshine. We will see how the combination works in winter! I’m curious! However, the battery should last long enough so that winter should not be a problem.

Data processing

The Things Network -> Payload -> NodeRed -> Thingspeak / own Database / …

LoRa-PCB

Technical specifications

  • Arduino Pro Mini 3.3V (LowPower mods)
  • RFM95W
  • 0.15W 5V solar cell
  • 900mAh 3.7V LiPo
  • Running time about 2 years without sun?
  • 5 days sun to fully charge

Mini-Solar-Cell-0.1W

Runtime Bill

As we learned in the LowPower article here we can expect self-discharge, now and then, deep sleep to consume about 0.04mA.

At 900mAh battery and 0.04mA consumption we come to 900 days. Therefore, winter should not be a problem! Top!

Here’s how the real consumption showed up after 5 months.

LoRa-Node

Code

Affiliate links:

If you order through any of the following AliExpress links, I get about 8% commission 😉

Soshine 4pc 3.7V ICR 14500 900mAh Li-ion
Mini 0.15W 5V Solar Panel
DHT22 single-bus digital temperature and humidity sensor

16 thoughts on “First LoRa node in the real world”

  1. Mario, el código que propones para Arduino no compila. Tienes que tener en cuenta los pines del SPI

  2. Hey Mario,
    mega interessantes Projekt und genau das, was ich gerade suche! Allerdings habe ich das Problem, wenn ich deinen Code per Copy and Paste ausprobiere, dass mir der Fehler für den Arduino Pro Mini angezeigt wird: “Der Sketch verwendet 25280 Bytes (82%) des Programmspeicherplatzes. Das Maximum sind 30720 Bytes.
    Globale Variablen verwenden 2329 Bytes (113%) des dynamischen Speichers, -281 Bytes für lokale Variablen verbleiben. Das Maximum sind 2048 Bytes.”

    Ich hab mit dem RFM95 noch überhaupt keine Erfahrung gesammelt und keine Ahnung, wie ich libraries ausdünnen kann. Wie hat das bei dir geklappt? Wäre dir wirklich sehr für eine Idee dankbar, was ich falsch mache 😀
    LG
    Johannes

  3. Hallo Mario,
    hat sich erledigt, ich habe den Fehler gefunden! Die Libraries haben sich nicht korrekt installiert oder so..

    1. function Decoder(bytes, port) {
      var t = (bytes[0] & 0x80 ? 0xFFFF<<16 : 0) | bytes[0]<<8 | bytes[1]; var h = bytes[2]<<8 | bytes[3]; var b = bytes[4]<<8 | bytes[5]; var p = (bytes[6]<<8 | bytes[7]) * 100 + (bytes[8]<<8 | bytes[9]) / 100; return { temperature: t / 100, humidity: h / 100, battery: b / 100, pressure: p } }

  4. Tolle Idee!
    Habe mir zwei Boards nachgebaut, aber anscheinend sendet keines von beiden…
    Weshalb hast du DIO9 des Arduino nochmal verkabelt?

    Gruß – Sven

    1. Komisch. D9 ist der Reset Pin zum Arduino. Ich habe inzwischen das 10 Board oder so verbaut. I.d.R. klappt alles. Kommst du aus der Nähe Oberhausen?

  5. Hello,
    this seems to be a very nice project. Currently I to try to rebuild this since some days, always when I have a bit of time and I use a breadboard for the first experiments. Connections are fine and a “hello world” example is also working. However, extending the code and implementing a sensor like you show yields already some problems.

    May I ask which versions of the libraries did you install? The current ones seem to be too big such that stability problems occur and the program does not do what is should (I use the serial monitor for debugging).
    – MCCI LoRaWAN LMIC Library – version ???
    – DHT sensor library – version ???
    – Arduino Low Power – version ???
    – Wire – version ???

    Best regards!
    Felix

      1. Hi,
        thanks a lot. I could succeed with IBM LMIC framework (matthijskooijman/IBM LMIC framework 1.5.1). Is this the one you used? It takes between 5-10 min until the µC can join the network. Once it joined, it runs stable. Is this normal?
        I rebuild the project with an ESP32 – just out of curiosity, and the ESP32 setup joins the network almost immediately. I did multiple tries for a conclusive result.
        I will try with STM32 in the near future.

        Best regards!
        Felix

    1. Hello,

      I hope it is not too late.

      PCB:
      https://oshwlab.com/mariozw/TTN-dd5f957581974c02a573633d15e9e668
      https://easyeda.com/mariozw/TTN-dd5f957581974c02a573633d15e9e668

      I still don’t have all the stuff on Thingiverse unfortunately, but I’m happy to share my Fusion360 project. I think you can export whole bodies as STL.
      Not all of the designs I have printed out. Many were just concepts. But they can still fit. I just do not know it anymore 😀

      https://a360.co/35BukKb
      https://a360.co/3bkoQHk
      https://a360.co/3or7ThQ

      Greetings

  6. Super Projekt 😉 Lora ist wirklich ein gutes Thema.

    Ich hab mal versucht dein Projekt nachzubauen, ich bekomme im SerialMonitor aber einen Fehler:

    Packet queued
    128271: EV_JOINING
    238230: Unknown event

    Im Gateway unter Traffic kommt alles an aber unter der Application des Sensor keine Daten? Hast du einen Tipp für mich ?

    grüße Tobi

    1. Hei Tobi,

      ja, du hast die falschen Keys eingetragen. Wenn das Paket nur auf dem Gateway zu erkennen ist, ist irgendetwas falsch.
      Falsche AppKey -> kein entschlüsseln. Falsche DevAdrr -> keine Zuordnung, ..
      Achte darauf, dass die meisten Bibliotheken die Keys in Hex Form haben möchten. Manche in LSB manche in MSB (welches Bit kommt zuerst..)
      Manchmal steht es dabei, manchmal muss man ausprobieren.

      Grüße!

Leave a Comment

Your email address will not be published. Required fields are marked *

%d bloggers like this: