3 January 2015

A PC Watchdog


Project Features

  • Automatically resets a crashed, frozen Linux PC
  • Simple
  • Uses a cheap USB-to-serial adapter

Introduction
For several years I have been using a MythTV Linux server to record television shows. It works very well and I like it a lot. It has one major problem though: Sometimes it locks up. I suspect that this happens when it changes channels and signals are weak (e.g. due to bad weather). It seems the drivers for my DVB-S receiver cards don't like that.

This is annoying, because it remains in that state until the PC is reset manually. No recordings are made in that state. It gets particularly annoying when I am on holiday, because then the recordings of a week or more can be lost. The box needs to be reset via the reset button. Not even ctrl-alt-del will work.

The aim of this project was to automate the process with an external watchdog. The idea was that the PC had to send a "heartbeat signal", i.e. a fixed character via a USB-to-serial adapter regularly. If it doesn't do so, the watchdog resets the PC after five minutes.

Since this is a Linux box, a simple cron job can be used to create such a heartbeat signal. If the signal is there, this means that the operating system is alive, the cron daemon is working and the USB driver is good.

22 December 2014

A MythTV Remote Control without LIRC



Features
  • Relatively easy to build
  • Emulates a keyboard, so it needs no driver
  • Costs around 10 €
  • Is easy to configure, in under one minute
  • Works with most remote controls
  • Can easily be customised for other HTPC software
Introduction

I was always very fascinated with Objective Development's software implementation of a USB driver for Atmel controllers called V-USB. On their web site, they have a nice list of really interesting projects using this driver.

There are a few projects that translate IR remote control signals into USB HID key strokes. This has one huge advantage: You don't need any driver or software on the PC. I had use for this, since I am using a PC with MythTV to watch TV. The standard means to control it is an IR remote with LIRC.

But with LIRC I had some mixed results . It is quite a universal and versatile tool. This means you need to do a lot of configuring. You have to edit several files and it is not straightforward. And the teaching phase has always been trial and error for me.

With a microcontroller decoding the IR protocol, one part of the bothersome configuration is eliminated. And the second part can be relatively easy, as only a simple IR to key stroke assignment is needed.

31 October 2014

The Eyes - A Last Minute Halloween Effect

Introduction
Halloween is a rather new tradition in our part of the world, but my family is very enthusiastic about it. Tombstones are built, bones are scattered in our front garden and a fog machine is kept in the basement for just this one day of the year. This time I thought that I could contribute a little LED effect. My idea was to use a couple of red LEDs to create a red-glowing eye effect, like some evil little monsters lurking in the dark.