Main monitoring unit

From uCtrl.net

Jump to: navigation, search
Symbols-Delete-256x256.png
Rack fullsize plan.png
The Rack box project is being discontinued!
I am moving to a new location, and therefor terminating the Rack box project, my plan is to build an even bigger system based on slot-in cards in a full size rack. I'll keep you posted. Feel tree to leave a comment if you have any question.
MMU installed in the Rack box

MMU, driven by AVR AT90S2313.

Contents

Information

This unit monitors all necessities in the Rack box. It gives an alarm if a power supply should fail, a fuse burn out or if Serial Server times out (via. OSID). 5, 12 and 24V, positive and negative, is connected to optoisolators inside the MMU. The 24V uses en external optoisolator. It will detect if a main fuse burns out or a power supply is lost. MMU is bypassed the main fuses, but if the 12V supply is totally lost MMU will also lose power. Fuse errors is detected by the fuse module FB1, and the signal sent to MMU which gives an alarm and notifies other modules. Serial Server monitoring is based on the same principles that MSMU2 operates on, a lifesignal is sent ever X second. And if this signal fails to come a timeout alarm will sound. The lifesignal from Serial Server is only sent every 60 seconds, and it takes 310 for the timeout alarm to sound. OSID is the serial module delivering the lifesignal, so if this module fails this will be detected as a server timeout.

I/O

Inputs

  1. Server lifesignal
  2. Fuse error
  3. Emergency supply failure (see EMG)
  4. 5V supply
  5. 12V supply

Outputs

  1. Buzzer (not in use)
  2. Error signal (to SLCU)
  3. Fuse error LED
  4. Supply failure LED
  5. Lifelight (built-in LED)
  6. Lifesignal (to MSMU2)
  7. Server timeout LED

Wires

Alarm situations

Images

Schematic drawing

Mmu circuit.png

Source code

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

'--------------------------------------------------------------
'                         Thomas Jensen
'--------------------------------------------------------------
'  file: AVR_MMU
'  date: 12/03/2006
'--------------------------------------------------------------
$crystal = 4000000
$baud = 9600
Config Portd = Input
Config Portb = Output
Config Watchdog = 1024
 
Dim Feil As Integer
Dim Feil_prev As Integer
Dim Timeout As Integer
Dim Horn As Integer
Dim Nettspenning As Integer
Dim Lifesignal As Integer
 
Timeout = 3100
Lifesignal = 31
 
Portb = 0
Portb.2 = 1
Waitms 1000
Portb.3 = 1
Waitms 1000
Portb.6 = 1
Waitms 1000
Portb.4 = 1
Waitms 1000
Start Watchdog
Portb = 0
 
 
Main:
If Pind.3 = 0 Then                                          'emergency supply NC
   Feil = 1
   Nettspenning = 1
   Waitms 100
   End If
 
If Pind.5 = 1 Then                                          '12V supply NO
   Feil = 1
   Portb.3 = 1
   Waitms 100
   Portb.3 = 0
   End If
 
If Pind.4 = 1 Then                                          '5V supply NO
   Feil = 1
   Portb.3 = 1
   Waitms 100
   Portb.3 = 0
   End If
 
If Pind.2 = 0 Then                                          'fuse failure
   Feil = 1
   Portb.2 = 1
   Waitms 100
   Portb.2 = 0
   End If
 
If Pind.0 = 0 And Timeout = 0 Then                          'set timeout timer
   Timeout = 3100
   End If
 
If Timeout > 0 Then Timeout = Timeout - 1                   'timeout timer
If Timeout = 0 Then
   Feil = 1
   Portb.6 = 1
   Waitms 100
   Portb.6 = 0
   End If
If Pind.0 = 0 Then Timeout = 3100
 
If Horn > 0 Then Horn = Horn - 1                            'horn
If Horn = 6 Then Portb.0 = 1
If Horn = 1 Then Portb.0 = 0
 
If Feil = 1 And Feil_prev = 0 Then Horn = 10                'failure output signal
If Feil = 1 Then
   Portb.1 = 1
   Feil_prev = 1
   If Timeout > 0 Then Timeout = Timeout - 1
   End If
If Feil = 0 Then
   Portb.1 = 0
   Feil_prev = 0
   End If
 
If Nettspenning = 1 Then Portb.3 = 1                        'emergency supply set
If Nettspenning = 0 Then Portb.3 = 0
 
Feil = 0
Nettspenning = 0
 
If Lifesignal > 0 Then Lifesignal = Lifesignal - 1          'lifesignal
If Lifesignal = 6 Then Portb.5 = 1
If Lifesignal = 1 Then Portb.5 = 0
If Lifesignal = 0 Then Lifesignal = 31
 
Reset Watchdog                                              'loop cycle
Portb.4 = 1
Waitms 25
Portb.4 = 0
Waitms 75
Goto Main
End
Personal tools
Namespaces
Variants
Actions
Navigation
Categories
projects
Toolbox