Rack box mute and light controller

From CaveLab
This page is kept for historical interest. It may document projects or methods that are obsolete and/or no longer relevant. The information here is not kept up-to-date.

This module was part of the rack box project — which was terminated when I moved out of my first apartment.
MICU installed in the Rack box

MICU takes care of misc small tasks in the Rack box, it controls the system mute function, the lights inside and the door sensor of the Rack box. When the door is opened the light turns on automatically, and stays on for five minutes. The light can also be affected manually with a switch, the light is then active for 30 minutes but is turned off if the door is closed. Door N.O and N.C signal is available for other modules.

Mute

When system mute (quiet mode) is active, sound alarms and the stack light is deactivated. Errors are only shown in Serial Client and on the Rack status panel. Mute can be affected manually or with the computer, using the Serial I/O system. A timer automatically sets the system in mute at night.

Weekdays mute is activated at 11PM and deactivated at 9AM. In the weekend it's activated 1AM and deactivated 11AM.

Crontab example for Linux:
01 23 * * 0-4 root /var/www/ctrl_files/turn_port 4 1 #weekday on
01 01 * * 0,6 root /var/www/ctrl_files/turn_port 4 1 #weekend of
01 09 * * 1-5 root /var/www/ctrl_files/turn_port 4 0 #weekday off
01 11 * * 0,6 root /var/www/ctrl_files/turn_port 4 0 #weekend off

I/O

Inputs

  1. Mute switch
  2. Mute auto signal from timer
  3. Light switch
  4. Door switch

Outputs

  1. Mute relay
  2. Lights
  3. Door N.O
  4. Door N.C
  5. Mute LED
  6. Lifesignal (to Module stability monitoring unit 2)
  7. Lifelight

Wires

Side

  • Red 5V+
  • White 0V
  • Black Lifesignal (out)

Bottom

  • Yellow Mute switch (in)
  • Green Mute auto signal (in)
  • Orange Light switch (in)
  • Brown Door switch (in)
  • Red Mute relay (out)
  • Blue Lights (out)
  • White Door N.O (out)
  • Black Door N.C (out)
  • Black (clear) Mute LED (out)

Source code

Git-alt-brands.svg
Bascom-AVR source is available in a git repository:
https://github.com/thomasjsn/AVR-Rackbox-mute-light-controller

Gallery

Schematic drawing

Rack-box-mute-and-light-controller-circuit-436j34.png

Parts list

Qty. Part
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 × 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 holder 5mm, RTC51, black plastic
32 cm2 PCB, stripboard, 100x160mm, 160cm2
1 × Quartz crystal oscillator, 4 MHz
5 × Resistor, carbon film, 0.25W, 330 Ω, 5%
7 × Resistor, carbon film, 0.25W, 4.7 kΩ, 5%
4 × Resistor, carbon film, 0.25W, 10 kΩ, 5%
6 × Transistor, NPN, 100 mA, 45V, 0.5W, BC547B