This post is part of the Rack Box Project series.
Serial (RS-232) interface module; providing 15 digital inputs. Uses an AVR ATmega8 microcontroller.
Table of contents
Details
This serial I/O module is connected to a computer serial port, and reports the status of 15 inputs. It is a rebuild of a previous module.
When an input is activated; the unit sends the status to the computer instantly. Each input has a hysteresis of three seconds to prevent unwanted rapid switching. 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.
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 Life-signal (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: Life-signal
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 and the SIOS protocol.
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 'life-signal
Serial settings
- Baud: 9600
- Data bits: 8
- Parity: None
- Stop bits: 1
Source code
- Bascom-AVR source is available in a git repository:
- https://github.com/thomasjsn/AVR-Online-monitoring-unit
Photos
Schematic drawing
Parts list
- 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
Last commit 2024-11-11, with message: Add lots of tags to posts.
All posts in Rack Box Project series
- Parallel port I/O module
- Power supply and fuse monitoring module, AVR
- Monitored fuse box, 6 channels
- Stack lights and horn controller — with AVR
- Mute and light controller for the Rack box — AVR module
- Monitored fuse box, 4 channels
- Module heartbeat monitor, 6 inputs — AVR
- Controller for lights and relays — AVR driven
- Emergency power off controller — controlled by 555 timers
- Fan controller with LCD — AVR powered
- Sound alarm control unit — AVR module
- Multiplexer output extender
- Multi-purpose AVR module
- Electric heater and timer controller — AVR
- Module heartbeat monitor, 15 inputs — LCD and AVR
- Serial port I/O module with 11 inputs — AVR
- Serial port I/O module with 9 in and outputs — AVR
- Serial interface for emergency power off — AVR
- Status panel for the Rack box project
- Intruder alarm system controller — AVR
- Serial port I/O module with 15 inputs — AVR
- Serial interface module, with analog and digital I/O — AVR
- The rack box project — an overview