Multi-purpose AVR module
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.
This module was part of the rack box project — which was terminated when I moved out of my first apartment.

MPM1 installed in the Rack box
Monitor status panel, IR sensor, porch door and turn off lights. Uses an AVR ATtiny2313 microcontroller.
Details
This module does many things:
- Monitor the Rack 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.
- 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.
- 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 regulator on the lamp. It does not turn it self back on when power is restored.
Video
I/O
Inputs
- Panel OK (to Rack status panel)
- IR Sensor
- Porch door
- Lights out (from Light control unit)
- Lights out 45 sec (from Light control unit)
- Reset panel error (N.C)
Outputs
- Panel OK
- Panel NOK
- Signal to Alarm unit (N.C)
- Living room lights off relay
- Porch door LED
- IR Sensor LED
- Panel error (to Signal and lights controlling unit)
- Lifesignal (to Module stability monitoring unit 2)
D-Sub 15-pin
- +5V
- 0v
- Lifesignal
- In: Panel OK +
- In: Panel OK -
- In: IR Sensor (N.C)
- In: Porch door + (N.C)
- In: Lights out
- In: Lights out 45 sec
- Out: Signal to ALU (N.C)
- Out: Living room lights off relay
- Out: Porch door LED
- Out: IR LED
- Out: Panel error
Source code

https://github.com/thomasjsn/AVR-Multi-purpose-module