I have started migrating content to my Hugo blog at https://blog.cavelab.dev, already migrated pages will redirect there.
Advanced serial interface module (RS232 IO)
This module was part of the rack box project — which was terminated when I moved out of my first apartment.
Serial (RS-232) interface module; providing 6 analog and 2 digital inputs, and 9 digital outputs. Uses an AVR ATmega8 microcontroller.
Details
ASIM provides 6 analog and 2 digital inputs, and 9 digital outputs for the computer serial port. The outputs give GND when activated, max load pr. channel: 100mA. The digital inputs are triggered when they are connected to GND, the analog inputs need to be queried for the value. The A/D converter is 10-bit, so 0-5 volt is reported back as 0-999. For sensors outside the Rack box, a 1uF capacitor is connected between GND and the signal input, this removed noise and allows for a stable input signal.
This module measures the voltage of the 5, 13.8 and 24 volt supply and the Rack box temperature (LM35). The two auxiliary analog inputs can be connected to any 0-5V voltage sensor, currently connected to two external LM35 temperature sensors.
By sending commands to the module one can change the status of the outputs, the module will confirm when the action is carried out. It's possible to ask for the current status of any in- or output, this is done by not sending a set value. All commands from the module is sent with a checksum.
I/O
Inputs
- PC0 5V voltage meter
- PC1 13.8V voltage meter
- PC2 24V voltage meter
- PC3 Temperature rack box
- PC4 Input 5 (Analog)
- PC5 Input 6 (Analog)
- PD5 Input 7
- PD6 Input 8
Calculations
- Voltage
- Temperature
Outputs
- PB0 Output 1
- PB1 Output 2
- PB2 Output 3
- PB3 Output 4
- PB4 Output 5
- PB5 Output 6
- PB6 Output 7
- PB7 Output 8
- PD2 Output 9
- PD3 Lifesignal (to Module stability monitoring unit 2)
- PD4 Link activity
D-sub 25-pin
- 13.8V
- 0V
- Input 5V (Analog)
- Input 24V (Analog)
- 5V to analog sensor
- 0V to analog sensor
- Input 5 (Analog)
- Input 6 (Analog)
- Input 7
- Input 8
- Output 1
- Output 2
- Output 3
- Output 4
- Output 5
- Output 6
- Output 7
- Output 8
- Output 9
- Lifesignal
Communication
Interfacing is done with RS-232, using MAX232 or MAX202.
Serial settings
- Baud
- 9600
- Data bits
- 8
- Parity
- None
- Stop bits
- 1
- Start command
- 0
- Module ID
- 005
Source code

https://github.com/thomasjsn/AVR-Advanced-serial-interface-module
Gallery
Schematic drawing
Parts list
External temperature sensor
Qty. | Part |
---|---|
1 × | Capacitor, aluminium electrolytic, 1 µF, 50V |
1 × | Capacitor, aluminium electrolytic, 10 µF, 25V |
1 × | Capacitor, metallized polyester foil, 10 nF, (0.01 µF) |
2 m | Control cable, 4-cores, 0.25mm2, 250 V, Ø 4.6mm |
1 × | Enclosure, plastic (1551), 50x50x20mm |
1 × | Resistor, carbon film, 0.25W, 75 Ω, 5% |
1 × | Temperature sensor LM35DZ, 0 to +100 °C, +-0,6 °C |