Alarm disabling unit for production equipment with long stop warning

From uCtrl
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.

I built this module for Sensonor ASA back in 2007, I have no idea if it is alive today.
ADU installed on equipment

Information

The purpose of this module is to make it possible to the operator to reset the alarm on the production equipment, but still make sure that the alarm sounds at the next fault. Today there is no way to turn off the alarm until the situation is cleared, but with this module that is now possible. Earlier the operators would remove the relay for the alarm, this gave an unfortunate long stop time if the relay was not placed back and the equipment faulted silently.

The production equipment has two chambers with controlled temperature, when the equipment stops the temperature in the cold chamber becomes unstable. When the emergency shutdown is triggered, this is needed for accessing the guard doors, the LN2 (liquid nitrogen) supply is closed. Therefor one doesn't want the equipment stopped for too long.

Alarm reset

When a alarm situation occurs the red LED flashes and the production alarm sounds, by pressing "reset alarm" the voltage to the sound alarm is cut. The red LED lights continuously when the alarm is reset. When the alarm situation is no more the red LED turns off and the voltage to the sound alarm is restored. When a new fault occurs the procedure is repeated.

Warning long stop

If an alarm situation persists more then 30 or 60 minutes (jumper setting) the module will sound the alarm again. That means if the previous alarm was reset the voltage to the sound alarm will now be restored, blue LED starts flashing. This alarm is reset the same way, by pressing "reset alarm" the voltage to the sound alarm relay is once more cut. The blue LED will now be on continuously. The purpose of this alarm is to make the operators aware that they should consider defrosting the cold chamber is the equipment is left in standby much longer.

I/O

Inputs

  1. PD.0 Reset button
  2. PD.1 Stack lights signal
  3. PD.2 Jumper for setting long stop timer

Outputs

  1. PB.0 Red LED
  2. PB.1 Blue LED
  3. PB.2 Stack lights relay N.O
  4. PB.3 Power LED

D-Sub 9-pin

Pin Function Color
1 24V Red
2 0V Black
3 Stack lights in + (to optoisolator) Green
4 Stack lights in - (to optoisolator) Blue
5 Stack lights relay + Yellow
6 Stack lights relay - N.O White

Drawings

Panel front

Panel-alarm-avstilling-tt-g2zjxg.png

Inside equipment

Alarm-disabling-unit-1-connections-6qj6xg.png

Schematic drawing

Alarm-disabling-unit-1-circuit-8g8w6g.png

Internal connectors

Alarm-disabling-unit-1-internal-connections-343014.png

  1. GND to internal reset button (Without resistor)
  2. Signal from internal reset button (With resistor)
  3. GND to stack lights relay (D-sub 6)
  4. Signal from stack lights
    • Red : + (D-sub 3)
    • Blue : - (D-sub 4)
  5. 24V supply voltage
    • Red : + (D-sub 1)
    • Blue : - (D-sub 2)
  6. 24V to stack lights relay (D-sub 5)
  7. Jumper for setting long stop timer
    • With jumper : 30 min
    • Without jumper : 60 min

Images

Parts list

Qty. Part
1 AVR ATtiny2313-20PU, DIL-20, 20 MHz, 18 I/Os
1 Capacitor, aluminium electrolytic, 10 µF, 25V
2 Capacitor, aluminium electrolytic, 47 µF, 25V
1 Capacitor, ceramic, 1 nF, 100V
2 m Control cable, 8-cores, shield, 0.14mm2, 250 V, Ø 5.1mm
1 D-Sub plastic hood, 9-pin, black
1 D-Sub soldering cups, 9 pin female
1 D-Sub soldering cups, 9 pin male
1 DIL socket, 20-pin, 7.62mm
1 DIL socket, 6-pin, 7.62mm
1 Diode, rectifier, 1 A, 400V, 1N4004
1 Enclosure, plastic (1591 FL), 150x80x50mm, flange
1 Fuse 5x20 mm, 400 mA, fast-acting
1 Fuse holder, open, PCB, 5x20mm
1 Fuse holder, open, PCB, Protective cover
1 Heat conducting film for heatsink, Adhesive, TO220
1 Heatsink, 15K/W @ 4W, 28mm 7g, TO220
1 Jumper, 2.54mm
1 LED 5mm clear, Blue, 3.4V, 20mA, 7.200mcd, 20°
1 LED 5mm clear, Red, 2.1V, 20mA, 7.000mcd, 20°
1 LED 5mm coloured clear, Green, 2.1V, 20mA, 30mcd, 10°
1 LED holder 5mm, RTC51, black plastic
1 LED lens 5mm, CLF 280, Blue
1 LED lens 5mm, CLF 280, Red
1 Optocoupler, single, CNY17F-3, DIL-6
1 Resistor, carbon film, 0.25W, 100 Ω, 5%
1 Resistor, carbon film, 0.25W, 150 Ω, 5%
4 Resistor, carbon film, 0.25W, 330 Ω, 5%
2 Resistor, carbon film, 0.25W, 4.7 kΩ, 5%
3 Resistor, carbon film, 0.25W, 10 kΩ, 5%
1 Resistor, metal film, 0.6W, 2.2 kΩ, 1%
8 Straight pin header, female, Single row, 2.54mm
10 Straight pin header, male, Single row, 2.54mm
1 Switch, push-button, 1-pole, 1A, 50VAC, on-(off)
1 Transistor, NPN, 100 mA, 45V, 0.5W, BC547B
1 Voltage regulator +5V, 1 A, 7805PI

Source code

Template:Basic code

'--------------------------------------------------------------
' Thomas Jensen
'--------------------------------------------------------------
' file: ALARM_DISABLING_UNIT_SA_TEST_v.1.1
' date: 22/04/2010
'--------------------------------------------------------------
$regfile = "attiny2313.dat"
$crystal = 8000000
Config Watchdog = 1024
Config Portb = Output
Config Portd = Input

Dim A As Byte
Dim Lifesignal As Integer
Dim Alarm_timer As Word
Dim Alarm_timeout As Word
Dim Lystaarn_delay As Integer
Dim Reset_aktiv1 As Bit
Dim Reset_aktiv2 As Bit
Dim Led1 As Integer
Dim Led2 As Integer
Dim Service_exit As Word
Dim Service_enter As Integer

Alarm_timer = 0
Lifesignal = 11
Lystaarn_delay = 20
Reset_aktiv1 = 0
Reset_aktiv2 = 0
Led1 = 0
Led2 = 0
Service_enter = 0
Service_exit = 0

Portb = 0

Portb.1 = Not Portb.0 'boot
For A = 1 To 10
    Portb.0 = Not Portb.0
    Portb.1 = Not Portb.1
    Waitms 200
Next A

Portb = 0

Waitms 1000

Start Watchdog

Main:
'set timeout value
If Pind.2 = 1 Then Alarm_timeout = 36000 '60 min
If Pind.2 = 0 Then Alarm_timeout = 18000 '30 min

'counter for long stops
If Lystaarn_delay > 0 And Alarm_timer < 37000 Then Incr Alarm_timer

'no longer alarm situation
If Lystaarn_delay = 0 Then
   Alarm_timer = 0
   Reset_aktiv1 = 0
   Reset_aktiv2 = 0
   Portb.2 = 0
   End If

'stack light status
If Pind.1 = 0 Then Lystaarn_delay = 20
If Lystaarn_delay > 0 Then Decr Lystaarn_delay

'alarm triggered, reset possible
If Lystaarn_delay > 0 And Pind.0 = 1 Then Reset_aktiv1 = 1
If Alarm_timer > Alarm_timeout And Pind.0 = 1 Then Reset_aktiv2 = 1

'set red led
If Lystaarn_delay > 0 Then
   If Reset_aktiv1 = 0 And Alarm_timer < Alarm_timeout And Led1 = 0 Then
      Led1 = 5
      Portb.2 = 0
   End If
   If Reset_aktiv1 = 1 And Alarm_timer < Alarm_timeout Then
      Led1 = 5
      Portb.2 = 1
   End If
End If

'set blue led
If Alarm_timer > Alarm_timeout Then
   If Reset_aktiv2 = 0 And Led2 = 0 Then
      Led2 = 5
      Portb.2 = 0
   End If
   If Reset_aktiv2 = 1 Then
      Led2 = 5
      Portb.2 = 1
   End If
End If

'handle red led
If Led1 > 0 Then Decr Led1
If Led1 = 4 Then Portb.0 = 1
If Led1 = 2 Then Portb.0 = 0

'handle blue led
If Led2 > 0 Then Decr Led2
If Led2 = 4 Then Portb.1 = 1
If Led2 = 2 Then Portb.1 = 0

'lifesignal
If Lifesignal > 0 Then Lifesignal = Lifesignal - 1
If Lifesignal = 3 Then Portb.3 = 1
If Lifesignal = 1 Then Portb.3 = 0
If Lifesignal = 0 Then Lifesignal = 11

'handle service mode timer
If Pind.0 = 1 And Portb.0 = 0 And Portb.1 = 0 Then Incr Service_enter
If Pind.0 = 0 Then Service_enter = 0
If Service_enter = 200 Then
   Service_enter = 0
   For A = 1 To 10
      Portb.0 = Not Portb.0
      Portb.1 = Not Portb.1
      Reset Watchdog
      Waitms 100
   Next A
   Goto Service
End If

Reset Watchdog
Waitms 100
Goto Main
End

'service loop
Do
Service:
Portb.0 = 0
Portb.1 = 0
Portb.2 = 1

'lifesignal
Portb.3 = Not Portb.3

'exit loop
If Pind.0 = 1 Or Service_exit > 54000 Then
   Portb.3 = 0
   Lifesignal = 11
   Service_exit = 0
   Lystaarn_delay = 20
   Reset_aktiv1 = 1
   Goto Main
End If

'do loop
Incr Service_exit
Reset Watchdog
Waitms 100
Loop
End