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 2024-11-11, with message: Add lots of tags to posts.

Rack Box Project series
All posts in 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