Power supply and fuse monitoring module

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.

This module was part of the rack box project — which was terminated when I moved out of my first apartment.
MMU installed in the Rack box

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. Online serial interface device). 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 Fuse box 1, and the signal sent to MMU which gives an alarm and notifies other modules. Serial Server monitoring is based on the same principles that Module stability monitoring unit 2 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. Online serial interface device 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 Emergency shutdown unit)
  4. 5V supply
  5. 12V supply

Outputs

  1. Buzzer (not in use)
  2. Error signal (to Signal and lights controlling unit)
  3. Fuse error LED
  4. Supply failure LED
  5. Lifelight (built-in LED)
  6. Lifesignal (to Module stability monitoring unit 2)
  7. Server timeout LED

Wires

  • Yellow 12V+
  • Blue 0V
  • Black Server lifesignal (in)
  • Red Fuse error (in)
  • Purple Emergency supply failure (in)
  • Green 5V+ supply (to optoisolator)
  • White 5V- supply (to optoisolator)
  • Orange 12V+ supply (to optoisolator)
  • Brown 12V- supply (to optoisolator)
  • Green Buzzer (out)
  • Yellow Error signal (out)
  • Orange Fuse error (out)
  • Grey Supply failure (out)
  • Brown Lifesignal (out)
  • Cyan Server timeout (out)

Alarm situations

  • Server timeout (310 sec)
  • Emergency supply failure
  • 5V supply failure
  • 12V supply failure
  • Fuse error

Images

Schematic drawing

Supply-and-fuse-monitoring-module-circuit-4nmxzq.png

Parts list

Qty. Part
1 AVR AT90S2313-10PI, DIL-20, 10 MHz, 15 I/Os
1 Capacitor, aluminium electrolytic, 10 µF, 25V
2 Capacitor, aluminium electrolytic, 22 µF, 25V
2 Capacitor, ceramic, 22 pF, 100V
1 DIL socket, 20-pin, 7.62mm
2 DIL socket, 6-pin, 7.62mm
1 Enclosure, plastic (1591 FL), 150x80x50mm, flange
2 Fuse 5x20 mm, 400 mA, fast-acting
2 Fuse holder, open, PCB, 5x20mm
1 LED 5mm coloured clear, Green, 2.1V, 20mA, 30mcd, 10°
1 LED holder 5mm, RNG 268, Fixing ring
2 Optocoupler, single, CNY17F-3, DIL-6
128 cm2 PCB, stripboard, 100x160mm, 160cm2
1 Quartz crystal oscillator, 4 MHz
5 Resistor, carbon film, 0.25W, 330 Ω, 5%
9 Resistor, carbon film, 0.25W, 4.7 kΩ, 5%
5 Resistor, carbon film, 0.25W, 10 kΩ, 5%
3 Resistor, metal film, 0.6W, 1 kΩ, 1%
1 Switch, push-button, PCB, 1-pole, H4.3mm, vertical, black
1 Terminal block, pluggable, 3.5 mm, 2-pin screw female
1 Terminal block, pluggable, 3.5 mm, 2-pin vertical male
1 Terminal block, pluggable, 3.5 mm, 4-pin screw female
1 Terminal block, pluggable, 3.5 mm, 4-pin vertical male
8 Transistor, NPN, 100 mA, 45V, 0.5W, BC547B
1 Voltage regulator +5V, 2 A, L78S05CV

Source code

Template:Basic code

'--------------------------------------------------------------
' 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