This post is part of the Rack Box Project series.

Simple unit to control three sound signals; beep, siren and buzzer. Uses an AVR ATtiny2313 microcontroller.

Table of contents

Details

This simple unit controls three sound signals; beep, siren and buzzer. Each sound signal will only be given once; when a new alarm is triggered. The input must remain clear for at least four seconds for that signal to rearm.

A beep is given every six minutes if an alarm is active, as a reminder. The sound LED flashes when a sound alarm is active; once for signal 1 (beep), twice for signal 2 (siren) and three times for signal 3 (buzzer), this flashing pattern is repeated.

This module used to control the sound alarms in the Rack box. Modules with alarm outputs sent a signal to this sound controller, which carried out the sound alarm. If system mute was active the power to the buzzer and siren was disconnected.

The sound alarm controller functionality was later implemented in the stack lights and horn controller, eliminating the need for this module.

Signals

  1. 100 ms siren
  2. One second siren
  3. Three seconds buzzer

I/O

Inputs

  1. Signal: Beep
  2. Signal: Siren pulse
  3. Signal: Buzzer pulse

Outputs

  1. Siren
  2. Buzzer
  3. Sound LED
  4. Life-signal to Module heartbeat monitor

D-Sub 9-pin

  1. 0v
  2. 5v
  3. Signal: Beep
  4. Signal: Siren pulse
  5. Signal: Buzzer pulse
  6. Siren
  7. Buzzer
  8. Sound LED
  9. Life-signal

Source code

Photos

Test fitting circuit board in enclosure
Circuit board complete, without microcontroller
Testing the sound alarm controller logic
Sound alarm controller installed in the rack box
Buzzer and siren on the rack box
Ceiling of the rack box, with the sound alarm controller and other modules

Schematic drawing

Schematics for the sound alarm controller

Parts list

  • 1 × AVR ATtiny2313-20PU, DIL-20, 20 MHz, 18 I/Os
  • 1 × Capacitor, aluminium electrolytic, 10 µF, 25V
  • 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), 100x50x25mm, flange
  • 1 × LED 5mm coloured clear, Green, 2.1V, 20mA, 30mcd, 10°
  • 1 × LED 5mm coloured clear, Yellow, 2.0V, 20mA, 40mcd, 10°
  • 2 × LED holder 5mm, RTC51, black plastic
  • 32 cm2 PCB, stripboard, 100x160mm, 160cm2
  • 5 × Resistor, carbon film, 0.25W, 330 Ω, 5%
  • 5 × Resistor, carbon film, 0.25W, 4.7 kΩ, 5%
  • 3 × Resistor, carbon film, 0.25W, 10 kΩ, 5%
  • 4 × Transistor, NPN, 100 mA, 45V, 0.5W, BC547B

Last commit 2023-02-05, with message: Add series for the rack box project.


Rack Box Project series

  1. Parallel port I/O module
  2. Power supply and fuse monitoring module, AVR
  3. Monitored fuse box, 6 channels
  4. Stack lights and horn controller — with AVR
  5. Mute and light controller for the Rack box — AVR module
  6. Monitored fuse box, 4 channels
  7. Module heartbeat monitor, 6 inputs — AVR
  8. Controller for lights and relays — AVR driven
  9. Emergency power off controller — controlled by 555 timers
  10. Fan controller with LCD — AVR powered
  11. Sound alarm control unit — AVR module
  12. Multiplexer output extender
  13. Multi-purpose AVR module
  14. Electric heater and timer controller — AVR
  15. Module heartbeat monitor, 15 inputs — LCD and AVR
  16. Serial port I/O module with 11 inputs — AVR
  17. Serial port I/O module with 9 in and outputs — AVR
  18. Serial interface for emergency power off — AVR
  19. Status panel for the Rack box project
  20. Intruder alarm system controller — AVR
  21. Serial port I/O module with 15 inputs — AVR
  22. Serial interface module, with analog and digital I/O — AVR
  23. The rack box project — an overview