This post is part of the Rack box project series.

Monitors the Rack box status panel, IR sensor, porch door and turns off lights. Uses an AVR ATtiny2313 microcontroller.

Table of contents

Details

This module does many things:

  1. Monitor the Rack box status panel.
    • Connected: green flashing LED.
    • Disconnected: red flashing LED.
    • Alarm: If the Rack status panel has been connected and is disconnected; the alarm is triggered, the LED will flash both red and green. This condition must be reset using the reset switch.
  2. Monitor the movement (IR) sensor and porch door.
    • Open porch door: slow yellow flashing LED. A signal is also sent to Oven and signal unit, a unit that controls the living room heating.
    • Movement detected: fast red flashing LED.
    • If the porch door is closed and no movement is detected a “all-ok” signal is sent to Alarm unit, this is the alarm input signal.
  3. Turn of lights in the living room using signals from the Light control unit.
    • The living room lights can be turned off instantly or after 45 seconds. It’s however not possible to turn the lights back on again, this is caused by the digital dimmer circuit on the lamp. It does not turn it self back on when power is restored.

Video

This video shows the entire building process of the multi-purpose module.

I/O

Inputs

  1. Panel OK (to Rack box status panel)
  2. IR Sensor
  3. Porch door
  4. Lights out (from Light control unit)
  5. Lights out 45 sec (from Light control unit)
  6. Reset panel error (N.C)

Outputs

  1. Panel OK
  2. Panel NOT OK
  3. Signal to Alarm unit (N.C)
  4. Living room lights off relay
  5. Porch door LED
  6. IR Sensor LED
  7. Panel error (to Signal and lights controlling unit)
  8. Lifesignal (to Module stability monitoring unit 2)

D-Sub 15-pin

  1. +5V
  2. 0v
  3. Life-signal
  4. In: Panel OK +
  5. In: Panel OK -
  6. In: IR Sensor (N.C)
  7. In: Porch door + (N.C)
  8. In: Lights out
  9. In: Lights out 45 sec
  10. Out: Signal to ALU (N.C)
  11. Out: Living room lights off relay
  12. Out: Porch door LED
  13. Out: IR LED
  14. Out: Panel error

Source code

Photos

Inside the module, during assembly
Module complete
Mounted inside the rack box
Mounted in the ceiling of the rack box
Motion sensor
Porch door sensor
AVR microcontroller on circuit board
Inside the module

Schematic drawing

Schematics for the multi-purpose module

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, 15 pin male
  • 1 × DIL socket, 20-pin, 7.62mm
  • 2 × DIL socket, 6-pin, 7.62mm
  • 1 × Enclosure, plastic (1591 FL), 112x62x31mm, flange
  • 1 × LED 5mm coloured clear, Green, 2.1V, 20mA, 30mcd, 10°
  • 1 × LED 5mm, Red, 2.0V, 20mA
  • 1 × LED 5mm, Red/Green, 2.0 2.1V, 10mA, 100 63mcd, 30°
  • 1 × LED 5mm, Yellow, 2.0V, 25mA
  • 1 × LED holder 5mm, RTC51, black plastic
  • 1 × LED lens 5mm, CLF 280, Clear
  • 1 × LED lens 5mm, CLF 280, Red
  • 1 × LED lens 5mm, CLF 280, Yellow
  • 2 × Optocoupler, single, CNY17F-3, DIL-6
  • 64 cm2 PCB, stripboard, 100x160mm, 160cm2
  • 11 × Resistor, carbon film, 0.25W, 330 Ω, 5%
  • 7 × Resistor, carbon film, 0.25W, 4.7 kΩ, 5%
  • 6 × Resistor, carbon film, 0.25W, 10 kΩ, 5%
  • 2 × Resistor, metal film, 0.6W, 1 kΩ, 1%
  • 18 × Straight pin header, female, Single row, 2.54mm
  • 18 × Straight pin header, male, Single row, 2.54mm
  • 1 × Switch, push-button, 1-pole, 1A, 50VAC, on-(off)
  • 6 × Transistor, NPN, 100 mA, 45V, 0.5W, BC547B

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