-
Next Step in Debugging Effort
03/07/2019 at 11:07 • 0 commentsAfter a few weeks of running the weather station close to my office, I was able to find out what might be causing it to crash so often. Well, actually, whatever I did in the code made no difference and the crash seemed to be entirely random. This could only mean that there was a problem with the track routing on the PCB, so the design was improved to give logical precedence to the wind instrument data lines, particularly the anemometer, which carries a pulse:
Rebuilding the PCB also gave me the opportunity to incorporate a simple watchdog circuit which would reset the MCU after a crash.
Fortunately, after the rebuild, the frequency of crashes diminished to greater than 3 days. Next step is to implement the watch dog.
-
Debugging
02/16/2019 at 12:11 • 0 commentsAlthough weather stations are normally quite easy projects with relatively simple electronics, they do have their challenges. I am currently using the LORAWAN 1300 mcu and finding that it is stable for about 24 hours and then crashes for no obvious reason. The most obvious culprit is the anemometer which uses the Arduino pulsein function, but it could also be due to my crappy coding or PCB design. Debugging is ongoing and the PCB has been redesigned with priority being given to the signal path from the anemometer.
I've also incorporated a watchdog chip (STWD100NYWY3F) which checks every 1.5 seconds for a heart beat pulse from the MCU. If the heart beat stops, it triggers a reset. The component is quite small but can be soldered without the need for a stencil as it has protruding legs and can easily be tested and replaced if there is a problem.
Obviously, it's still a good idea to find the actual fault in the system!