3 wire interface for long distance comms

stocky6409

Senior Member
Hi all,
Playing with an idea for a project where I need to control/monitor multiple inputs and switch outputs via a WIRE connection.
I have seen a system on a peice of ag machinery where it has a 3 wire cable (+ve,GND, DATA) running between the control console and the high current relay box that I think will suit my needs but I'm stuck trying to reverse engineer the concept to work out what they may have done. Unfortunately i do not have easy access to the equipment to hack it, but I do know that both ends do talk to each other as there is a "comms failure" indicator that shows if there is a fault with the DATA wire.

Any bright ideas on how this may have been implemented? Cable is 3 core unsheilded cable - nothing fancy at all and runs in a very dirty/electrically noisy environment over distances typically 30+m with no probs at all!

PS - this wil use PICAXE at both ends - so its not totally off topic! :)

Stocky
 

MFB

Senior Member
RS-485?

The differential RS485 standard would work fine in that environment and is in fact the physical layer of CAN. If you don’t need a full-blown multi-nod bus like CAN, then you can simply buffer the PICAXE serial output and input ports with TTL-to-RS485 translator chips. These low cost 8-pin devices basically turn the single ended I/O lines into two wire push-pull signals. The PICAXE serial commands will not even notice the difference and your standard coms routines can be retained.
 

stocky6409

Senior Member
Cable supplied +v3 and GND to control box - 3rd wire is data

The RS485/RS422 concept is one I'm looking into as well :)
 

hippy

Ex-Staff (retired)
The interface could be almost anything. While we can make guesses as to what it might be, even likely to be, the protocol could be almost anything as could the physical electrical interface.

As it's a relay control box it could simply be a remote relay with a high/low switching line, comms failure being detected when an open circuit is detected ( cable not plugged in ).

UNless the manufacturer provides more details it will require investigation of what is seen on the cable to try and reverse engineer it. Opening the units and seeing what components are used in the interfacing may provide some useful pointers but may invalidate warranties.
 

stocky6409

Senior Member
I'm trying to get hands on a unit to look....generally attached to 20ton equipment so *bit hard* to get it into the workshop! :p

Sorry I missed out some basic info on the orginal post

8 switches controlling 8 relays over the 3 wire cable....I'm not that interested in the protocol - more looking for ideas on how they may have electronically implemented such a thing with unsheilded cable and only a single data wire in a "hostile" environment with some data wire fault detection as well.

Cheers
 

moxhamj

New Member
How noisy? Are you trying to interface to this or build something similar from scratch.

I've got 500 metres working with slow relay technology using one wire and local earth at both ends. Picaxe controllers. 1 baud to be precise. In order of increasing robustness:

1) 5V direct picaxe to picaxe
2) picaxe <=>max232<=> picaxe
3) picaxe <=>rs485/422 <=>picaxe
4) slow down the baud rate. 1200. I've just been playing with 50 baud tonight. Custom write your own byte to serial code at 1 baud (I've got some code if you want it).
5) go even more robust than rs485. Energise a relay, which puts 12V onto a wire via a 5w car taillight battery, from a 12V SLA charged from a solar panel. At the other end, a standard 12V relay coil is energised. Totally electrically isoloated - good for lightning protection. Short circuit proof (the worst thing is the lamp comes on). Typical currents won't bring the lamp on at all (30ma or so). But if the wires get wet and a bit shorted they have enough grunt to push the current through. Takes 10 seconds to send a byte. Easy to test it is working - you can hear the relays clicking. Put a led in as well if you like. Send back an acknowledge byte as well if you want.
 
Top