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:
- 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.
- 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 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
- Panel OK (to Rack box 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 NOT OK
- 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
- Life-signal
- 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
- Bascom-AVR source is available in a git repository:
- https://github.com/thomasjsn/AVR-Multi-purpose-module
Photos
Schematic drawing
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
- Parallel port I/O module
- Power supply and fuse monitoring module, AVR
- Monitored fuse box, 6 channels
- Stack lights and horn controller — with AVR
- Mute and light controller for the Rack box — AVR module
- Monitored fuse box, 4 channels
- Module heartbeat monitor, 6 inputs — AVR
- Controller for lights and relays — AVR driven
- Emergency power off controller — controlled by 555 timers
- Fan controller with LCD — AVR powered
- Sound alarm control unit — AVR module
- Multiplexer output extender
- Multi-purpose AVR module
- Electric heater and timer controller — AVR
- Module heartbeat monitor, 15 inputs — LCD and AVR
- Serial port I/O module with 11 inputs — AVR
- Serial port I/O module with 9 in and outputs — AVR
- Serial interface for emergency power off — AVR
- Status panel for the Rack box project
- Intruder alarm system controller — AVR
- Serial port I/O module with 15 inputs — AVR
- Serial interface module, with analog and digital I/O — AVR
- The rack box project — an overview