Alarm disabling unit 2

From uCtrl.net

Jump to: navigation, search
ADU2 installed on equipment

ADU2, driven by AVR ATTiny2313.

See also ADU1.

Contents

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.

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.

I/O

Inputs

  1. PD.0 Reset button
  2. PD.1 Stack lights signal

Outputs

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

D-Sub 9-pins

Pin Function Color
1 24V Orange
2 0V Orange/white
3 Stack lights in + (to optoisolator) Green
4 Stack lights in - (to optoisolator) Green/white
5 Stack lights relay + Blue
6 Stack lights relay - N.O Blue/white

Drawings

Inside equipment

Bryte-rele-rtc.png

Schematic drawing

Bryte-rele-rtc-krets.png

Internal connectors

Alarm rtc kretskort stiftpinner.png

  1. Signal from internal reset button (With resistor)
  2. 24V supply voltage
    • Red : + (D-sub 1)
    • Blue : - (D-sub 2)
  3. Status LEDs
    • Red : + Red LED
    • Green : + Green LED
  4. Signal from stack lights
    • Red : + (D-sub 3)
    • Blue : - (D-sub 4)
  5. GND to LEDs and switch
  6. 24V to stack lights relay (D-sub 5)
  7. GND to stack lights relay (D-sub 6)

Parts list

Quantity Supplier Part number Description
1 Elfa 73-646-56 AVR-RISC, ATtiny2313-20PI
1 Elfa 50-197-32 Plastic Enclosure (1591 FL), 120x65x40mm fixed install.
1 Elfa 44-093-55 D-Sub plastic hood, 9-pin, black
1 Elfa 44-055-51 D-Sub soldering cups, 9 pin male
1 Elfa 44-055-02 D-Sub soldering cups, 9 pin female
1 Elfa 48-161-53 DIL socket, 20-pin, 7,62mm
1 Elfa 48-161-04 DIL socket, 6-pin, 7,62mm
1 Elfa 70-003-91 Rectifier diode, 1A 400V, 1N4004
1 Elfa 48-884-18 Unthreaded round spacer, 3mm, Ø6mm
1 Elfa 75-646-77 Heat conducting film for heatsink, Adhesive, TO220
1 Elfa 75-617-31 Heatsink 15C/W at 4 W, 28mm 7g, TO220
1 Elfa 67-008-01 Aluminium electrolytic capacitor, 10uF 25V
2 Elfa 67-008-68 Aluminium electrolytic capacitor, 47uF 25V
1 Elfa 65-851-94 Ceramic Disc Capacitor, 1 nF 100V
1 Elfa 48-396-76 Laboratory card, 100x160mm (1/5)
1 Elfa 75-034-44 LED 5mm coloured clear, Green, 2.1V, 20mA, 30mcd, 10°
1 LED1.de 50762002 LED 5mm clear, Red, 2.1V, 20mA, 7.000mcd, 20°
1 Elfa 75-056-05 LED lense 5mm, CLF 280, red
1 LED1.de 805082 LED holder 5mm, Black plastic
2 Elfa 55-770-10 Control cable 8-cores, 0,14mm2, shield, 18x0,10mm 250 V, Ø 5,1mm
1 Elfa 60-726-49 Metal film resistor 1% 0,6W, 2,2 K
2 Elfa 60-106-15 Carbon film resistor 5% 1/4W, 10 K
1 Elfa 60-103-91 Carbon film resistor 5% 1/4W, 150 Ohm
3 Elfa 60-104-33 Carbon film resistor 5% 1/4W, 330 Ohm
2 Elfa 60-105-73 Carbon film resistor 5% 1/4W, 4,7 K
1 Elfa 75-355-94 Optocoupler DIL-6, CNY17F-3
11 Elfa 43-708-05 Socket connector 2,54, 1×36, female
11 Elfa 43-702-19 Straight pin header 2,54, 1×36, PCB
1 Elfa 33-167-18 Fuse 5x20 mm, 400 mA, quick-acting
1 Elfa 33-150-17 Open fuse holder, PCB, 5x20mm
1 Elfa 33-150-25 Open fuse holder, PCB, Protective cover
1 AUX-01 Voltage regulator +5V, 1.0A
1 Elfa 71-027-59 Transistor BC547B, NPN, 45V 0.1A 0.625W
1 Elfa 35-084-39 Push-button Switch, 1-pole, 1A, 50VAC, on-(off)

Images

Source code

The program is written in basic, using Bascom-AVR.

'--------------------------------------------------------------
'                         Thomas Jensen
'--------------------------------------------------------------
'  file: ALARM_DISABLING_UNIT_SA_TEST_v2.1_No_Long_Stop_RTC
'  date: 01/05/2010
'--------------------------------------------------------------
$regfile = "attiny2313.dat"
$crystal = 8000000
Config Watchdog = 1024
Config Portb = Output
Config Portd = Input
 
Dim A As Byte
Dim Lifesignal As Integer
Dim Lystaarn_delay As Integer
Dim Reset_aktiv As Bit
Dim Led As Integer
Dim Service_exit As Word
Dim Service_enter As Integer
 
Lifesignal = 11
Lystaarn_delay = 20
Reset_aktiv = 0
Led = 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
    Waitms 200
Next A
 
Portb = 0
 
Waitms 1000
 
Start Watchdog
 
Main:
'no longer alarm situation
If Lystaarn_delay = 0 Then
   Reset_aktiv = 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_aktiv = 1
 
'set red led
If Lystaarn_delay > 0 Then
   If Reset_aktiv = 0 And Led = 0 Then
      Led = 5
      Portb.2 = 0
   End If
   If Reset_aktiv = 1 Then
      Led = 5
      Portb.2 = 1
   End If
End If
 
'handle red led
If Led > 0 Then Decr Led
If Led = 4 Then Portb.0 = 1
If Led = 2 Then Portb.0 = 0
 
'lifesignal
If Lifesignal > 0 Then Lifesignal = Lifesignal - 1
If Lifesignal = 3 Then Portb.1 = 1
If Lifesignal = 1 Then Portb.1 = 0
If Lifesignal = 0 Then Lifesignal = 11
 
'handle service mode timer
If Pind.0 = 1 And Portb.0 = 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
      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.2 = 1
 
'lifesignal
Portb.1 = Not Portb.1
 
'exit loop
If Pind.0 = 1 Or Service_exit > 54000 Then
   Portb.1 = 0
   Lifesignal = 11
   Service_exit = 0
   Lystaarn_delay = 20
   Reset_aktiv = 1
   Goto Main
End If
 
'do loop
Incr Service_exit
Reset Watchdog
Waitms 100
Loop
End
Personal tools
Namespaces
Variants
Actions
Navigation
Categories
projects
Toolbox