CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Communication method for long distance 3coreelectrical cable

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Mesuty
Guest







Communication method for long distance 3coreelectrical cable
PostPosted: Thu Mar 10, 2005 12:29 pm     Reply with quote

Hello
In my last project , I have finf a reasonable way to communicate 2 PIC devices in a 3 km distance. Communication rate can be as low as 115 Baud. The communication will be performed over an classical 3 core , 2.5 mm2 electric cable that does not used to carry electricity anymore. Because of the geographical conditions , I have no chance to replace that cable with a usual comm cable.

Could someone suggest a proper way ?
Guest








Re: Communication method for long distance 3coreelectrical c
PostPosted: Thu Mar 10, 2005 12:31 pm     Reply with quote

Mesuty wrote:
Hello
In my last project , I have to find a reasonable way to communicate 2 PIC devices in a 3 km distance. Communication rate can be as low as 115 Baud. The one pic will send a couple of values to other , uni directional communication scheme. The communication will be performed over an classical 3 core , 2.5 mm2 electric cable that does not used to carry electricity anymore. Because of the geographical conditions , I have no chance to replace that cable with a usual comm cable.

Could someone suggest a proper way ?
ljbeng



Joined: 10 Feb 2004
Posts: 205

View user's profile Send private message

PostPosted: Thu Mar 10, 2005 1:27 pm     Reply with quote

Look at MAX485 or similar RS485 chips.
Guest








PostPosted: Thu Mar 10, 2005 3:03 pm     Reply with quote

According to spec, RS485 transceivers can drive a twisted pair line as
long as 1.2Km, the reflections and signal losses in the classical 3 core in a
3Km distance will be an invitation to problems.
I would try using in the Tx side a MOSFET switch and in the Rx side
optocouplers (type 6N137) with Digital Outputs as front ends to overcome
noise problems.
The use of a Tx software handler to adjust the bit-timings to compensate
the low slew/rate in the other end to keep the original shape will be a
must. Of course there are more considerations to take in mind but this is
the general rule I will follow.

Humberto
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Thu Mar 10, 2005 3:06 pm     Reply with quote

According to spec, RS485 transceivers can drive a twisted pair line as
long as 1.2Km, the reflections and signal losses in the classical 3 core in a
3Km distance will be an invitation to problems.
I would try using in the Tx side a MOSFET switch and in the Rx side
optocouplers (type 6N137) with Digital Outputs as front ends to overcome
noise problems.
The use of a Tx software handler to adjust the bit-timings to compensate
the low slew/rate in the other end to keep the original shape will be a
must. Of course there are more considerations to take in mind but this is
the general rule I will follow. My $0.02

Humberto
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Thu Mar 10, 2005 3:22 pm     Reply with quote

I would go to the site, short one end of the cable, and measure the noise at the other end. If you are going to use 1200 baud or slower a DVM will do for noise measurement, no need to drag out a scope.
I will bet that straight RS485 will work just fine. You may need some RC low pass filters if there is lots of noise. For a 100 Ohm cable impedance (a reasonable guess) and a corner frequency of 3kHz (to support 1200 baud) a capacitor of 3.3uF (nonpolar) should work. I would start with the usual 100 Ohm terminating resistor with a 1uF ceramic cap on each end of the cable. If it almost works try doubling or trippling the caps.
The delux version would be a low pass ladder network of series resistors and parallel caps, but I seriously doubt you need to get that complex.
Adding a checksum to the messages and a way to request a resend of any that are garbled would be nice as well.
_________________
The search for better is endless. Instead simply find very good and get the job done.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Thu Mar 10, 2005 3:27 pm     Reply with quote

Run power back through it and use X10 Razz
Kenny



Joined: 07 Sep 2003
Posts: 173
Location: Australia

View user's profile Send private message

PostPosted: Thu Mar 10, 2005 4:32 pm     Reply with quote

If noise is a problem and RS485 doesn't work out, consider current loop.
We usually use the Burr Brown (TI) XTR115/ XTR116 chips for 4 to 20mA,
but in this case the Agilent HCPL-4100 and HCPL-4200 4 to 20mA transmitter and receiver look more appropriate. See fig. 16a of the following.
There is a transmitter and receiver at each end of the loop.
There is also optical isolation.
http://www.dieelektronikerseite.de/Datasheets/Optokoppler/HCPL4100%20(Agilent).pdf

Of course, extensive error checking would need to be done.

Mark, re X10, how good is it and how expensive?
Hans Wedemeyer



Joined: 15 Sep 2003
Posts: 226

View user's profile Send private message

Current drive like 4-20mA is the way to go
PostPosted: Thu Mar 10, 2005 5:44 pm     Reply with quote

I assume yo mean 115 Baud and not 115,200 Baud. BTW 110 Baud is a more "normal" Baud rate.

Electrical cable is typically not twisted, so RS485 will not work very well.

As you are only doing 115 Baud then Kennys suggestion 4-20mA will work.

115 Baud is close to second harmonic of power line 60Hz, if possible use a Baud rate that is further away from 60 Hz (I assume it's in a 60Hz country) So 110 Baud gets you further away.

I like the noise measurement idea using a simple AC voltmeter, it will tell you a lot about what to expect. Remember to put a load on each end of the cable equla to the driving source impedance, then the noise measurment will make more sense.

Hans W

If you do not want to use 4-20mA drivers, at that Baud rate you could do your own version of it.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Thu Mar 10, 2005 7:52 pm     Reply with quote

Kenny wrote:
If noise is a problem and RS485 doesn't work out, consider current loop.
We usually use the Burr Brown (TI) XTR115/ XTR116 chips for 4 to 20mA,
but in this case the Agilent HCPL-4100 and HCPL-4200 4 to 20mA transmitter and receiver look more appropriate. See fig. 16a of the following.
There is a transmitter and receiver at each end of the loop.
There is also optical isolation.
http://www.dieelektronikerseite.de/Datasheets/Optokoppler/HCPL4100%20(Agilent).pdf

Of course, extensive error checking would need to be done.

Mark, re X10, how good is it and how expensive?


We quit using it a couple of decades ago Very Happy Electronic ballasts killed it for commerical appications for us. It is still available for residential though.
jbmiller
Guest







long distance communications.
PostPosted: Fri Mar 11, 2005 12:28 pm     Reply with quote

For the past 30+ years(ugh,getting old) I've used a simple method using what can best be described as a true single wire tri-level,interlaced,proprietory(hacker proof) system to do remote energy control. It easily goes 20Km and back at 24 Baud.yes, twenty four baud. Drop it down to 16 baud and I can go at least 45Kms. Slow but reliable.Uses +-60 volt transmitter( homemade diff opamp) and optocouplers for rec. fuctions. has ability to detect broken wires anywhere in system. Was designed for 32 remotes and could isolate bad/open copper. Always impressed Bell guys that I knew where the trouble was long before they did.
Ah the good ol' days.
Jay
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Fri Mar 11, 2005 8:49 pm     Reply with quote

Quote:

It easily goes 20Km and back at 24 Baud.yes, twenty four baud.


Slower than a telex !!! Shocked they used to run at 50 bauds...

"Ah the good ol' days." Nice comments Very Happy

Humberto
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group