What you would use to ensure stable/robust wiring when mounting your device on a motorcycle?
In my case arduino is located under the seat and the display is mounted on the fairing in front of the handlebar (110 cm far away), so there are many vibrations (especially for the display, I think).
I have no idea what is the best solution, maybe just crimped male headers will be enough but I'm not sure of that.
By googling I have discovered that also screw-terminals are available (even via mounted shields), they seems more "strong" to me. I'm wrong?
I need to connect 8 or 10 pins from Arduino to the display. What you would use in my case?
p.s: I cannot use a flat-cable 'cause it is not so nice on a motorcycle...
For the cabling I'd try to find an 8-conductor shielded cable. The shield will provide electrical protection from ignition noise and also provide mechanical protection for the conductors.
As for the connectors, I think regular male headers would work if you provide strain relief where the wires emerge, which would also protect against damage from vibration.
Since the Arduino headers don't have locks I would be concerned about the connectors slipping from with vibration. See if you can use wire ties or some other method to make sure the headers remain seated.
Depending on the interface to the display, you may find issues with crosstalk between the wires in the cable
I've recently experiences this when using 50cm lengths of ribbon cable carrying I2C which caused the I2C code to crash
I had to physically separate the 2 data wires for the I2C for it to work reliably.
You didn't say whether your display was I2C or SPI or perhaps parallel.
Before you go to the trouble of wiring it into the bike, I'd recommend you just test the display to see if it works at all on over a meter of cable, and even if it works to start with, Id recommend that you leave it running for a while.
Wires getting wiggled by vibration until they fatigue and break
Rain, snow, moisture, and other enemies of electronics getting into the device.
Honestly, if I was doing this, I'd try very hard to avoid having a long cable from the arduino to the display. I'd try to tuck the arduino under the display. That way the longest wires will go the the sensor, which is probably less picky than the display, and you only need to make one weather-proof container for your screen + board, and only one ruggedized cable to get to the sensors (which I assume it has). Consider using something like a Nano or Micro if you're currently using a bulkier board.
Good strain relief on both ends is absolutely essential for longevity.
Minimize the number of wires that need to be connected, and use automotive-rated connectors if possible, and only put one connector per cable (solder the other end) in place).
Self-bonding silicone tape, clear nailpolish, and Elmer's Stix-all Gel are great assets in waterproofing stuff. (The stix-all you can get online or at well stocked hardware stores. It glues everything and has some body to it, and dries pliable - the price is that it plugs the nozzle almost immediately, so soon you have to use it by poking a hole in the tube with a thumbtack to every time you want to use any... I put up with it, since I can't find anything else that works as well).
As I see the SPI interface offers the minimum amount of wires (4 signal + 5V + GND = 6 wires), so my problem is to realize a 110 cm cable for that.
To summarize:
male header would be ok when a strain relief is provided
I should try minimize connectors usage and maximize soldering terminal instead
I should make a test using long cables for SPI before going further
shielded cable should be preferred
The Elmer's Stix-all Gel (or similar) could be used to assembly the containing box and make it waterproof also.
Now I have just some doubts... :smiley-roll
Doubt number 1 - the cable
About point (3)... I spent a lot of time trying to find robust multi-wires cable that I could use. I don't need large section wires, I thing that a 7/6 core core with AWG 24 or AWG 26 (around 0,5 mm) 26 is enough for me, I'm right?
Unfortunately all thin cables that I can find are for phone or telecommunications use and they have no stranded wires but the solid ones (but they are shielded). I don't like rigid cables cause may be difficult to mount them on a motorcycle.
Ok, don't laugh, bat the most flexible and reasonably thin cable I found is this ... http://www.ebay.de/itm/251363268517?_trksid=p2055119.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT
(a cable for trailers and caravan... )
Doubt number 2 - packing all in one box
I could try to pack an arduino uno + display + obd scanner circuit in one box and place it in front of the driver, but the overall dimensions could be embarassing. After many months I've acquired a good knowledge of the Arduino Uno and I wouldn't change, but maybe I have to evaluate this option...
Just in case, what is the best choice between Nano and Micro? I essentially need serial comunications (tx and rx wires) and SPI communication to the display. Maybe I need also 2 digital input for a light sensor. That's all.
Take a close look at Industrial Ethernet Cable. You might be able to find a cat6 shielded patch cable. I know Cables-to-Go used to stock a huge variety. That will get you 8c in the form of 4 twisted pairs.
You really are asking for problems running logic signals this far in an electrically
noisy environment, the wires are too long for fast logic without using a proper
transmission line medium really...
What can help is terminating the wires (270 ohm resistors to ground and to Vcc
for every signal at the TFT end). This will mean more power is needed at the
Arduino to drive the lines (18mA per signal), but you have an approximation to well
terminated signal cable.
You want to use a ribbon cable, route GND along every-other wire, or every third wire,
with signals in-between. This will reject a lot of outside interference and provides every
signal wire with a ground-return wire next to it (becomes a transmission line).
MarkT:
You really are asking for problems running logic signals this far in an electrically
noisy environment, the wires are too long for fast logic without using a proper
transmission line medium really........
Hi Mark, thanks for your long explanation, now I need some time to study and completely understand what you wrote. Last time I was dealing with electronic was around 25 five years ago...
So individually shielded cores in a cable is not enough to guarantee a good data transimssion. =(
Just for curiosity: how was working long RS232 cables used many years ago to connect a PC to a printer located some meter away?
gimpo:
All the the information that you write are gold for me and I think also for others.
Now I'm using an Arduino Uno rev3 that should be connected to an:
I would use a Pro Mini, it's compatible with the Uno but smaller and easy to solder wires directly to it.
If It's I2C then I'd use a long USB cable - they're shielded, have four wires in them, and are designed for transmitting that sort of signal.
For strain/vibration relief use heatshrink tubing and hot glue. make sure that no matter what you do with the main cable, none of the movement is transmitted to the points where the small cables are joined the the Arduino/screen. This also protects against dirt/water.
fungus:
I would use a Pro Mini, it's compatible with the Uno but smaller and easy to solder wires directly to it.
Hi Fungus, you opened my eyes on a new world! Arduino Pro Mini it's very very very interesting!
As I see all I need an USB breakout to program it.
The Pro Mini can be programmed like Arduino Uno, I'm right? I mean... the most common libraries can be used with the Pro Mini too (e.g. wire.h, LiquidCrystal.h, etc.) ?
Also the "Arduino Mini" seems very similar, there are drawbacks in using it in place of the Pro Mini?
fungus:
If It's I2C then I'd use a long USB cable - they're shielded, have four wires in them, and are designed for transmitting that sort of signal.
I was thinking the same, I will make an attempt in the next days and I will keep you informed. In the meanwhile I'm going to order a Cat 5e SF/FTP internet cable.
It has 8 wires coupled in 4 pairs (AWG 26 section If I remember right), more than this
wires of every pair are twisted to reduce noise
every single pair is shielded by a metallic folium
all the cable itself is shielded by another folium
I think that if signals will be not transmitted with above cable then probability that other cables could do that are close to zero. Or not?
fungus:
For strain/vibration relief use heatshrink tubing and hot glue. make sure that no matter what you do with the main cable, none of the movement is transmitted to the points where the small cables are joined the the Arduino/screen. This also protects against dirt/water.
Yes, I will try to fix the cable in the most stable manner I can.
I have connected a 150cm cable to the adafruit 1'44 TFT display and zero problem. No signal degradation.
I have used an ethernet cable bought on amazon for few bucks, just cut the RJ-45 at both ends and crimped 0.1" pins. I have connected one end to the arduino board and the other end to the display. I've used no additional circuit.
The cable I've used is a Cat5e marked as a "SFTP CAT5e netwotking patch cord 26AWGx4". Honestly I was searching for a cable where even the single pairs are shielded by a foil (FFTP, named also F/FTP), but I didn't find it on amazon. Take a look at this page on wikipedia Twisted pair - Wikipedia for details.
I've executed my own tests (as well as the official Adafruit test-sketch) and I cannot appreciate any delay in transmission or strange behaviours.
It may be marginally stable this way. Ethernet-cable have a lot of capacitance, and it is really very unsuitable for anything else than balanced signalling that travel down the pairs.
Look at the signal with a scope and see how much ringing you have on your signals. My best guess is that the signals won't have a clean sharp edge any more.