RS 232 maximum length.

the old fart

Senior Member
Hi Guys,

Picaxe 40x2 chip.

What is the maximum cable length, that would still give a reliable signal at 9600baud?

using shielded twisted pairs.

TOF
 

hippy

Technical Support
Staff member
Are you actually using RS232 or just taking a 0V-5V signal from the PICAXE to something else ?

No matter what, it's often possible to get quite considerable distances. It might be easier to indicate what distance you are hoping for and say whether that's likely easy, realistic, probable or unlikely.
 

the old fart

Senior Member
Thanks for datasheets Besqeut.


Hi Hippy, using rs232 from/to picaxe chip at 9600baud.

not decided on distance, greater the better.
 

Circuit

Senior Member
Is this the same application as you were considering ERF transceivers for? - the outdoor large scale model railway? If so, perhaps one should steer you straight away towards RS485 rather than the less noise-resistance and less-transmission range of the RS232. Hippy asks if you are actually using RS232 or are you proposing the serial output of a PICAXE? RS232 requires drivers and is usually operated at +/-12 volts against the PICAXE 0 to +5 volts. If you are thinking of long-distance outdoor cabling and want reliable operation in an environment that is in any way electrically noisy (I presume your locomotives are electric?) then start off by looking at RS485 drivers. Think of RS485 being like the ARF modules, RS232 being XRF modules and PICAXE serial being ERF modules and you may get my drift.

Do your really need 9600 baud? Perhaps if you could let us know precisely what type of control signals you are trying to transmit and for what purpose we could be of more help. (If you can slow down your data-rate then you can achieve much longer range; that applies generally to radio transmission as well as cable-linking).
 

fernando_g

Senior Member
I second the motion of using RS485. If you are planning to use a transceiver IC anyways, go the better route and use RS485.

I've also seen people use a CAN transceiver for the physical layer, while still using standard serial data. CAN transceivers are as close as you can get to bomb-proof wired communications.
 

the old fart

Senior Member
Is this the same application as you were considering ERF transceivers for? - the outdoor large scale model railway? If so, perhaps one should steer you straight away towards RS485 rather than the less noise-resistance and less-transmission range of the RS232. Hippy asks if you are actually using RS232 or are you proposing the serial output of a PICAXE? RS232 requires drivers and is usually operated at +/-12 volts against the PICAXE 0 to +5 volts. If you are thinking of long-distance outdoor cabling and want reliable operation in an environment that is in any way electrically noisy (I presume your locomotives are electric?) then start off by looking at RS485 drivers. Think of RS485 being like the ARF modules, RS232 being XRF modules and PICAXE serial being ERF modules and you may get my drift.

Do your really need 9600 baud? Perhaps if you could let us know precisely what type of control signals you are trying to transmit and for what purpose we could be of more help. (If you can slow down your data-rate then you can achieve much longer range; that applies generally to radio transmission as well as cable-linking).
It is the same project, just thinking of alternatives.
other thought is to use a 'reverse sma extension cable' for the aerial instead.

not electric locos, live steam.

I was originally asking for max length of rs232 from picaxe, without adding other circuitry.

I now have an ARF ciesco module, to use as a master. it's 3.3v so will need make a pcb to add a 3.3 voltage regulator and a 'level logic shifter', not a great problem.

it's a matter of covering all the bases when I install the 'master' unit. extending aerial or extending rs232, or both.

To keep it simple, as I understand,
15M of standard cable (2500pf) gives me 15M at 9600baud rate.
utp cat5 cable gives longer range.

TOF
 

Jeremy Harris

Senior Member
It is the same project, just thinking of alternatives.
I was originally asking for max length of rs232 from picaxe, without adding other circuitry.
No Picaxe chip can transmit RS232 without other circuitry, though. RS232 specifies signal levels of + and - 12V, not 0V and 5V, as a part of the protocol, hence the need to use a driver chip like the Max232 or similar. Those chips have the circuitry to boost Picaxe serial data to RS232 that then allows pretty long cable lengths.

Picaxe serial data (which isn't RS232) can still be transmitted a modest length over decent cable, but because it doesn't use the same voltages and detection protocols as RS232 the distance will be a lot shorter. May still be good enough for 10 or 20 metres in a quiet environment, though.

As above, if looking to transmit over twisted pair network cable then it's better to use the RS485 protocol. No difference to RS232 in terms of needing a driver, but RS485 has greater noise immunity and will generally work over longer distances. The Picaxe can still send serial data to an RS485 converter, just as it can send serial data to an RS232 converter.
 
Last edited:

Circuit

Senior Member
not electric locos, live steam.
Live steam! - Wonderful!

It is the same project, just thinking of alternatives.
other thought is to use a 'reverse sma extension cable' for the aerial instead.
Perhaps not the best idea; extension cables tend to attenuate signal transmission to antennae; there is always some signal loss in an extension cable. Better to keep the quarter wave directly on the ERF and extend the power cable and serial cables from the base unit to the ERF, within a reasonable distance of course.

I was originally asking for max length of rs232 from picaxe, without adding other circuitry.
To keep it simple, as I understand,
15M of standard cable (2500pf) gives me 15M at 9600baud rate.
utp cat5 cable gives longer range.
RS232 from PICAXE; Jeremy Harris has reiterated my comment in the previous post with some further clarity. Again, RS232 uses +12 volts as its "high" state and NEGATIVE 12 volts for its "low state"; if you like, there is a 24 volt swing around zero as the pulses are transmitted. It is this swing from positive to negative that ensures the effective transmission over a distance; but still not a great distance. You seem not to catch on to this difference between RS232 and PICAXE serial out which Jeremy highlights is NOT RS232 and you cannot use the RS232 cabling references that have used for your subsequent cable-length calculations when considering a 0-5 volt PICAXE serial.

You may note that it is the download circuit of resistances that you have to add to the PICAXE download pins that protect it from any occasion when a real RS232 signal is applied from a computer. It would not do much good on a PICAXE pin that has been assigned to serial in if a proper RS232 signal was applied without protective circuitry!

I now have an ARF ciesco module, to use as a master. it's 3.3v so will need make a pcb to add a 3.3 voltage regulator and a 'level logic shifter', not a great problem.
Because the CISECO ARF transceiver has a receive signal amplifier as well as a booster on the transmit side, if you can use the ARF as the 'master' unit you may achieve the range that you need. ARF's talk to XRFs or ERFs at a much greater distance than XRF-to-XRF can. This may just work for you.
 

the old fart

Senior Member
Thanks Guys,

Yes I was confusing the picaxe serial with true rs232 circuit.

Some interesting experiments ahead..



picaxe 40x2---------------max485===========================max485--------------ARF

OR

picaxe 40x2 --------------max3232==========================max3232------------ARF

................ 5VDC...................................................................................................3.3vdc....
 
Last edited:

the old fart

Senior Member
For RS485, you can use : MAX485 module
5€ from www.selectronic.fr
or 0,65 € from ASIA
Cable length comparison : rs485spec



NB : maybe of interest for your project : RS485 is multi senders/multi receivers...
thanks for info Besqueut,
I have a couple of these on order.
They can only work in Half-Duplex mode, which may cause a problem at the ARF end.There is no facility on the ARF to switch the max485 from receive to transmit. maybe use the MAX491 for Full-Duplex control.

TOF
 

neiltechspec

Senior Member
Re. your half duplex mode,

You could always use MAX488's and use two pairs, one for TX to the ARF and one for RX from the ARF.
That still leaves you two pairs in a Cat5 for power etc..

Neil.
 

the old fart

Senior Member
using 20M cable at 9600 baud.

What really pissed me off was finding that the u.fl pigtail lead was faulty. inner core not connected to sma socket.
On closer inspection found not a trace of solder on sma center pin. Nice one ciesco.
 
Top