Hello everyone,
We bought two 8-pin Cobalt Series Bulkead Connectors as @EliotBR suggested. One connector for the electronics enclosure and one for the camera enclosure. We also bought the corresponding double-ended cable.
We choose the 8-pin connector because it is the one that has twisted pairs, and following the advice provided in this post it was recommended to use twisted pairs. The 6-pin hybrid also has 2 twisted pairs however it was out of stock at the moment we placed the order.
I welded the twisted pairs of the Cobalt connectors to the USB connectors, however I was having the same issues as before. After asking around, one of our colleagues suggested that the welding might be adding some resistance to the wires, and this is totally what was happening. Too many welding points across the cables was adding enough resistance to disrupt the signal! @williangalvani might be having this same issue.
The solution:
We built the JST connector for the camera and the USB connector that goes to the Raspberry using the wires of the Cobalt connector, this way we don’t weld the cable at any point. It works really well!. The cable is 1m long and we haven’t had any issues so far.
What remains to be tested is if this can work with the 4-pin Cobalt connector (i.e the untwisted wires), but I don’t think we will try to test this.
Again, thanks everyone for your advices and have a nice day!