Data telemetry - the physical layer

 

Introduction

Like databases, remote data aquisition and remote control are being used in more and more places. Increasingly, data telemetry doesn`t live in isolation, it may include the internet in the transmission path, and frequently the end part of the data transfer route is being carried on company networks.

Not only that, but the data is being integrated into systems and programmes available on the corporate desktop.

Systems and programmes are inevitably built around protocol stacks, with the stacks being built out of various layers, each layer is based on some specific protocol. So for example -

All these stacks have three things in common -

Data telemetry is effectively one of the varients of the physical layer and maybe the data link layer - it can be used by many different types of systems, such as remote control via SCADA of pipelines, dams, power stations, wind generators - aquisition of data for maritime research - animal tracking - environmental monitoring.

Data telemetry can be based on quite a few different technologies - including RS232, RS 422, RS485, GSM, GPRS, 3G, satellite, fibre, ethernet - as well as the good old fashioned telephone system.

As well as these, as indicated above, telemetry data is increasingly being found on corporate networks as businesses decide they need wider access to the data. It is a security issue, as it exposes the incoming data or outgoing control signals to various kinds of attack which would be much less likely on a closed telemetry network.

In the sections or pages that follow, some of these technologies and issues are discussed.

 

RS232

Historically, the remote terminal unit ( RTU ) commonly connected to the control room using RS232 - a full duplex point-to-point serial communication protocol that works over short distances. For longer distances, modems and a standard telephone system extended the RS232 link.

RS232 is quite an old standard - it specifies positive and negative signals in the range of 3 - 25 volts to represent the binary states of 1 and 0. Because of this quite large voltage swing, it has quite a slow bit rate, in the hundred or low thousand range of bits per second. Maximum rate I have seen quoted is 19,200 baud, typical speeds used are 300, 1200, 2400 baud.

RS232 uses negative polarity logic - that is - a logical "1" is indicated by a negative voltage, and a logical "0" is indicated by positive voltage.

It is not part of the standard, but historically, RS232 used 25 pin D-connectors, with well established but not always consistent pin-outs. There have been various modified versions of RS232, one of them stripped out many of the control and handshaking signals, and uses 9 pin D-connectors.

Many years ago I wrote a web page about the connections used by RS232 - it is buried within the data communications section of this site, and here is a link to it, if you want to know more about it.

 

However despite its age and limitations, it is still well used and very much alive. Early desktop computers often had a 25 pin or a 9 pin serial data connector - sometimes used for modems. However USB pushed them into obscurity.

However there is a host of manufacturers out there producing quite a range of products for the connection of RS232 equipment on to pc`s and laptops - things like :-

These are quite up-to-date products, some of them list drivers for Vista and for Windows 2008. Some of the manufacturers product lines are orientated towards specific uses.

It looks as if there are two specific problem areas when connecting RS232 devices to pc`s or laptops.

The first of these is talking to the device through the serial connection - RS232 is implemented in numerous different ways, for example, different speeds, different uses of control and handshake signals. There are several different versions of software that will do this, including freeware, shareware, and proprietry software.

The software called "HyperTerminal" is proprietry software that was licensed by Microsoft, and bundled with some of their operating systems from Windows 98 through to Windows XP. However it was dropped from Vista - I gather that the version that was bundled with XP can be copied from XP and installed on Vista, but I think the installation folders are different. It should work okay, but I`m not sure about the licence situation.

The two files are :-

Microsoft issued a security patch in 2004 because of a code execution vulnerability in HyperTerminal, it affected XP SP1 and XP SP2, so I`d be looking at XP SP3 for the source of these files.

I believe this same technique works on Windows 7, and I also believe that it will be useful for network engineers who have to connect to Cisco equipment for its administration, using Vista.

Other possibilities include TeraTerm and PuTTY, but there are plenty more.

The other area is to do with processing the data - again there are freeware, shareware, and proprietry software versions available to do this. Some of them quote ODBC as the means to push the data into databases.

One of the other things I found was that there is a wide variation in the useability of USB to serial port adapter cables - some of them chop the control signals at the wrong time, and this can cause problems with the data exchange.

Another thing that I have seen reference to is that usernames / passwords can be transmitted in clear text form, so there is a security risk there, if PLC`s or RTU`s need an administrative logon. Both TeraTerm and PuTTY support SSH, which would allow additional security, if the devices support it.

Something that occurred to me is the possible problems caused by the multiplicity of RS232 connections - for a start, I presume that, like pc`s, the serial port of telemetry equipment or RTU`s is wired as DTE`s - Data Terminal Equipment. So null modem cables will be required to connect them to pc`s.

But if a laptop doesn`t have a serial port, and you want to use USB - is this going involve a null modem cable connected to a gender bender, connected to the serial to USB cable. Or does USB do away with the need for a null modem cable ?

As well as the RS232 page, I also wrote a web page about null modem cables - again it is buried within the data communications section of this site, and here is a link to it.

 

I have been puzzled as to how a USB to serial port adapter can actually work:-

It appears from more digging, that many of these leads are simply changing the connector type from USB to 9-pin D-type, rather than providing RS232 connectivity. They may work in some cases.

There are others that actually contain a chip - FTDI is one manufacturer of these chips, and some suppliers are providing USB to RS232 adapters with the chip built in to the connector body. So these should provide full USB to RS232 connectivity. It looks as if there are drivers available for both XP and Vista. Profilic is another chip manufacturer, and again, you can get leads or small adapter boxes with the chips built in.

Another thought was that most of the telemetry equipment I have seen on the web has a 25 pin connector - but serial to USB cables all seem to use 9 pin serial connectors, so 25 pin to 9 pin adapters are going to be required as well.

The same problem may exist for serial to ExpressCard or PCMCIA card adapters.

Yet another type of adapter cable which would be useful in chasing faults would be a "spy" cable, where a serial to serial cable has an additional one or two connectors which can be used by a laptop to evesdrop on a live connection between a DTE and a DCE. If the laptop is running some data sniffing software, the RS232 traffic can be captured and studied at leisure - an RS232 equivalent of Wireshark.

 

RS422 and RS485

RS485 was or is also used - it is a half-duplex serial bus based system.

RS422 is another protocol that can be used - it is a balanced differential system, so has high noise immunity, and can run at higher speeds.

As with RS232, there is a host of manufacturers producing various items to connect RS485 and RS422 equipment on to computers and laptops.

 

GSM, GPRS, and 3G

The GSM network, mainly known for its voice traffic, also carries a data communication system called GRPS - General Packet Radio Service. It can achieve higher data rates than are available through GSM. Depending on what class of service is being purchased, data speeds up to about 50K bps are obtainable, however there may be different upload and download speeds. It is a packet switching service rather than a dedicated connection service, so cost is based on the quantity of data transmitted, rather than connection time. It is based on TCP/IP. Some service providers use dynamic IP addressing, others will provide a fixed IP address.

GSM is sometimes referred to as second generation, or 2G.

GRPS is sometimes referred to as 2.5G

3G, or third generation, offers data rates in the low Megabit range. So far I haven`t got a definitive answer as to whether 3G uses TCP/IP by default, or whether it uses it as required. It certainly has the capability of using TCP/IP.

I believe that SMS on these carriers can also be used, but I haven`t found much information on it.

 

Satellite

This page is getting a bit long, so I`ve put information about data telemetry via satellite on a separate page.

 

Using optical fibre

There is a separate set of pages elsewhere on this website about the transfer of data over fibre.

 

Using the corporate network

Nearly all corporate networks are nowadays based on TCP/IP, and UDP/IP, running over an ethernet network layer. So if it is required to carry the data over the corporate network, then the telemetry data will have to be wrapped up into TCP/IP or UDP/IP.

A corporate network running on TCP/IP isn`t just a physical layer - it requires a specific 4 layer stack for it to work, and this stack sits below the application related layers.

 

 

 

 

 

website design by ron-t

 

website hosting by freevirtualservers.com

 

© 2024   Ron Turner

 

+                                   +  

 

Link to the W3C website.   Link to the W3C website.