I have started migrating content to my Hugo blog at https://blog.cavelab.dev, already migrated pages will redirect there.
Serial interface module for emergency power off
This module was part of the rack box project — which was terminated when I moved out of my first apartment.
RS232 interface module, with voltage measurement. Used to communicate with emergency stop unit in the Rack box project. Installed inside Rack status panel. Uses an AVR ATmega8 microcontroller.
Details
With DEIM it's possible to trigger and reset the emergency shutdown from Serial Client, the voltage on the 12V emergency supply is also measured and shown in Serial Client. The module also registers if the emergency shutdown is triggered and gives the option of disabling the emergency strobe. DEIM has three LEDs and one two way switch on the Rack status panel, a yellow LED flashes when there is serial activity. Two LEDs are dual colored (green/red), the color can be controlled from the computer. The switch can be set up using triggers in Serial Server.
Commands
- Inputs
- Value from emergency supply 12V
- Emergency shutdown status
- Status on switch 1
- Status on switch 2
- Outputs
- Trigger emergency shutdown (1 sec auto off)
- Reset emergency shutdown (10 sec auto off)
- Deactivate strobe (on/off)
- LED 1
- 0 Off
- 1 Green
- 2 Red
- LED 2
- 0 Off
- 1 Green
- 2 Red
I/O
Inputs
- PC0 - Emergency supply 12V voltage for volt meter
- PC1 - Emergency shutdown active (Emergency shutdown unit)
- PC2 - Switch 1
- PC3 - Switch 2
Calculations
- Voltage
Outputs
- PB0 - Trigger emergency shutdown (Emergency shutdown unit)
- PB1 - Reset emergency shutdown (Emergency shutdown unit)
- PB2 - Deactivate strobe
- PB3 - LED 1 Green
- PB4 - LED 1 Red
- PB5 - LED 2 Green
- PD6 - LED 2 Red
- PD7 - Activity LED
- PD5 - Lifesignal (to Module stability monitoring unit 2) (optoisolator)
D-Sub connector
See Rack status panel for D-Sub connector.
Communication
Interfacing is done with RS-232, using MAX232 or MAX202.
Serial settings
- Baud
- 9600
- Data bits
- 8
- Parity
- None
- Stop bits
- 1
- Start command
- *
- Module ID
- 004
Source code

https://github.com/thomasjsn/AVR-Emergency-serial-interface-module
Gallery
DEIM installed in the Rack status panel