Is there a max length between modules? I am looking at trying to run one module a significant distance and I am thinking of using a breakout on each end to run it over cat-5 (no 5V and no P9, neither are used in what I am working on). I’m just curious what the maximum run is before the signal would be degraded to uselessness.
This totally depends on the module you are using and the noise you have in your setup.
So is that basically “Try it and tell us if it works”?
No, that is actually “give us more info on what you are doing”
I am thinking relays, temp/humidity sensors, joystick, and some sort of text/numeric display if I can figure out how to make the SPI work off of the extender breakouts.
All these are simple IOs. Just run I2C at lower rate.
So that should work over significant distance?
If significant means 30 feet then sure.
The IDC cables for Gadgeteer are in the “chassis wiring” category, similar to cables used within computer cases. If you’re needing to run a long length of wire (across the room, etc.) then chassis wiring isn’t the best option. A shielded cable with differential signals (like RS-232 or CAT5) could be an appropriate choice.
Three things to consider when choosing the right length of cable for a Gadgeteer application are (1) voltage drop; (2) signal integrity; (3) antenna-like properties.
- Voltage Drop -
For voltage drop, there are some online calculators that will get you started. Here’s one:
Voltage Drop Calculator
For example, a 10 foot IDC cable will drop the voltage enough that some ICs on the module won’t reliably recognize the digital signals anymore. But with a 3"-6" cable the voltage drop is negligible. With the power going to the module being reduced, return data signals can double that voltage drop.
If you’re using an “A” module which only has pure-analog inputs, you may be able to calibrate for the voltage drop with software.
Signal Integrity -
For signal integrity, longer cable runs tend to turn square waves into something which closer resembles sine waves. I tend to think of this like ocean waves: they can start out
very choppy but by the time they reach shore they’re usually smoothed out. Digital communication prefers clean sharp signals. Choosing a lower speed as Gus recommended can help offset this effect.
Antenna-like properties -
IDC cables are unshielded and, especially over long runs, they can pick up quite a bit of ambient noise. For some modules like SD Cards this noise should be handled partly by the SD Card protocol, but for others like relays you can get unintended operation or data corruption.
Thanks, I was thinking of cat-5 cable runs which are being run in the house I am building so it will probably be well over 30 feet, which with the voltage drops is probably going to be way to much.
Thanks for all the feedback.