Skip to main content

Network RS232


With an ever increasing number of off the shelf electronic modules and boards available at low prices, designers are inclined to use these instead of making all their electronics from scratch. In many cases this makes sense as developing  say, a PID motor controller or a GPS receiver from scratch requires considerable skill, time and effort. A surprising number of modules still have an interface based on RS232. No wonder, as RS232 is easy implemented on a microcontroller with two I/O pins and a line driver such as the MAX232. In the case where the master is a PC, the serial port is relatively easy to access on both Windows and Linux. Usually modules implement a text terminal interface that decodes single line commands with arguments and generate a reply like this:

Tx: cmd arg0 arg1 ... argX/n
Rx: cmd arg0 arg1 ... argX/n
replyline0/n
replyline1/n … replylineY/n

A complication occurs when there are a number of RS232 modules in a project, as each requires a serial interface at the master. A hardware solution in the form of an RS232  multiplexer would be a solution but wouldn’t  it be nice to get this functionality for free! By deviating from the original aim of RS232 as a point-to-point link, we can have an RS232 network in which all the modules share both transmit and receive lines to one master inter-face. All modules operate at the same speed, start and stop bits with no flow control.

Circuit diagram :

Network RS232-Circuit Diagram

Network RS232 Circuit Diagram

When idle, all the modules are listening for commands from the master and have their transmitters disabled. Each module is configured with an identifier consisting of a number that the master sends as a single line (e.g. ‘2/n’ selects module 2). If a module receives an identifier that matches its own, it is selected and can decode commands and drive its transmitter for the duration of the reply. Conversely, if the identifier does not match it must not decode commands and ensure its transmitter remains disabled.

In addition to some firmware sup-port, the RS232 driver electronics must be able to tri-state the transmitter while keeping the receiver operational. Sadly, the classic MAX232 driver is unsuitable but the ICL3321 and MAX242 are possible candidates for our purpose. These have low-power shutdown modes that power-down the charge pump and transmitters but keep the receivers enabled for monitoring RS232 activity.

The number of modules in your RS232 network is limited by the (nominal) 5 kΩ pull-down at the receiver input of the line driver device. Multiple modules increase the loading on this signal, reducing the maximum operating speed and cable length. Using the circuit shown here, running an application with five modules at 9,600 bps located within 1 meter  of each other did not present any problem.

Modules need a means of enabling the network mode and setting the unique identifier. This can be done via switches, jumpers or, if I/ O pins are scarce, by storing the configuration in the user EEPROM/Flash provided by many  microcontrollers. If the latter is done, it is reasonable to assume the module will only be configured with normal RS232. Special configuration commands can then be provided that are always decoded irrespective of the identifier match.

It is unlikely that commercially available modules can be tweaked to support ‘network’  RS232 unless the vendor has used a suitable RS232 line driver and is prepared to provide the firmware code. However, it is possible to implement on DYI modules and perhaps module designers can take note and enhance the functionality of their future designs.


Comments

Popular posts from this blog

3 Channels Audio Splitter Amplifier Circuit Diagram using TL084

This is the schematic diagram of 3 channels audio splitter amplifier circuit which built using op-amp IC TL084. The 3 channels amplifier output distribution applies a single TL084.   3 Channels Audio Splitter Amplifier Circuit Diagram The very first step is to capacitive coupling having a p. 1.0 ~ electrolytic capacitor. The entries are railways Vee Y2 or 4.5 V. This enables working with an individual 9V power source. A voltage gain of 10 (1 M?/100 Kohm) is obtained in the first stage, as well as the other three floors are connected as a unity gain voltage followers. Every single output stage drives independently through an amplifier output 50 pF capacitor towards the resistance of 5.1 k ohm load. The response range is flat from 10 Hz to 30 kHz.

Simple But Automatic Load Sensing Power Switch

This circuit will automatically switch on several mains-powered "slave" loads when a "master" load is turned on. For example, it will switch on the amplifier and CD player in a stereo system when the receiver is turned on. It works by sensing the current draw of the "master" device through a low value high wattage resistor using a comparator. The output of that comparator then switches on the "slave" relay. The circuit can be built into a power bar, extension cord or power center to provide a convenient set of "smart" outlets that switch on when the master appliance is powered (turn on the computer monitor and the computer, printer and other peripherals come on as well). Automatic Load Sensing Power Switch Circuit Diagram Parts List: Notes: This circuit is designed for 120V operation. For 240V operation, resistors R2 and R6 will need to be changed. A maximum of 5A can be used as the master unless the wattage of R1 is increased S1 provid...

RF amplifier protection

RF amplifier protection I have developed the protection circuit for the EB104 amplifier I am working on, after I finally had some time to design and test a few models. The main requirements have been: - protection in case of high temperature; - protection in case of high SWR; - protection in case of wrong output filter selection; - simple design (i’m a fan of the whole K.I.S.S. rule of thought), able to work in strong electromagnetic fields, reliable, inexpensive. Because i will be using the same directional coupler i have used in the SWR meter (the one made on PCB) wich is directly influenced by the signal frequency, and because i want full HF coverage, i cannot just measure the reflected signal and make a circuit cut the amplifier when it goes over a limit; on 28Mhz the coupler generates roughly 4 times more voltage that let’s say in 7Mhz. So a system that compares direct and reflected signal and triggers when the latter is percentually too high was needed, therefore an operational a...