Needing to reset sensors constantly



  • I have built several sensors (PIR sensors, dust sensors, and distance sensors) using 5V Nanos that all work but need to be reset every couple weeks because they keep going down. All of them are connected via phone charges to the outlets. I am not sure what the problem is exactly. Some of them are more reliable than others, but it has nothing to do with distance to the gateway as the one closest to the gateway fails just as often as the one furthest from it. What can I do to improve reliability/durability?


  • Mod

    I recommend starting by checking the "power issues" flowchart at https://forum.mysensors.org/topic/666/debug-faq-and-how-ask-for-help especially if you are using nrf24.

    The most thorough way to find out what's wrong is to capture the debug output. Since we're talking long-term logging, sundberg84's logger machine can be useful.


  • Mod

    Try swapping power supplies around to see if problem follows the power supply, later you could try the radio modules


  • Hardware Contributor

    @igpels do you have any fluctuations in the power mains ? As mentioned it's most likely power issues if all nodes just randomly freeze. Or do you use any unregular code? A watchdog timer could be good but finding the issue best.



  • @igpels Which radio are you using?



  • @sundberg84 I use the example code for all sensors. I am not sure about the mains power fluctuations, how would I check that?

    @gohan I changed all the chargers when I first had problems, I hope the problem is elsewhere. I am using 5V 2.5A mini usb chargers

    @manutremo I am using NRF24L01+, bought from the ebay link on connecting radio page


  • Mod

    You could try to install boards definitions 1.6.11 in Arduino ide. Did you add a watchdog in the code? Also you could add a good size capacitor on vcc and gnd to help smoothing fluctuations.


  • Hardware Contributor

    @igpels said in Needing to reset sensors constantly:

    @sundberg84 I use the example code for all sensors. I am not sure about the mains power fluctuations, how would I check that?

    Well, if you dont have regular fluctuations in the lights and other electric components that behaves strange I guess the AC mains are fine.

    A long term logging would be good to exclude software issues. I have one node sitting and the radio range edge and sometimes it doesnt reach and re-initialise the radio call/route for the gw.

    Another thing is to add some bigger capacitors on the 5v input to smooth the power if this is needed.



  • It certainly looks to me like some issue with power supply.

    Have you added a capacitor close to the power pins of the radio?

    It's also a good idea to power the radio directly from the power supply instead of through the arduino supply which is very limited.


Log in to reply
 

Suggested Topics

  • 4
  • 2
  • 3
  • 17
  • 20
  • 9

23
Online

11.4k
Users

11.1k
Topics

112.7k
Posts