DHT22 sensor node locked up with blinking LED
-
I had my first sensor node (1) lock up last night. It's a standard DHT22 sensor node, battery powered, 10k resistor on DHT22. Located on the patio so basically subjected to cold weather close to freezing these last couple of days. Using 1.4 code base from the middle of September. The sensor has been running and reporting data pretty much flawlessly for the past 3-4 weeks.
When I went to examine the sensor I expected the batteries to be dead or something but instead the activity light was blinking, not unlike the default blink example. Resetting the device seems to have brought it back into the fold. Haven't done any other troubleshooting yet.
Any ideas about this?
-
Can you connect to the serial output of the sensor? Is is printing out something?
-
@bjornhallberg GOOD LUCK finding the cause of that one.. This thread brings back scary memories for me... Perfect day for it I guess..
-
@daulagari I could I guess, but it's too late now as I reset the node and it has been working for a day without any hickups. May work for weeks before it happens again. I assume it wouldn't be printing anything of interest as long as it is working. Also, doesn't the arduino auto-reset when you open a serial monitor (assuming you kept the batteries connected while moving it to the computer in the first place) unless you apply some resistor hack or some such?
But what would cause this weird blink behavior? What is there in the code to control the LED? The only blink I've seen is the ever so slight blip when the radio transmits or whatever it is. This was a great deal longer in duration, hundreds of milliseconds, much like the blink example. Kind of like a boot-loop in other terms.
I should go check the batteries first thing I do and see what happened to them at any rate.
-
@bjornhallberg As it's battery powered, I suppose it is a sleeping sensor, right?
What bootloader do you use?
Does your sketch do anything watchdog related?
Any idea of the delay between the blink patterns?
-
@Yveaux Yes, it is sleeping for 10 minutes before checking the sensor again. I use the standard bootloader afaik. No changes since I got it from Ebay. The APM is also a standard Ebay/Ali model as it looked a few months ago.
Sketch is completely stock directly from the repository.
I'd say that the blinks are pretty much like the "blink example", so up to 1000 ms on / 1000 ms off.
-
@bjornhallberg Google a bit. There are multiple posts on the net of Arduino's getting stuck in watchdog reboots because it fires and doesn't get disabled correctly on startup. Some bootloaders handle this situation better then others.
Only question is why the watchdog timer would trip...