Serial port IO module with 15 inputs

From CaveLab
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.
Serial port IO module installed in the rack box

OMU2 is connected to a computer serial port, and reports the status of 15 inputs. If a input is activated the unit sends the status to the computer instantly, each input has a timeout of three seconds. It's also possible to request the status of any input at any given time. Every 20th second a life pulse is sent to Serial Server.

After the Rack box project was terminated, this project was rebuilt into Temperature and humidity sensor (RS232).

I/O

Inputs

  1. PC0 In 1
  2. PC1 In 2
  3. PC2 In 3
  4. PC3 In 4
  5. PC4 In 5
  6. PC5 In 6
  7. PD3 In 7
  8. PD4 In 8
  9. PD5 In 9
  10. PD6 In 10
  11. PD7 In 11
  12. PB2 In 12
  13. PB3 In 13
  14. PB4 In 14
  15. PB5 In 15

Outputs

  1. PB0 Lifesignal (to Module stability monitoring unit 2)
  2. PB1 Link activity LED

Interface

  • PD0 RS-232 Rx
  • PD1 RS-232 Tx

Connectors

Wires

Red
5V
White
0V
Green
Lifesignal

15-pin

  1. In 1
  2. In 2
  3. In 3
  4. In 4
  5. In 5
  6. In 6
  7. In 7
  8. In 8
  9. In 9
  10. In 10
  11. In 11
  12. In 12
  13. In 13
  14. In 14
  15. In 15

9-pin

  • 2 Transmit
  • 3 Receive
  • 5 GND

Communication

Interfacing is done with RS-232, using MAX232 or MAX202.

001:i:02:1:116 'in 2 on                                                                
001:i:01:1:115 'in 1 on 
001:i:02:0:116 'in 2 off                                                                
001:i:01:0:115 'in 1 off
001:s:01:1:126 'lifesignal                                                                  

Serial settings

Baud
9600
Data bits
8
Parity
None
Stop bits
1
Start command
0
Module ID
001

Source code

Git-alt-brands.svg
Bascom-AVR source is available in a git repository:
https://github.com/thomasjsn/AVR-Online-monitoring-unit

Gallery

Schematic drawing

Omu2 circuit.png

Parts list

Qty. Part
1 × AVR ATmega8-16PU, DIL-28, 16 MHz, 23 I/Os
5 × Capacitor, aluminium electrolytic, 1 µF, 50V
1 × Capacitor, aluminium electrolytic, 10 µF, 25V
1 × Capacitor, ceramic, 1 nF, 100V
2 × Capacitor, metallized polyester foil, 10 nF, (0.01 µF)
1 × D-sub soldering cups, 15 pin male
1 × D-sub soldering cups, 9 pin female
1 × DIL socket, 16-pin, 7.62mm
1 × DIL socket, 28-pin, 7.62mm
1 × Enclosure, plastic (1591 FL), 120x65x40mm, flange
1 × Fuse 5x20 mm, 200 mA, fast-acting
1 × Fuse holder, open, PCB, 5x20mm
1 × Fuse holder, open, PCB, Protective cover
1 × LED 5mm clear, Yellow, 2.0V, 20mA, 250mcd, 6°
1 × LED 5mm coloured clear, Green, 2.1V, 20mA, 30mcd, 10°
2 × LED holder 5mm, RTC51, black plastic
2 × Mounting bracket, DIN rail, Plastic
32 cm2 PCB, stripboard, 100x160mm, 160cm2
17 × Resistor, carbon film, 0.25W, 330 Ω, 5%
2 × Resistor, carbon film, 0.25W, 4.7 kΩ, 5%
15 × Resistor, carbon film, 0.25W, 10 kΩ, 5%
1 × RS232 interface, MAX232CPE, dual
22 × Straight pin header, female, Single row, 2.54mm
30 × Straight pin header, male, Single row, 2.54mm
1 × Transistor, NPN, 100 mA, 45V, 0.5W, BC547B