Max length for GPS/Mag wires?

Hi all,

I’m redesigning my Y6 to improve performance and fit apm 2.6, and I want to rise the GPS and mag, my question is: What is the maximum length I can use for the GPS and Mag wires?


If this is any help, I am using a GPS cable that is about 5 inches long with out any problems. It might be good to try and stay under 10 inches as there will be more of a 5 vdc supply voltage drop over the longer cables. Also the longer cables tend to act as antennas and cause interference with the GPS data being transferred to the APM.
TCIII Developer

I agree with TCII regarding that longer cables could act as antennas.
I would suggest to twist your cable to avoid interference effect. By twisting the cable, the length will be shorter also.

thx for the tips, I’m planing on lift the GPS about 12 to 15cm, and make the support foldable for transport purposes, so a litle bit longer cable might be handy. Got to do some tests then.

thx again.

I’m using 45cm cables on two of my helicopters without any noticeable problem. These are the longest cable lengths available at 3DR. I do twist them, and there is not a lot of interference being generated on the tail boom of a helicopter. But I doubt you’d have a problem in any case. My understanding is the Serial communication link is quite robust.

I have an even longer cable on my big helicopter, it must be 60cm long, or maybe even more. I made this by cutting a short cable in half, and then splicing it onto a piece of nice shielded cable from an old Analog joystick. It’s 10 conductor, and I’m using 8 of them for the GPS and Mag. This has also been working just fine.

I’ve seen the 30cm and 45cm cables work without issue as well. The benefit of moving the GPS/MAG away from centralized and noisy electronics like ESCs, etc, far outweighs any potential impact of the longer wire, especially when twisted.

Best to reference I2C specification document and
note page 60, Item 7.5 in regard to cables that exceed 10cm in length.

7.5 Wiring pattern of the bus lines
In general, the wiring must be chosen so that crosstalk and interference to/from the bus
lines is minimized. The bus lines are most susceptible to crosstalk and interference at the
HIGH level because of the relatively high impedance of the pull-up devices.
If the length of the bus lines on a PCB or ribbon cable exceeds 10 cm and includes the
VDD and VSS lines, the wiring pattern should be:
SDA _______________________
VDD ________________________
VSS ________________________
SCL _______________________
If only the VSS line is included, the wiring pattern should be:
SDA _______________________
VSS ________________________
SCL _______________________
These wiring patterns also result in identical capacitive loads for the SDA and SCL lines.
If a PCB with a VSS and/or VDD layer is used, the VSS and VDD lines can be omitted.
If the bus lines are twisted-pairs, each bus line must be twisted with a VSS return.
Alternatively, the SCL line can be twisted with a VSS return, and the SDA line twisted with
a VDD return. In the latter case, capacitors must be used to decouple the VDD line to the
VSS line at both ends of the twisted pairs.

If the bus lines are shielded (shield connected to VSS), interference is minimized.
However, the shielded cable must have low capacitive coupling between the SDA and
SCL lines to minimize crosstalk.

There are i2c extenders and there are higher voltage devices to extend the range, but basically I2C is designed for onboard communications to a maximum of 10cm, after that your mileage may vary. I have done lots of designs out to 30-40cm, where the design did not work with plain wires or ribbon cable but did work with the wires twisted as per the above spec. It does get ugly and the error rate does get very high in the noisy environment of a bunch of motors and ESCs. At that length you are in the dead zone. You are in serious violation of the design spec. Don’t assume it is going to work reliably or that is not going to cause problems for the autopilot.

I am also moving this post to the GPS/ Mag forum. Please help us all by posting in the correct sub forum!

@Craig3DR, thx for the great info, so if I understood you correctly , the main problem of longer wiring, is the crosstalk you mention, between the I2C wires themselves more than any antena effect…

thx for the info!