Posts: 22
Threads: 5
Joined: Mar 2019
Reputation:
0
I would be very gretaful if experience could be shared from users regarding the maximum cable length for the serial connection between a TinyPilot Hat (direct feed from RaspberryPI UART @3.3V) and a motor controller (isolated thanks to a CPC5001 optocoupler).
Best regards,
Damien.
Posts: 1,884
Threads: 17
Joined: Jun 2016
Reputation:
50
if you use a shielded cable it is generally hundreds of feet
Generally it will work for very long runs unless there is some interference.
Posts: 22
Threads: 5
Joined: Mar 2019
Reputation:
0
Hi Sean,
Thanks for the information.
I was envisionning something like 6m ; it sounds from your answer that it should work fine.
I will pay attention to interferences and will make some tests prior to final implementation.
Thanks again,
Damien.
Posts: 414
Threads: 26
Joined: Jun 2019
Reputation:
29
2023-02-03, 03:42 PM
(This post was last modified: 2023-02-06, 03:03 PM by ironman.)
The protocol over that line includes a crc - a redundancy check, so messages are dropped if they don't sum up. Is there some way to signal 'dropped packets', e.g. in arduino_servo.cpp? Otherwise faults due to line interference are hard to diagnose.
Posts: 1,884
Threads: 17
Joined: Jun 2016
Reputation:
50
if it didnt do a crc i dont think you would notice.. I just really dont want wrong commands to ever get through.
Anyway, you can run the wires basically anywhere in the boat and not have a length issue.
Posts: 414
Threads: 26
Joined: Jun 2019
Reputation:
29
Ok, but if ever, against all odds, the line would suffer from interference, there is no logging of it anywhere, although there could be some warning. It now feels a bit like ostricizing, without the need to stick your head into the ground ;-)
Posts: 1,884
Threads: 17
Joined: Jun 2016
Reputation:
50
I tried when I had a 200ft ethernet cable and it worked perfectly with no errors...
Do you want to count and record crc errors somehow or start using packet serial numbers to detect if some dont reach or?? Is this a solution searching for a problem?