Module stability monitoring unit 2
From uCtrl.net
(Redirected from MSMU2)
| 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. |
MSMU2 installed in the Rack box
MSMU2, driven by AVR AT90S8515.
Contents |
Information
Every AVR driven module has an output with a pulsating signal called lifesignal. This is connected to MSMU2, if this signal should come to an end MSMU2 will sound a module timeout alarm. The signal needs to be absent for 10 seconds before the alarm sounds. MSMU2 can monitor 15 modules, a LCD display shows the status:
#n/a means not connected Ok→21 means ok, and the remaining timeout
If a module should fail MSMU2 will only show the failed module numbers, alarms must be reset manually using a push button.
Monitored modules
Click here for a list of monitored modules.
I/O
Inputs
- PA2 Module 1
- PA3 Module 2
- PC2 Module 3
- PC3 Module 4
- PC4 Module 5
- PC5 Module 6
- PC6 Module 7
- PC7 Module 8
- PD0 Module 9
- PD1 Module 10
- PD2 Module 11
- PD3 Module 12
- PD4 Module 13
- PD5 Module 14
- PD6 Module 15
- PD7 Reset
Outputs
- PB0 LCD Db7
- PB1 LCD Db6
- PB2 LCD Db5
- PB3 LCD Db4
- PB6 LCD E
- PB7 LCD Rs
- PA0 Module error (to SLCU)
- PA1 Lifelight
Connectors
D-Sub 9-pin
- 5v
- 0v
- Reset
- Module error LED
D-Sub 15-pin
- Module 1 → 15
LCD display
12345678 MSMU #2 Running 1 Ok>21 4 #n/a 10 FAIL! Reset!
Parts list
| Quantity | Supplier | Part number | Description |
| 1 | Elfa | 73-665-29 | AVR-RISC, AT90S8515 |
| 1 | Elfa | 50-195-00 | Plastic Enclosure (1591), 120x80x59mm |
| 1 | Elfa | 44-055-10 | D-Sub soldering cups, 15 pin female |
| 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-162-11 | DIL socket, 40-pin, 15,24mm |
| 2 | Elfa | 48-087-96 | Mounting rail holder, Metal |
| 2 | Elfa | 70-005-57 | Small Signal Diode, 1N4148/Ph |
| 1 | Elfa | 67-008-01 | Aluminium electrolytic capacitor, 10uF 25V |
| 1 | Elfa | 65-851-94 | Ceramic Disc Capacitor, 1 nF 100V |
| 2 | Elfa | 65-848-58 | Ceramic Disc Capacitor, 22 pF 100V |
| 1 | Elfa | 74-501-82 | Quartz, 4,0Mhz |
| 1 | Elfa | 75-511-61 | Dot matrix LCD display, 16x1 LED |
| 1 | Elfa | 75-005-80 | LED 5mm clear, Blue, 4.9V, 20mA, 350mcd, 12° |
| 1 | Elfa | 75-016-79 | LED 5mm clear, Green, 2.1V, 20mA, 385mcd, 6° |
| 2 | Elfa | 75-031-96 | LED holder 5mm, RTC51, black plastic |
| 16 | Elfa | 60-106-15 | Carbon film resistor 5% 1/4W, 10 K |
| 1 | Elfa | 60-103-83 | Carbon film resistor 5% 1/4W, 120 Ohm |
| 18 | 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 | 64-361-82 | Trimmer, carbon, 10k horizontal |
| 1 | Elfa | 33-167-26 | Fuse 5x20 mm, 500 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 | Elfa | 71-027-59 | Transistor BC547B, NPN, 45V 0.1A 0.625W |
| 1 | Elfa | 35-084-21 | Push-button Switch, 1-pole, 1A, 50VAC, off-(on) |
| 1 | Elfa | 35-305-16 | Toggle switch, 1-pole, micro, on-on |
Images
LCD mounted |
|||
LCD test |
|||
MSMU2 installed in the Rack box |
MSMU2 installed in the Rack box |
Schematic drawing
Files
- Datasheet LCD display 16x1: Media:lcd_16x1_tn_led.pdf
Source code
The program is written in basic, using Bascom-AVR.
'-------------------------------------------------------------- ' Thomas Jensen '-------------------------------------------------------------- ' file: AVR_MSMU2 ' date: 23/12/2006 '-------------------------------------------------------------- $regfile = "8515def.dat" $crystal = 4000000 Config Portd = Input Config Portc = Input Config Portb = Output Config Porta.0 = Output Config Porta.1 = Output Config Porta.2 = Input Config Porta.3 = Input Config Watchdog = 1024 Config Lcdpin = Pin , Db4 = Portb.3 , Db5 = Portb.2 , Db6 = Portb.1 , Db7 = Portb.0 , E = Portb.6 , Rs = Portb.7 Config Lcd = 16 * 1 Dim A As Byte Dim B As Byte Dim Alarm As Integer Dim Alarmled As Integer , Is_shown As Integer Dim Modul(15) As Byte Deflcdchar 0 , 32 , 4 , 2 , 31 , 2 , 4 , 32 , 32 ' pil Alarm = 0 Alarmled = 0 Is_shown = 0 Const Timeout = 21 'boot Porta.0 = 0 Porta.1 = 0 Cls Cursor Off Cls Locate 1 , 1 Lcd "MSMU #2" For A = 1 To 15 Porta.0 = Not Porta.0 Porta.1 = Not Porta.1 Waitms 250 Next A Porta.0 = 0 Porta.1 = 0 Cls Locate 1 , 1 Lcd "Running" Waitms 1500 Cls Start Watchdog Main: 'lcd display For B = 1 To 15 Gosub Sjekk If Alarm <> 1 Then Is_shown = 1 Waitms 50 Locate 1 , 1 Lcd B Locate 1 , 4 If Modul(b) > 1 Then Lcd "Ok" ; Chr(0) ; Modul(b) If Modul(b) = 0 Then Lcd "#n/a " For A = 1 To 9 Waitms 50 Gosub Sjekk Next A End If If Modul(b) = 1 And Alarm = 1 Then Is_shown = 1 Waitms 50 Locate 1 , 1 Lcd B Locate 1 , 4 Lcd "FAIL!" For A = 1 To 9 Waitms 50 Gosub Sjekk Next A End If Endoflcd: If Is_shown = 1 Then For A = 1 To 15 If Modul(a) > 1 Then Decr Modul(a) If Modul(a) = 1 Then Alarm = 1 Next A 'lifelight If Alarm = 0 Then Porta.1 = Not Porta.1 If Alarm = 1 Then Porta.1 = 0 'setting alarmled If Alarm = 1 And Alarmled = 0 Then Alarmled = 2 If Alarmled > 0 Then Alarmled = Alarmled - 1 If Alarmled = 1 Then Porta.0 = 1 If Alarmled = 0 Then Porta.0 = 0 End If Is_shown = 0 Cls Next B Cls Goto Main End Sjekk: 'setting 15 second timeout If Pina.2 = 0 And Modul(1) <> 1 Then Modul(1) = Timeout If Pina.3 = 0 And Modul(2) <> 1 Then Modul(2) = Timeout If Pinc.2 = 0 And Modul(3) <> 1 Then Modul(3) = Timeout If Pinc.3 = 0 And Modul(4) <> 1 Then Modul(4) = Timeout If Pinc.4 = 0 And Modul(5) <> 1 Then Modul(5) = Timeout If Pinc.5 = 0 And Modul(6) <> 1 Then Modul(6) = Timeout If Pinc.6 = 0 And Modul(7) <> 1 Then Modul(7) = Timeout If Pinc.7 = 0 And Modul(8) <> 1 Then Modul(8) = Timeout If Pind.0 = 0 And Modul(9) <> 1 Then Modul(9) = Timeout If Pind.1 = 0 And Modul(10) <> 1 Then Modul(10) = Timeout If Pind.2 = 0 And Modul(11) <> 1 Then Modul(11) = Timeout If Pind.3 = 0 And Modul(12) <> 1 Then Modul(12) = Timeout If Pind.4 = 0 And Modul(13) <> 1 Then Modul(13) = Timeout If Pind.5 = 0 And Modul(14) <> 1 Then Modul(14) = Timeout If Pind.6 = 0 And Modul(15) <> 1 Then Modul(15) = Timeout Reset Watchdog 'reset If Pind.7 = 0 Then Alarm = 0 For A = 1 To 15 Modul(a) = 0 Next A Cls Locate 1 , 1 Lcd "Reset!" For A = 1 To 9 Waitms 50 Reset Watchdog Next A Cls Waitms 50 B = 0 Goto Endoflcd End If Return