Distance of interconnects

lauriet

Member
Hi experts,

I am designing a low-budget signalling system that has to operate over hundreds of yards (or even metres), using an 18m2 project board. Obviously voltage drops and interference would be a problem over this distance, so I am just using high/low logic states and LEDs, no data.

I have a test bed which works excellently over small and medium distances but gets to a cable length where one particular input switch causes a reset, the other inputs and outputs still function well. It seems to be a momentary problem as, with the basic equipment I have, I can detect no loss of power; general voltage drops over that distance are within operable limits.
The cable is overall shielded multicore; we cannot aford anything more fancy for that length, and I am uninformedly guessing the changes of voltages in different directions are affecting other directions for an instant.

I have very little understanding of filters and other dodads to cope with long cable runs. Can anyone recommend any alterations or additions to components that might aleviate the situation, or any other strategy I could try?
Many thanks.
 

lauriet

Member
Perhaps I should add that I have a 12v to 5v voltage regulator at the 'away' end, to avoid loading the project board regulator, and the input switches there take the input high; the on-board pull-down resistors are fitted.

'So near, yet so far.'
 

inglewoodpete

Senior Member
You don't give the detail of your problem. Eg the specific pin that is causing your grief. If the offending pin just happens to be C.5 (leg 4), then it's probably because that pin does not have an internal (CMOS) protection diode which would help supress noise spikes (all of the other inputs have that protection diode). More information could help forum members.
 

AllyCat

Senior Member
Hi,

one particular input switch causes a reset, ...

The cable is overall shielded multicore; we cannot aford anything more fancy for that length,
Yes indeed, which input, they are not all exactly the same !

Also some details of the cable might help. How many cores, what is the overall diameter, and is this for indoor or outdoor use ? It might be that a CAT5 (4 twisted pairs) network cable would be a better choice, and no more expensive. Is the power supply carried through the cable to the far end? Does it use an 18M2 at each end (if so, which one resets) ?

Cheers, Alan.
 

lbenson

Senior Member
One other question: do you have the grounds on the two circuits connected? Not having a common ground can cause problems.
 

techElder

Well-known member
First thing I think of with resets is to make sure you have enough surge capacity on your 5 volt supply right at the power pin of the PICAXE.

MORE:

At 300 feet+ you should be using some sort of line driver.
 
Last edited:

Jeremy Harris

Senior Member
I found that I could "just" get 5V serial data to work between two Picaxe chips over about 30m of twisted pair cable, if I kept the baud rate down to 2400. Getting 5V signals to travel cleanly down cables of a few hundred metres is likely to be a challenge and need line drivers at either end, I think.

You might get away with using a couple of MAX232 chips, one at either end, to boost the voltage up to RS232 levels, Might be reliable enough to allow signals to reliably work over this sort of distance, provided twisted pair cable was used. I can't see any reason why a MAX232 shouldn't work with just on/off signals, rather than data, as all it does is level shift and use a charge pump to generate higher voltages for data transmission.
 

BESQUEUT

Senior Member
Perhaps I should add that I have a 12v to 5v voltage regulator at the 'away' end, to avoid loading the project board regulator, and the input switches there take the input high; the on-board pull-down resistors are fitted.'
Use an opto-isolator close to the Picaxe. Feed the LED side with the "away" 12V (and of course a resistor)
==> no problem for common earth witch is probably a problem...
 

lauriet

Member
Apologies for not responding earlier - stuff happens ...

To expand, I am working on a system for controlling two-way traffic over single track for a miniature railway that runs through undulating wooded countryside, for traditional model engineers (who would much rather use relays :-( ), so it has to be simple and easy to understand and maintain. It is not safety-critical.

The code has a test routine and a running routine - the running routine works but the test routine (trigger an input, see if a LED illuminates) causes a reset, so I don't want to change too much, just improve reliability.

The system comprises an 18m2 project board in the 'home' box containing three 12v LEDs (Stop, Go and Wait, on B.4, B.5 and B.6), a request button and two track detectors (reed switches) on C.0, C.1 and C.2, powered by a 12v battery, and a ten-way multicore cable to the 'away' box containing similar 12v LEDs (on B.1, B.2 and B.3) and switches ( on C.4, C.5 and C.6) and a 12v to 5v regulator for the switches. The voltage drops are negligible and well within spec. The cable is 'acquired' railway signalling cable about 25mm external. The conductors are quite heavy gauge, not individually shielded, and the length is about 200 yards. As I say, it almost works, so I am hoping for a simple fix.

It seems from testing that it functions correctly when the 'away' LEDs are disconnected, so maybe the opto-isolator solution would stabilise things. I'd much appreciate a recommendation of type and the exact wiring; the LEDs have a common 12v connection, and illuminate when the output pins go low. It would also seem (on my test-bed) that it is the C.5 input that creates a problem which,Inglewoodpete states, does not have a protection diode. Can I install anything to resolve this?

Again, thanks for any advice. Hopefully I can be more timely in responding next time.

LaurieT
 

BESQUEUT

Senior Member
Maybe you can have a look at this... (replace Ard...o with Picaxe)
Very common : CNY74-4
For 12 V and 50mA, use a minima 240 ohms for R1.
1K is probably fine.
For Pullup R, you can use 47 K ohms
If very noisy and not time critical, you can add a capacitor parallel with the input LED.
 
Last edited:

westaust55

Moderator
switches on C.4, C5 and C.6 ...
C.4 is also the SerialIn pin.
Are you holding this pin low until a disconnect command is performed?

Posting Your schematic and program listing would make it easier for folks here to understand your project and problem.
 

lauriet

Member
I have identified that the problem is with the input pin C.5, this causes a reset. It has previously been mentioned that this input has no internal protection diodes. Can anyone suggest components, with values and configuration, that could make this input more reliable? Many thanks.
 

BESQUEUT

Senior Member
I suspect your longs lines to act as a big antenna. The 0V line can catch few volts and temporary revert power input, causing Picaxe to reset.
You can try a big capacitor (>1000 µF 16V) between V0 and V+
A smaller one (from 1µF to 10µF) from 0V to C.5
A diode from V0 to C.5, another from C.5 to V+
A 100 ohms resistor from long line to C.5 (but there is probably already a resistor divider ; please publish your current schematic)
But IMHO, #11 is preferable.
 
Last edited:

eggdweather

Senior Member
Is it the case that your test routine works over short distances but not long, if so I would add a resistor across the transmission line (tracks) at the two points where your controller/transceivers are, this will help reduce reflections along the line caused by inductance and capacitance, a typical value would be 330R if the gauge is small and I have no idea, but about 20mm apart is roughly a 300R transmission line impedance.
 
Top