I have started migrating content to my Hugo blog at https://blog.cavelab.dev, already migrated pages will redirect there.
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.
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
Serial (RS-232) interface module; providing 15 digital inputs. Uses an AVR ATmega8 microcontroller.
Details
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
- PC0 In 1
- PC1 In 2
- PC2 In 3
- PC3 In 4
- PC4 In 5
- PC5 In 6
- PD3 In 7
- PD4 In 8
- PD5 In 9
- PD6 In 10
- PD7 In 11
- PB2 In 12
- PB3 In 13
- PB4 In 14
- PB5 In 15
Outputs
- PB0 Lifesignal (to Module stability monitoring unit 2)
- PB1 Link activity LED
Interface
- PD0 RS-232 Rx
- PD1 RS-232 Tx
Connectors
Wires
- Red
- 5V
- White
- 0V
- Green
- Lifesignal
15-pin
- In 1
- In 2
- In 3
- In 4
- In 5
- In 6
- In 7
- In 8
- In 9
- In 10
- In 11
- In 12
- In 13
- In 14
- 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

https://github.com/thomasjsn/AVR-Online-monitoring-unit