Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Serial data transmission without line driver? 1

Status
Not open for further replies.

potcore

Electrical
Feb 26, 2007
28
Hi,

We need a simple communication system for our outdoor antenna pattern testing range. The sender and receiver are separated by some 90 metres (Antenna frequencies are 1GHz upwards.). The receiver is up a 20 metre tower.

Please see rough diagram…....

47u17a8.jpg


It has been decided to send bytes on cheapest 2-core cable serially (using our own simple serial protocol) from sender to receiver to indicate actions to be taken by the receiver personnel….”eg Hex 55 means change frequency to 5.5GHz” etc etc. (The received bytes will be displayed on LEDs). The transmitter and receiver are both PIC controlled…

Please see diagram…….....

2cr6cnn.jpg


I have been told that since I am using 100 metres of 2-core cable, that I will need to use a Line Driver chip, (eg MAX232) so as to mitigate the effect of line capacitance (incidentally the 100metre line has DC resistance of just 9 ohms, I don’t know its capacitance)

However, I have set the circuit up and as an experiment, sent a stream of 50kbps on/off pulses from the sender PIC to the Receiver PIC along the 100 metre length of cable. The receiver PIC succesfully receives the pulses and outputs them on another port, where I scoped it as a check.

My pulse train was Unipolar-Non-Return-to-Zero (ie logic high = 5V, logic low = 0V) as shown in the above diagram.

Even though I have successfully received serial pulses at 50kbps over 100 metres, I have been told to use a MAX232 line driver chip, to convert the unipolar pulses from the PIC to bipolar RS232 type pulses.

I don’t believe this is necessary, but have been told that my system will not be “robust” without the Line Driver chip.

My "dummy" data stream was sucessfully received over a 100 metre cable without any line driver..........the Pic ports are just directly connected via the 100 metre cable.

Does any reader know if I really do need to use a Line Driver chip?
 
Replies continue below

Recommended for you

You may find that you will regret not using a "proper" serial link both in terms of signalling method and message protocol.

Depending on the drive impedance of the PIC port you are driving the serial data from, and the receive port logic threshold, for the cost of a line driver and receiver you risk poor noise immunity on the serial link, e.g. what about r.f. from your test antennas getting into the cable?

Ideally the cable should be shielded twisted pair - even for 90 metres - better still, it should be differential RS422 signalling.

Simple Hex data may seem like a good idea, but I bet you will quickly find it too limited ("If only we could send a more complex/longer message......")Why not use a standard code like regular ASCII?
 
RS232 just flat won't work right at that baud rate and distance, and isn't designed to, so forget the MAX232.

Current loop is the next logical cheap choice. You are sort of doing that now with your lab setup, but the current is small, there's probably no difference in ground potentials between transmitter and receiver, and your signal wire is probably not picking up local radio stations. Away from the lab, that stuff will mess you up.

Go ahead and use your unipolar signaling, but put an optoisolator at the receiving end to keep the Earth currents out. Driving an LED will provide some current on the long signal wires. I think a 4N25 will go fast enough if you put a ~56k resistor from base to emitter to drain off the base charge.

Even with that, even with RS-422, you may still get corrupted or missing or extraneous pulses. If they do no harm and the receiver doesn't get confused, fine. Usually, it's a problem, so you may eventually want to transmit your data in packets with error detection. It doesn't have to be real fancy.

If you send all data as ASCII symbols, with a checksum also sent as ASCII, and <cr><lf> as a packet delimiter, you can use a serial terminal (with current loop input or current loop to RS232 adapter) as a debugging tool.

Not that your stuff would ever have bugs in it...



Mike Halloran
Pembroke Pines, FL, USA
 
Hiya-

I'm a little curious. In your OP, you mentioned:

"... from sender to receiver to indicate actions to be taken by the receiver personnel…"

If this is the case, I might suggest that you transmit
data from the sender to the receiver at a MUCH slower
data rate.

If I remember my RS232 commuications data from a couple of
decades ago, anything greater than *ABOUT* 25 feet and
greater than *ABOUT* 9600 baud should be considered an
"engineering connection". I.E. it might work, but not
within specs.

If you slow down your transmission speed you should
find much more reliable communications.

Indeed, with the pic, you could implement several different
schemes without too much more programming effort to
enhance the reliablilty. Say, send three and throw away
the different byte (if any) or some other such scheme.

I would suggest, besides lowering the baud rate, some
of the differential drivers and receivers as mentioned
by the poster above. With a little line conditioning
one should not have too much of a problem.

The addition of optoisolators could also be a usefull
alternative. Isolation on the antenna test range would
be of interest as I'm sure that there is a lot of
"stray" RF energy floating around.

Hope this helps.

Cheers,

Rich S.
 
walkie talkie? cordless phone? Tin cans and string?
Any of these using a "vocal" protocol..."Joe, 5.5 GHz please"
 
To really rub it in...

Outdoor? Huh? No lightning? No occasional ground faults? No interference from whatever there is besides the microwave antennas? And, what about the antennas? They do radiate some power, don't they?

I think it is pure stoopidness trying to spare a few bucks on a thing like this. I would use isolators plus line drivers - and when I think a little more - probably a set of short haul modems.

A company doing tests like this probably likes a realiable system a lot more than learning that you saved them a couple of dollars.

I get really mad when I think about this.

Gunnar Englund
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...
 
If it were me? I'd go with a 422 driver and run things in the 2400-9600 Baud range. The optoisolators are probably a good idea considering the tower and transmission equipment... 100 meters will turn into a pretty good antenna if not shielded, and a strong local station could send some god-awful strong pulses your way.

Dan - Owner
Footwell%20Animation%20Tiny.gif
 
Serial to fiber optic link converters?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"It's the questions that drive us"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 
Just consider that if you wind up blowing a day's worth of testing, that probably amounts to thousands of dollars lost in time, labor, and facility costs. Not counting whatever schedule slip is incurred to recover the testing.

Is that really worth saving a few bucks, even with your sucessful, but extremely limited testing?

TTFN

Eng-Tips Policies FAQ731-376


 
Thanks for replying. I have got it working in the lab with the 100 metre cable without the line drivers -but appreciate that in the "field" i could get noise problems -however, i doubt the source antenna will be a problem -as we only transmit a maximum of 10dBm, -also, since the dish antennas are very directional, i doubt much RF energy will get to the data cable which will be running along the ground and then up the tower.

Incidentally, concerning "RS232 just flat won't work right at that baud rate and distance, and isn't designed to, so forget the MAX232." (3rd thread down) -In the lab, I have actually put in MAX232's at transmit and receive ends and tried it and it also works, and sucessfully transmits/receives the shown 50kbps pulses over the 100 metre length of cable. The 100 metre cable is the cheapest one i could find, its just two insulated wires (not twisted) in parallel. They are not shielded. The wires are multi-stranded.

I worry about the ground currents mentioned. Of course, in the lab it works fine and the square 20us pulses are perfect, non-noisy, square at the recieve end (with or without the MAX232'S). When "in the field" The sender and receiver will both have their 0V's connected to the mains earth (as they have been in the lab)-and this should be therefore pretty much the same potential at send and receive end.
 
Mike's idea of an opto would solve most of your catastrophic failure issues. Use a bus driver to drive the LED. It will give a good signal and protect the PIC. I suggest that you tie one end of your cable to a drill and and that you make it a twisted pair before installing it.
 
Again, I caution you to not assume that your field setup is really that clean. Even ignoring your own equipment's EMI, there's a lot more crap outside. Grounds that are 100 m apart can be worlds apart.

I really can't understand your insistence on picking the least robust approach, when even going to RS-422, which is not that more expensive, will provide substantial noise immunity.

TTFN

Eng-Tips Policies FAQ731-376


 
It is probably a very young and unexperienced person that needs to prove his case. I was like that once - I know better now.

Gunnar Englund
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...
 
Out here in the country, we've got these railroad crossings marked by big X's on posts on etiher side of the road. No blinking lights, no lowering gate, no gongs, just the big RR crossing X. The train blows its whistle, but with the windows up for A/C in the summer and heat in the winter, you can't always hear the whistle.

If you live hereabouts, you know that you, the vehicle driver, are responsible for only crossing the RR tracks if it's safe. And RR crossing laws are part of the state driving exam.

I know one of the train engineers. He has dozens of stories of people speeding up to beat the train. And most of 'em make it, most of the time.

But every once in awhile, one doesn't it. And it seems it's always a young 'un. One who knows for certain how fast the train is coming, knows for certain how fast he's going, knows for SURE his car can beat the train. Yet, train hits the car on the crossing and kills him.

After the 3rd death in about 5 years at the local RR crossing a mile from the house here, the railroad put up blinking lights and a gate that lowers. And the trains still blow their whistles.

But even with the lights and gate and whistle and a state driving test that covers RR crossing laws, two months ago, another young 'un dodged around the gate and died when the train engine smashed his car.

Sometimes warnings and the best intentioned, best informed advice just doesn't stick, does it?

Dan

 
That, unfortunately, or not, is not just a rural phenomenon. We get those at least once a year, somewhere in the greater LA area. To compound matters, we have Metro rail in addition to normal trains.



TTFN

Eng-Tips Policies FAQ731-376


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor