You are on page 1of 29

HCMC UNIVERSITY OF TECHNOLOGY AND EDUCATION

FACULTY OF ELECTRICAL AND ELECTRONIC ENGINEERING

Đo lường và điều khiển bằng máy tính


(Measurement and control based on computer)

Lecturer: TS. Trần Mạnh Sơn


Bộ môn Tự động Điều khiển
Email: sontm@hcmute.edu.vn
0919 1971 39

1
HCMC UNIVERSITY OF TECHNOLOGY AND EDUCATION
FACULTY OF ELECTRICAL AND ELECTRONIC ENGINEERING

Chapter 6

Serial Data Communications

2
Chapter 6: Serial Data Communications

 Definitions
 RS-232 standard
 RS-485 standard
 USB standard
 Ethernet
 The 20 mA current loop
 Serial interface converters

3
Chapter 6: Serial Data Communications

All data communications systems have three common components:


• The source of data: convert signal into one that is compatible with
the communication link, called transmitter or line driver
• The communications link: transfers message to the receiver
• The receiver of data: convert the signal back into a compatible
one
They must agree on the following factors:
• The type of electrical signals used to transmit the data
• The type of codes used for each symbol being transmitted
• The meaning of the characters
• How the flow of data is controlled
• How errors are detected and corrected
4
Chapter 6: Serial Data Communications

 Interface standards: The hardware rules that apply to the physical


interface and its connections
 Protocol: the software rules which apply to the format and control
of data flow and the detection and correction of errors
 Transmission modes:
 Simplex
 Duplex: Half duplex, full duplex

5
Chapter 6: Serial Data Communications

6
RS-232-C interface standard

The electronic Industries Association (EIA) RS-232 interface standard


is probably the most widely known of all serial data interface standards
The EIA-232 standard consists of three major components
 Electrical signal characteristics: Electrical signals such as the
voltage levels and grounding characteristics of the interchange
signals and associated circuitry
 Interface mechanical characteristics: between DTE and
DCE, the interface must consist of a plug and socket
 Functional description of the interchange circuits: define the
function of data, timing and control signal used at the interface
between DTE and DCE

7
RS-232-C interface standard

8
RS-232-C interface standard

The signal voltage levels:


• + 3V to + 25V for transmission of logic 0
• -3V to -25V for transmission of logic 1
• +3V to -3V for an undefined logic level
Actually, the transmitter proceduce slightly higher voltages:
• + 5V to + 25V for transmission of logic 0
• -5V to -25V for transmission of logic 1
• +5V to -5V for an undefined logic level

9
RS-232-C interface standard

10
RS-232-C interface standard

 Interface mechanical characteristics


The smaller DB-9 connector (9 pin D-type) is commly used for
compatible equipment

11
RS-232-C interface standard

 Main features of the RS-232 interface standard


• Communication is point-to-point
• suitable for serial, binary, digital, data communication (data is sent
bit by bit in sequence
• Most EIA-232-C communications data is in the ASCII code
• Communication is asynchronous (fixed timing between data bits,
but variabletime between character frames)
• Communication is full-duplex (both directions simultaneously)
with a single wirefor each direction and a common wire
• Voltage signals are:
1. Logic 1: –3 volts to –25 volts
2. Logic 0: +3 volts to +25 volts
12
RS-232-C interface standard

• The communications signal voltages are ‘unbalanced’, making


them more susceptible to noise

13
RS-232-C interface standard

14
RS-232-C interface standard

 The main limitation of EIA – 232:


• The point-to-point restriction is a severe limitation when several
‘smart’ instruments are used
• The distance limitation of 15 m end to end is too short for most
control systems. The 115 kbps rate is too slow for many
applications
• The –3 to –25 volts and +3 to +25 volts signal levels are not
directly compatible with the modem standard power supplies in
computers of ±5 volts and ±12 volts

15
RS-485 interface standard

 RS-485 provides reliable serial communications for:


• Distances of up to 1200 m
• Up to 32 line drivers permitted on the same line
• Up to 32 line receivers permitted on the same line
RS-485 is that a line driver can operate in three states (called tristate
operation), logic ‘0’, logic ‘1’ and high-impedance => Only one line
driver can be active at any one time.
Each terminal in a multidrop system must therefore be allocated a
unique address to avoid any conflict with other devices on the system

16
RS-485 interface standard

On short lines, the leading and trailing edges of data pulses will be
much sharper if terminationg resistor, typically between 100 and 500
Ohm to reduce the effect of reflections at the ends of the line
When all RS-485 line drivers are off and the communications lines are
in ‘idle’, the lines are susceptible to noise pickup, which can be
interpreted as random characters on the communications line.

17
RS-485 interface standard

18
RS-485 interface standard

 RS-485 repeaters
RS-485 line drivers are designed to drive up to 32 receivers on a network

19
RS-485 interface standard

 Comparison of RS-232 and RS-485 standards

20
The 20 mA current loop

21
Ethernet – The Uinersal Serial Bus (USB)

Ethernet, in the past, has been usually thought of as an office


networking system. Now many manufacturers are using Ethernet and
industrial fieldbuses as communication systems to interconnect data
acquisition devices.
In September 23, 1998 Microsoft, Intel, Compaq, and NEC developed
Revision 1.1 of the universal serial bus:standardize the input/output
connections on the IBM PC for devices like printers, mice, keyboards
and speakers
The biggest problem is the maximum cable distance. The low speed
version is limited to 3 meters and the high-speed version is limited to 5
meters in total cable length. This requirement reduces the ability of USB
to be used in a large, factory or plant, environment => Limits the use of
the USB to laboratories and or bench top systems
22
Serial interface converters

Interface converters are increasingly important today with the


movement away from RS-232C to the industrial interface standards such
as RS-485. Since many industrial devices still use RS-232 ports, it is
necessary to use these converters to interface the device to other network
standards

23
Serial interface converters

UART TTL to Ethernet

24
Serial interface converters

UART TTL to Ethernet

25
Serial interface converters

UART TTL to Ethernet

26
Serial interface converters

RS232/RS485 to Ethernet

27
Serial interface converters

USB to RS485

28
Serial interface converters

RS485-CAN

29

You might also like