using interrupts across 5 meters of wire

I have a MEGA ADK connected to a PRO MINI with 3 wires - 6v power, gnd, interrupt wire - as shown below.

12V BATTERY MEGA ADK DC-DC POWER MODULE MINI

GND----------------------GND------------------------GND-------------------------------GND
DIGITALOUT PIN 13----------------------------------------------------INT PIN 2
VCC------------------------VIN-------------------------12V-6V---------------------------VCC

I am sending a HIGH or LOW from the MEGA - to interrupt pin 2 on the MINI - which detects a change in state on the interrupt pin, then the mini flashes a LED.

When I had the two arduinos connected side by side with short prototyping wires, everything worked. But now I have connected 5 meters of cable (power, gnd, interrupt) between the MEGA and MINI, and the MINI is not detecting the change in state.

So I checked with my multimeter at the MINI end, and it did not show the HIGH 5V from the MEGA. So I then worked my way back, and the multimeter detected the 5V HIGH right at the MEGA - so the problem is the long wire.

I know that the wires are connected correctly, because I sent a constant 12V straight from the battery down the interrupt wire where instead of the MINI, I attached a multimeter, and I was getting 11.6V.

I am wondering if the problem has something to do with the loss in voltage in the long wire, but why am I not seeing say, 4.5V from the MEGA? Why am I seeing nothing? And how do I fix this problem?

Cheers.

You can't send high speed logic signals down such long wires without big issues with crosstalk, reflection, and runt pulses. You also risk damaging the receiving end due to voltage doubling at the impedance mismatch. Long wires can pick up interference too.

Try adding two 270 ohm resistors between the int wire at the receiving end and GND and Vcc - this provides a 135 ohm termination that should suppress reflections and voltage doubling. Adding a 47 ohm resistor in series at the transmitting end can also help reduce reflection issues.

Assuming your cable has roughly 120 ohms characteristic impedance (common for twisted pair).

What kind of cable are you using?

Another way to deal with the issues if speed isn't an issue is to low-pass filter the signal at the receiving end with an RC low pass circuit followed by a schmitt-trigger such as 74HC14 inverter to clean the signal up again to standard logic levels.

MarkT: What kind of cable are you using?

Hi, It's Cat6 shielded cable.

I understand when doing things like serial I need extra help, but I figured that because I was only doing a change in state (0V to 5V), that I wouldn't need everything you suggested.

Can you tell me why I can't even see one 5V high on the mini side at all? Where does all the voltage go? I mean I dont even see 1V

Thanks.

Ah in that case you have a short or a cable break? It the wire itself is OK perhaps you fried the Pro Mini input already with cable reflections.

MarkT: Ah in that case you have a short or a cable break? It the wire itself is OK perhaps you fried the Pro Mini input already with cable reflections.

Everything works without the 5 meter cable. There is nothing wrong with MINI or MEGA. I have tested them again without the 5 meter cable.

The 5 meter cable is able to send the 12V from the battery on the interrupt wire and I see 11.6V on the mini end. So there is no break in the cable.

The problem is that I can not see the HIGH 5V from the MEGA through the interrupt wire on the MINI end.

Do you have the 5V or the 3V3 version of the Pro Mini?

pylon - I have the 5V version.

UPDATE

I tried a different cable, and now I have no problems. I don't know why. A bad cable?

But I am now worried about the double voltage MarkT was talking about.

Should I still put the resisters as stated to protect my MINI?

Thanks.

benjaminhoey: I tried a different cable, and now I have no problems. I don't know why. A bad cable?

Most likely one of the wires is broken, and when you tested it with the 12V it happened to be bent in such a way it made contact, when you tried it with the Arduino it was bent differently and made no contact. That'd be my best guess.

Should I still put the resisters as stated to protect my MINI?

Like with many protection circuits: it's a form of insurance. You only know you needed it after stuff breaks, when it's in place you don't notice anything.

In other words: I think it's the proper thing to do for any (semi)permanent installations, and a good idea to do also when just testing stuff.

Ok, thanks wvmarle for the reply. I will do it.

MarkT:
Try adding two 270 ohm resistors between the int wire at the receiving end and GND and Vcc -
this provides a 135 ohm termination that should suppress reflections and voltage doubling. Adding
a 47 ohm resistor in series at the transmitting end can also help reduce reflection issues.

Assuming your cable has roughly 120 ohms characteristic impedance (common for twisted pair).

Now knowing that I am using cat6 shielded cable, are the resistor values still relevant? And is there an online calculator for this?

Also, could you be more clear?

Am I to place one end of the resistor to the interrupt cable and the other end to the ground on the MINI, and another resistor also one end of the interrupt cable and the other end on the vcc on the MINI?

And for the MEGA end, one end of the resistor to the MEGA pin and the other to the interrupt wire?

Thanks.

12V BATTERY MEGA ADK DC-DC POWER MODULE MINI

GND----------------------GND------------------------GND-------------------------------GND DIGITALOUT PIN 13----------------------------------------------------INT PIN 2 VCC------------------------VIN-------------------------12V-6V---------------------------VCC

If that "drawing" is correct you're powering a 5V Arduino with 6V. Don't expect that one to run for a very long time.

pylon: If that "drawing" is correct you're powering a 5V Arduino with 6V. Don't expect that one to run for a very long time.

With the resistance in the wire i'm losing about .5V - so its actually 5.5V. Plus, I thought arduinos can take up to 12V as input?

benjaminhoey: With the resistance in the wire i'm losing about .5V - so its actually 5.5V.

That's a crappy wire - and unreliable, as the less power it draws the less the drop, and if drawing more power you may drop too low.

Plus, I thought arduinos can take up to 12V as input?

On the Vin pin they need >6.5 and can handle up to 20-22V or so (check spec sheet), as this pin is connected to the internal regulator; however your drawing says it's the Vcc pin which is not regulated internally, and on which you should provide a clean 5V supply. Providing higher voltage on Vcc may kill the device.

It's connected to the VIN pin.

If you would like to buy me a wire that isn't "crappy" I can give you my PayPal details.

Are you able to answer my last question about the resistors?

I guess you're putting 6V into the RAW pin on the Mini, if so you may not get 5V from the regulator, you need at least 6.5 V on RAW, you might try 2 1N4002 diodes in series to drop 1.3V and connect to the VCC pin, and I would go with the resistors on that long cable.

edgemoron: I guess you're putting 6V into the RAW pin on the Mini, if so you may not get 5V from the regulator, you need at least 6.5 V on RAW, you might try 2 1N4002 diodes in series to drop 1.3V and connect to the VCC pin, and I would go with the resistors on that long cable.

How do I attach the resistors?