Nano + RFM95-Sensor sendet auf einer Powerbank einen einzigen LoRaWAN-Uplink und verstummt dann
Von English mit KI übersetzt ·
Ich leite ein Hotel und baue meinen ersten LoRaWAN-Sensor, daher entschuldige ich mich für offensichtliche Fehler, die mir vielleicht entgehen. Es handelt sich um einen Temperatursensor für den Technikraum des Schwimmbads: Arduino Nano, RFM95W-Modul, DS18B20, die MCCI-LMIC-Bibliothek, OTAA, EU868. Unser LoRaWAN-Gateway ist in Hermetry registriert, und der Sensor ist als OTAA-Gerät hinzugefügt. Die Skizze sendet alle 10 Minuten und schläft dazwischen mit der LowPower-Bibliothek.Über USB am Laptop läuft er tagelang. Der LoRaWAN-Tab des Geräts zeigt Joined, und Messwerte kommen an.An einer 10.000-mAh-USB-Powerbank (geplant ist, sie alle paar Wochen zu tauschen) tritt er dem Netz bei, sendet genau einen Uplink und dann nichts mehr. Das Frames-Protokoll zeigt den Join und einen Uplink, danach Stille. Wenn ich die Powerbank abziehe und wieder anstecke, passiert dasselbe: Join, ein Frame, Stille. Das Gerät wird nach einigen Stunden als offline angezeigt.Gleiche Skizze, gleiches Board, nur die Stromquelle ändert sich. Was könnte die Powerbank am Code verursachen?
I manage a hotel and I’m building my first LoRaWAN sensor, so apologies for missing obvious things. It’s a temperature sensor for the pool plant room: Arduino Nano, RFM95W module, DS18B20, the MCCI LMIC library, OTAA, EU868. Our LoRaWAN gateway is registered in Hermetry and the sensor is added as an OTAA device. The sketch sends every 10 minutes and sleeps in between with the LowPower library.
On the laptop USB it works for days. The device’s LoRaWAN tab says Joined and readings arrive.
On a 10,000 mAh USB power bank (the plan is to swap it every few weeks) it joins, sends exactly one uplink, and then nothing. The frames log shows the join and one uplink, then silence. When I unplug and replug the power bank it does it again: join, one frame, silence. Device shows offline after a few hours.
Same sketch, same board, only the power source changes. What could the power bank do to the code?
Von English mit KI übersetzt ·
Vielleicht ist die Spannung der Powerbank zu niedrig? Probier mal eine 9-V-Batterie an VIN, die habe ich bei meinem ersten Arduino benutzt.
Maybe the power bank voltage is too low? Try a 9 V battery into VIN, that’s what I used on my first Arduino.
Von English mit KI übersetzt ·
Ein 9-V-Block hält mit dem Regler und der LED des Nano keine Woche durch. Ich würde das nicht machen.
A 9 V block won’t last a week with the Nano’s regulator and LED. I’d not go there.
Von English mit KI übersetzt ·
Die Powerbank schaltet sich selbst ab. Genau das hatten wir letztes Jahr bei uns am Objekt mit einem Türzähler.Die meisten Powerbanks schalten ihren Ausgang ab, wenn die Last für einige Sekunden unter etwa 50-100 mA fällt, weil sie denken, das Handy sei voll. Dein Nano zieht während des Funkversands weit mehr als das, und im Schlafmodus per LowPower nur wenige mA (oder weniger). Also: Join, erster Uplink, Schlaf, die Powerbank sieht kaum noch Strom, Ausgang aus. Im Code lässt sich dagegen nichts tun. Ein Neustecken startet die Powerbank neu.Auswege, nach dem was wir ausprobiert haben:
- Eine Stromquelle ohne diese Funktion verwenden: 3 x AA-Alkalibatterien direkt an den 5-V-Pin sind für ein Nano (4,5 V) eine Weile in Ordnung, besser ist aber ein LiPo mit einem guten Regler mit niedrigem Ruhestrom. Ein nackter Pro Mini mit 3,3 V und entferneter Power-LED läuft mit AAs monatelang.
- Manche Powerbanks haben einen Modus „Always on“ oder für geringen Strom, meist durch zweimaliges Drücken der Taste. Schau ins Handbuch.
- Dummy-Lasten, die Impulse ziehen und die Powerbank wach halten, funktionieren, verbrauchen aber den größten Teil des Akkus.
Passe außerdem Hermetry an den Sensor an. Beim eingebauten LoRaWAN-Profil gilt das Gerät als online, solange der letzte Uplink jünger als das Dreifache des erwarteten Intervalls ist; das Standardintervall ist 3.600 s. Bei einem Uplink alle 10 Minuten passt alles. Wenn du zum Stromsparen auf stündlich oder seltener umstellst, erhöhe das erwartete Intervall im Reiter Online-Status des Profils, sonst wechselt es zwischen den Meldungen auf offline. Das steht in Troubleshooting uplinks and downlinks.
It’s the power bank switching itself off. Had exactly this at our property with a door counter last year.
Most power banks shut their output down when the load drops below somewhere around 50-100 mA for a few seconds, because they think the phone is full. Your Nano draws far more than that while the radio is sending, and a few mA (or less) when LowPower puts it to sleep. So: join, first uplink, sleep, power bank sees almost no current, output off. Nothing for the code to do about it. Replugging restarts the bank.
Ways out, from what we tried:
- Use a power source without that feature: 3 x AA alkaline straight to the 5 V pin is ok for a Nano (4.5 V) for a while, or better a LiPo with a decent low-quiescent regulator. A bare Pro Mini at 3.3 V with the power LED removed runs for months on AAs.
- Some power banks have an „always on“ or low-current mode, usually a double press of the button. Check the manual.
- Dummy loads that pull pulses to keep the bank awake work, but they waste most of the battery.
Also adjust Hermetry so it matches the sensor. On the built-in LoRaWAN profile the device counts as online while the last uplink is younger than three expected intervals, with 3,600 s as the default interval. At one uplink per 10 minutes you’re fine, but if you stretch it to hourly or longer to save battery, raise the expected interval on the profile’s Online status tab, otherwise it flips to offline between reports. That bit is in Troubleshooting uplinks and downlinks.
Von English mit KI übersetzt ·
Danke, emily! Du hattest recht, ich habe es nachgemessen: Die Powerbank schaltet etwa 30 Sekunden nach dem ersten Uplink ab. Meine hat keinen Dauerbetriebsmodus, deshalb habe ich auf 3 x AA am 5-V-Pin umgestellt und die LED entfernt. Seit gestern hat er 140 Uplinks gesendet. Der nächste Schritt ist ein Pro Mini, wie du gesagt hast.
Thank you emily! You were right, I measured it: the bank cuts out about 30 seconds after the first uplink. Mine has no always-on mode, so I moved to 3 x AA on the 5 V pin and took the LED off. It has sent 140 uplinks since yesterday. Next step is a Pro Mini like you said.
Von English mit KI übersetzt ·
Ok, dann vergiss die 9-V-Idee einfach 😅
ok, never mind the 9 V idea then 😅
- Du musst angemeldet sein, um auf dieses Thema antworten zu können.
Mitdiskutieren
Melde dich an, um Fragen zu stellen und zu beantworten, hilfreiche Beiträge mit „Gefällt mir“ zu markieren und die Antwort zu kennzeichnen, die dein Problem gelöst hat. Jeder Beitrag bringt Punkte und Stufen.

