This post is part of the Rack box project series.

Detects and alerts if any of the monitored modules goes silent; meaning their heartbeat stops. Uses an AVR ATtiny2313 microcontroller.

Table of contents

Details

When my rack box project started filling up with modules, I needed (or rather wanted) a way to monitor that they were running and doing what they were suppose to. I tried monitoring the fuses, with this and this, but that just wasn’t practical. I needed a way to know that the modules were not only powered, but running. This module does just that.

I originally designed all of my devices with a run/life light, an LED that blinked when the firmware was running. This LED was in essence a heartbeat, and by making sure that the heartbeat didn’t stop I would know that the module was working fine.

If more than 10 seconds passed, without receiving a heartbeat this monitor unit would go into alarm state. The blue LED would flash, and the green LED corresponding to the failed module would stay solid.

All alarms had to be manually reset, even if the heartbeat came back. The reason for this was so that I would see it if a module had been dead for some time, but came back by itself. This would still indicate a problem with that module. If a heartbeat was not detected at all after a reset, that input was marked as inactive and would not produce any alarms.

During normal operation the green LEDs flashed every time a heartbeat was received on that input, so it was quite the light show 🙂

I later built a bigger version of this module: Module heartbeat monitor with 15 inputs and LCD

Video

The module heartbeat monitor appears at 1:35 in the project rack video. When a fuse is removed; one module stops responding and the monitoring module triggers an alarm. The fuse is put back and the alarm manually reset.

I/O

Inputs

  1. Module 1 heartbeat
  2. Module 2 heartbeat
  3. Module 3 heartbeat
  4. Module 4 heartbeat
  5. Module 5 heartbeat
  6. Module 6 heartbeat
  7. Reset

Outputs

  1. Module 1 failure LED
  2. Module 2 failure LED
  3. Module 3 failure LED
  4. Module 4 failure LED
  5. Module 5 failure LED
  6. Module 6 failure LED
  7. Module error alarm
  8. Life-light

D-Sub 9-pin

  • 5V
  • 0v
  1. Module 1 heartbeat input
  2. Module 2 heartbeat input
  3. Module 3 heartbeat input
  4. Module 4 heartbeat input
  5. Module 5 heartbeat input
  6. Module 6 heartbeat input
  7. Reset alarm input
  8. Module error alarm output

Source code

Photos

Cutouts in plastic enclosure
Getting parts ready for module assembly
Circuit board, without microcontroller
Mounting everything in the enclosure
Mounting everything in the enclosure
Heartbeat monitor module installed in the rack box
Heartbeat monitor module operational

Parts list

  • 1 × AVR ATtiny2313-20PU, DIL-20, 20 MHz, 18 I/Os
  • 1 × Capacitor, aluminium electrolytic, 10 µF, 25V
  • 2 × Capacitor, ceramic, 22 pF, 100V
  • 1 × Capacitor, ceramic, 1 nF, 100V
  • 1 × D-sub soldering cups, 9 pin male
  • 1 × DIL socket, 20-pin, 7.62mm
  • 1 × Enclosure, plastic (1591 FL), 120x65x40mm, flange
  • 1 × LED 5mm clear, Blue, 4.9V, 20mA, 350mcd, 12°
  • 1 × LED 5mm coloured clear, Green, 2.1V, 20mA, 30mcd, 10°
  • 6 × LED 5mm, Red/Green, 2.0 2.1V, 10mA, 100 63mcd, 30°
  • 1 × LED holder 5mm, RTC51, black plastic
  • 1 × LED lens 5mm, CLF 280, Blue
  • 32 cm2 PCB, stripboard, 100x160mm, 160cm2
  • 1 × Quartz crystal oscillator, 4 MHz
  • 15 × Resistor, carbon film, 0.25W, 330 Ω, 5%
  • 2 × Resistor, carbon film, 0.25W, 4.7 kΩ, 5%
  • 7 × Resistor, carbon film, 0.25W, 10 kΩ, 5%
  • 1 × Switch, push-button, 1-pole, 1A, 50VAC, off-(on)
  • 1 × Transistor, NPN, 100 mA, 45V, 0.5W, BC547B

Last commit 2023-12-25, with message: replace emoji slight_smile/slightly_smiling_face