Basics Of Remote Cellular Access: Watchdogs

When talking about remote machines, sometimes we mean really remote, beyond the realms of wired networks that can deliver the Internet. In these cases, remote cellular access is often the way to go. Thus far, we’ve explored the hardware and software sides required to control a machine remotely over a cellular connection.

However, things can and do go wrong. When that remote machine goes offline, getting someone on location to reboot it can be prohibitively difficult and expensive. For these situations, what you want is some way to kick things back into gear, ideally automatically. What you’re looking for is a watchdog timer!

Continue reading “Basics Of Remote Cellular Access: Watchdogs”

The Clementine Spacecraft

Preventing Embedded Fails With Watchdogs

Watchdog timers are an often overlooked feature of microcontrollers. They function as failsafes to reset the device in case of a software failure. If your code somehow ends up in an infinite loop, the watchdog will trigger. This is a necessity for safety critical devices. If the firmware in a pacemaker or a aircraft’s avionics system gets stuck, it isn’t going to end well.

In this oldie-but-goodie, [Jack Ganssle] provides us with a great write up on watchdog timers. This tells the story of a failed Clementine spacecraft mission that could have been saved by a watchdog, and elaborates on the design and implementation of watchdog techniques.

If you’re designing a device that needs to be able to handle unexpected failures, this article is definitely worth a read. [Jack] explains a lot of traps of using these devices, including why internal watchdogs can’t always be trusted and what features make for a great watchdog.

Thanks to [Jan] for the tip!

3D Printer Guardian Watches For Worst-case Failures

Some devices have one job to do, but that job can have many facets. To [jmcservv], an example of this is the job of protecting against worst-case failures in a 3D printer, and it led him to develop the 3D Printer Watchdog Guardian. When it comes to fire, secondary protection is the name of the game because it’s one thing to detect thermal runaway and turn off a heater, but what if that isn’t enough? The MOSFET controlling the heater could have failed closed and can no longer be turned off in a normal sense. In such cases, some kind of backup is needed. Of course, a protection system should also notify an operator of any serious problem, but what’s the best way to do that? These are the kinds of issues that [jmcservv] is working to address with his watchdog, which not only keeps a careful eye on any heating elements in the system, but can take a variety of actions as a result.

Some outcomes (like fire) are bad enough that it’s worth the extra work and cost of additional protection, and that’s the thinking that has led [jmcservv] to submit his watchdog system for The Hackaday Prize.

Arduino Watchdog Has Bite And Doesn’t Need Treats

My dog Jasper isn’t much of a watchdog: he’s too interested in sleeping and chasing my cats to keep an eye on things. Fortunately, [Vadim] has come up with a more reliable alternative with this simple Arduino watchdog. It’s designed to work with crypto coin mining rigs, but it could be easily adapted for other high-uptime uses, such as file servers or doomsday weapons.

Continue reading “Arduino Watchdog Has Bite And Doesn’t Need Treats”

Hackaday Links Column Banner

Hackaday Links: May 25, 2014

[Matt] wanted his own light saber. You could argue that this is nearly as dangerous since you can’t see the beam and it doesn’t end a few feet past the business end of the grip. Plus there’s that who “not actually a Jedi” thing.

We don’t know if retro computing fans are going to love or hate this (translated). On the one hand it’s pretty cool to see a ZX81 clone up and running. On the other hand, an Amiga 600 case was sacrificed to serve as the body for the hack. [Thanks Juan]

Watchdog timer. If you know what that is your mind immediately says “good idea” when you hear the word. If you don’t know, you need to learn. Watchdogs are reset timers that are built into most microcontrollers. If your firmware gets stuck and doesn’t maintain the timer’s counter at a regular interval the watchdog it will perform a hardware reset and hopefully your hardware will start functioning again. Here’s a guide for using the watchdog in an Arduino, but the concepts are pretty much universal.

We see all kinds of stepper-motor based music machines. One of our favorites was this recent floppy drive jukebox. But not every song is going to sound good on this type of hardware. One that does sound especially neat is the Doctor Who theme on an array of 8 drives.

And finally, if you’re struggling with surface mount soldering we recommend grabbing two soldering irons. But in a pinch just grab some heavy gauge copper wire and wrap it around your soldering iron tip. It ends up being a two-point soldering iron set for the size of specific components such as 0805 resistors. [Thanks Rupert]

Task Scheduler For Arduino

For their recent high altitude balloon project LVL1 member [Brad] programmed a pretty complicated brain based on an Arduino. It was responsible for collecting data from all of the sensors, and reporting back in a few different ways. One of the things he did to simplify the project was develop a task scheduler for the Arduino board. It lets you add functions to a queue of jobs, along with data about when they should be run.

The task scheduler does make coding a bit easier, but where it really shines is in situations like this where you don’t have access to the hardware if there’s a problem. In his description of the scheduler [Brad] mentions the possibility that one of the sensors could fail as the cold of the upper atmosphere takes its toll. This could leave the whole system stuck in a subroutine, and therefore it will stop sending reports back to the team on the ground. Since he was using the task scheduler it was a snap to add watchdog timer servicing to the mix. Now if program execution gets stuck the watchdog will reset the chip and all is not lost.

[Thanks  JAC_101]