Wireless Stick node hangs after a few days

Hello,

I have more than 200 hundred wireless stick nodes spreads in my company.

40% of then just stop to work after a days or months.

I Just stops to work and start to consume to much battery.

They are LoRa nodes connected to adxl345.

I’m using am timerAttachInterrupt in order to reset the module if it blocks somehow.

Can you give me any suggestion? This is a big issue for me.

hi,

could you provide more details? Is the development board completely malfunctioning? Can lora transfer data normally?etc…

I have same issue. Module hangs several times a day.

Hello @jasonXu,

They work just fine sending dota and measure vibration, however somehow the just stop to work after a deep sleep. And they dont come back. This is my way to try to prevent to block using an watchdog. Do you have better suggetion?

void IRAM_ATTR resetModule(){
ets_printf("(watchdog) reiniciar\n"); //imprime no log
//esp_restart(); //reinicia o chip
heltec_sleep();

}

void configureWatchdog(){
timerWD = timerBegin(0, 80, true); //timerID 0, div 80
//timer, callback, interrupção de borda
timerAttachInterrupt(timerWD, &resetModule, true);
//timer, tempo (us), repetição
timerAlarmWrite(timerWD, 4000000, true);
timerAlarmEnable(timerWD); //habilita a interrupção
//watchdog to avoid stay waked up for a long time
}

void heltec_sleep(){
LoRa.end();
LoRa.sleep();
delay(50);
pinMode(5,INPUT);
pinMode(14,INPUT);
pinMode(15,INPUT);
pinMode(16,INPUT);
pinMode(17,INPUT);
pinMode(18,INPUT);
pinMode(19,INPUT);
pinMode(26,INPUT);
pinMode(27,INPUT);
pinMode(2,INPUT);
rtc_gpio_isolate(SDA);
//rtc_gpio_isolate(SCL);
Heltec.VextOFF();
//saveBatNewHighRef(1000);
delay(5);
Serial.println("*********************************************");
Serial.println(“Going to sleep now”);
delay(5);
esp_deep_sleep_start();
}

hi,

The watchdog of ESP32 is automatically configured by ESP32. You can try to restore the watchdog configuration.

@jasonXu you mean with any code added? Or Could you give me an example to try in my side?

We have conducted some tests these days, and it seems that no problems have been found. Is it possible that the hangs devices have some problem in low power consumption, causing the battery to run out?

Did you tested the battery voltage of the hangs devices?

1 Like

Hello, I have a really big issue with this. Now almost every node that were installed just stopped. When I check the nodes battery it was drained probably because it froze somehow. Another application with lorawan + adlx running also have stopped, another with a lora + JSN-SR04T also has stopped. I really need some help on this issue otherwise we cant use heltec anymore.

Could you post your code? Which frequency band are you using?

1.Are all the battery that node stop drained?Whether it’s the battery problem that battrery is not good for low temperature?
2.Have you tested the power when the node into deepsleep mode?How much is the current? The lowest current is about 15uA in deepsleep if you set your gpio to right mode before deepsleep.

more question, have you calculated how long the node can work with your battery Ideally.

@Supporter
Are all the battery that node stop drained?
Yes
Whether it’s the battery problem that battrery is not good for low temperature?
Is a Panasonic 2x 2600 mAh pack. It is now really submited to high temparetures. We expect temp lower than 50 ºC
Have you tested the power when the node into deepsleep mode? How much is the current? The lowest current is about 15uA in deepsleep if you set your gpio to right mode before deepsleep.
Yes. Around 45 uA. But it change around 25 uA to 60 uA. Depends on the Heltec Board.

About the GPIO’s

void heltec_sleep(){
LoRa.end();
LoRa.sleep();
delay(50);
pinMode(5,INPUT);
pinMode(14,INPUT);
pinMode(15,INPUT);
pinMode(16,INPUT);
pinMode(17,INPUT);
pinMode(18,INPUT);
pinMode(19,INPUT);
pinMode(26,INPUT);
pinMode(27,INPUT);
pinMode(2,INPUT);
rtc_gpio_isolate(SDA);
//rtc_gpio_isolate(SCL);
Heltec.VextOFF();
//saveBatNewHighRef(1000);
delay(5);
Serial.println("*********************************************");
Serial.println(“Going to sleep now”);
delay(5);
esp_deep_sleep_start();
}

Band 915 MHz. The code is quite of big, however I can send in your email if you send to me.

You can set all the gpios you used to INPUT mode before deepsleep until get below 15uA in sleep.
How long is your time interval to send data? And I think you have better to have test the follow paras to caculate the time that battery can works:
1.How long the battery can work in a fixed current (such as 100mA) in the really tempareture environment.
2.How long the board wake up when it send data every time, and how mach is the current when it sending.
3.Before the battery connected to board, is it fully charged?

Yesterday we received your code in email,your time interval is 120s. I think it works for serveral months is normal.

You can set all the gpios you used to INPUT mode before deepsleep until get below 15uA in sleep.

I already do that, PIN 15, for PIN 4 ( SDA) I use the rtc_gpio_isolate because just the INPUT mode didnt resolve.

How long is your time interval to send data?

120 s

How long the battery can work in a fixed current (such as 100mA) in the really tempareture environment.
BATTERY%202

2.How long the board wake up when it send data every time, and how mach is the current when it sending.

BATTERY%201

3.Before the battery connected to board, is it fully charged?

Yes, we charge with the heltec stick lite until the led is on. Another problem is many batteries after it hangs cannot be charged anymore. The led just dont turn on with the usb charger.


If you selected CPU freq 240MHz, switch to 80MHz that can reduce about 30mA when wake up.
And I think set your interval time longer is the most effective to reduce the power

I ll change the CPU frequency ! Nice tip! However the quantity of months without hanging was ok! Of course is better to increase that, but the real problem is when it froze without external reason.

I think you can add this:each time wake up, detect the battery voltage,if it lower than a safe value, send a battery alarm and don’t send any more to protect the battery.