Picaxe communication

vital

New Member
Hey all. Has anyone ever successfully gotten 2 picaxe to talk to each other over a long distance (150m) via rs232 / cat 5 etc
 

AllyCat

Senior Member
Hi,

It depends whether you mean "genuine RS232" (typically +/- 10 volt levels) from a chip such as the MAX232, or only the 5 volt "RS232-TTL" (or the "inverted RS232-TTL" of the PICaxe Programming/Debug interface) used as a "local" interface by many microcontrollers (e.g. to a MAX232).

The "official" RS232 specification gives a maximum range of 15 metres (50 feet) with a 2500 pF cable capacitance at 19200 baud, but Cat5 cable is only around 50pF/m which could get to 50 metres. Then halving the baud rate may double the range, so 4800 baud (as used by PICaxe SERTXD/RXD) might get beyond 150 metres, but it rather depends on the "environment" (i.e. Noise/Interference, etc.).

In a very (electrically) "clean/quiet" environment then even 5 volt (TTL) signals might be sufficient (at around 2400 baud), but if "interface" chips need to be added, then probably a balanced configuration such as RS485 might be a better choice than a MAX232.

Cheers, Alan.
 

hippy

Ex-Staff (retired)
For long distances using a differential line driver and receiver will usually help. The advantage is they can be added as simple buffers to the traditional single signal lines so no software changes needed. DMX-512 uses 125.000 baud and that can work over 1 km using mains cable though shielded twisted pair is usually recommended.

Code:
.---------.                              .---------.
|         |   |\.--(+)---//---(+)--|\    |         |
|  SEROUT |-->| >                  | >-->| SERIN   |
|         |   |/`--(-)---//---(-)--|/    |         |
|         |                              |         |
|      0V |--------------//--------------| 0V      |
`---------'                              `---------'
The driver and receiver can be powered from their respective sides and there's no need to pass power from one to the other, just connect 0V..
 

bpowell

Senior Member
I use a couple of ebay 422 transceivers to talk from PC to PICAXE over about 60m of CAT5e ... works great ... serial comms work, and I'm also able to upload new code if needed.
 

Tvmender

Active member
What about fibre optic? You can but pre made cables relatively cheap.

You would need a system for converting back/into RS232 etc.
 

Buzby

Senior Member
As Techoman says, RS485 is the simplest solution.

Use RS485-to-TTL converters, one at each end. There is no fiddly setup, no software changes.

Just search for TTL-RS485 in the usual places.
 

inglewoodpete

Senior Member
I've used a pair of DS485N interface chips, driven directly from their parent PICAXEs. Three pins are required for bothway communication: send, receive and direction control. I was using 28X2s.

Years ago I worked on a project that required (temporary) RS232 (proper +/- 12v) serial communication over about 100 metres. We had to drop the data rate to 1200 baud to get around 99.9% quality.
 
Top