?crosstalk on optoisolator please help

Hi have been using this circuit:

to isolate an arduino mega from a power board that switches circuits on in a car. I basically have 16 channels each looking like the above circuit. It works fine however i have a really strange effect that when i close the remote switch at the bottom of the circuit which grounds the arduino input optocoupler and in turn this grounds the input pin reading the switch as on , even without the arduino attached i get a momentary flash of power through 2 or 3 other output sides when i release the switch back to open, i am not sure what is causing this affect. The wires connecting the input side optocoupler to the remote switch run in a ribbon cable alternating with the output wires connecting the output side optocoupler to the npn so when i open the switch could i be getting some kind of spike in wire that connects the input side optocoupler led that induces a bit of current into a neighbouring wire enough to swtich on my npn and thus the darlington momentarily, i can't quite work out if this is possible or is there some other affect i missing really looking for an eplanation and solution if possible.

Yes, that's crosstalk.

You ran logic signals side-by-side for some distance on the ribbon cable?
Without having intervening ground wires?

You've discovered what can happen.

The NPN transistor driving the PNP darlington is overkill, replace
the darlington with a PNP switching transistor and the reduction
in gain will make the whole thing much less sensitive to crosstalk.

A few microamps on the NPN base will cause a milliamp or so into the darlington,
enough to switch it. The 20pF/metre capacitance between neighbouring
signal wires in a ribbon is doing the rest.

A stop-gap might be to add a 1k resistor from the NPN base to ground, so
that much more voltage is needed to switch it.

thank you that is v helpful my problem is i have already made the boards so changing things is difficult it all worked fine on the breadboard with the wires not in ribbon cable =( still a useful lesson to learn, do you think reducing the length of the ribbon cable will help much i can probably get it to be a few centimetres it would be easy to change the npn base series resistor but more difficult to add a resistor to ground would this help limit the cross talk current into the base ?

but more difficult to add a resistor to ground

Why?
Just solder the resistor on the back of the board in the right place. It is a professional practice that is used all the time in the early stages of a design.

o you think reducing the length of the ribbon cable will help much i can probably get it to be a few centimetres

Getting it as short as possible reduces the cross talk. However is should be an easy thing to have a wider cable and run a ground between the signals causing you problems.

And the other lesson is that using a transistor to drive a darlington leads to absurdly
high gain and sensitivity in the input to a few microamps (you'll likely have the
circuit fail at high temperature because the increased leakage currents that
occur).

Thanks for your help i have soldered 1k resistors on the back of the board between npn base and ground and all of the crosstalk has dissapeared so i'm well pleased thankyou

MarkT:
And the other lesson is that using a transistor to drive a darlington leads to absurdly
high gain and sensitivity in the input to a few microamps (you'll likely have the
circuit fail at high temperature because the increased leakage currents that
occur).

will this temperature affect be helped by these resistors? how else can i switch the pnp darlington without a transistor to bring the base voltage down for a high level switch, i used the darlington because i wanted up to 5amps although i'll actually only be using 1 amp max someone previously siad to use a p -mosfet but i have the circuit as it is now so hopefully will not get too hot it will be ventilated well enough, is there something else i could do to reduce the gain ?

Using an NPN to switch a PNP is already a high gain setup. You just chose the
NPN to drive a high-current PNP transistor - this is equivalent to a darlington
and sometimes known as a complementary darlington I think.

Thanks for your ongoing input what I don't really understand is you how you can avoid this high gain situation if you are using a pnp as a high level switch from a 5v logic input as the only circuits I have seen with this have a second transistor on the pnp base is there a way of doing high level switching without this ??

Do what the other fellow said.

Don't use a Darlington - replace it with single transistor. No need for board modification.

can you get single non darlington pnp that will switch 6 amps ??