One of the first things you should consider when designing a system to work in a wet environment is how you are going to electrically connect component A to component B in a reliable way. When we want to charge our phones, we simply plug the charging cord into the bottom of the phone, and by the next morning our phone is ready to go. But how long would that connection keep working if it were submerged in salt water? Minutes? Seconds? Unfortunately, making waterproof electrical connections in a wet environment is a lot harder (and more expensive) than it looks, especially if it's in salt water or under significant pressure.
Since every electrical connection in a wet environment is a possible failure point, you want to try to limit them as much as possible. On the autonomous boat SeaCharger, I had a total of five components (two solar panels, the thruster motor, the rudder servo, and the main electronics enclosure) that had to be connected to each other with cables, and in each case the connection was constantly exposed to seawater. However, the requirements for these connections were not all the same. The questions you need to ask for each electrical connection are:
Do I need to be able to readily connect and disconnect the cable from the component, or can it be a semi-permanent or permanent connection?
What are the consequences of the connection failing?
How much money do I want to spend on this connection?
With those questions in mind, let's examine the various ways to make waterproof electrical connections. In each case, we'll assume that we're trying to connect an electrical cable to an electronics enclosure, but these same principles apply to making connections to actuators, antennas, sensors, etc.
Potting/bonding a cable into a hole in the wall of the enclosure
One way to make a connection is to simply take a cable, pass it through a hole in your component's enclosure, and squeeze some sealant around the hole to waterproof it. This can work, but you have to make sure that your glue/sealant sticks well to both the cable and the enclosure, and that the surfaces are prepared properly for bonding. 3M Marine Adhesive 5200 is a good choice for many applications, but be sure to read the instructions carefully.
You also have to make sure there’s little or no stress on the cable trying to pull it out. Even if the cable doesn't pull out completely, any pulling or bending stress can create a leak in the sealant.
Your cable jacket material is very important! In most cases, the best cable jacket material is urethane (or polyurethane, same thing). Urethane is very tough, it’s easy to bond to if you use a urethane adhesive, and it’s waterproof. It can be difficult to find urethane-jacketed cables, but it’s worth it. Other materials worth considering are EPDM and neoprene. They are also tough and can be bonded with urethane adhesive. Don’t even think of using PVC-jacketed cable!
Of course, this is a permanent (non-removable solution). Also, if you cut the cable, water WILL travel down the cable, either between the wires or even along the strands of copper inside the wires. So even if your seal between the cable and the enclosure holds, you can still get water leaking in if there’s a cut in the cable jacket.
A bulkhead penetrator is a fitting that allows a cable to "penetrate" the wall of an enclosure without having to be permanently bonded to the enclosure. It is typically affixed to the wall of the enclosure with a nut and seals against the enclosure with an O ring. A cable can be attached to the penetrator either by bonding the cable into the penetrator or by using some kind of mechanical connection. A penetrator is less permanent than bonding a cable directly to the enclosure, but still takes a bit of effort to remove, usually requiring access to the inside of the enclosure in order to remove the nut and disconnect the wires.
Among the types of penetrators where the cable is bonded into the penetrator, Blue Robotics sells a nice anodized aluminum version. The internet abounds with various DIY versions as well.
A type of penetrator that doesn't require bonding is the "cable gland" or "cord grip". These have a rubber sleeve which clamps down on the cable to make a waterproof seal. Cable glands are actually quite common; in fact, you can even find them at Home Depot. They are typically used in outdoor applications where you need to pass electrical wires into a junction box. Unfortunately, most cable glands are not really designed for submersion. The seal between the rubber sleeve and the body of the cable gland is often marginal, as is the seal between the body of the cable gland and the wall of the enclosure.
Blue Trail Engineering sells Simple Penetrators in two sizes, suitable for cables up to 5 mm in diameter. To use a Simple Penetrator, you attach a length of polyurethane tubing over the outside, barbed portion of the penetrator, making a waterproof conduit for your cable without having to do any messy and error-prone potting. The Simple Penetrator is exactly as the name says: simple. And with that simplicity comes reliability and very low cost.
With any type of penetrator, if the cable gets cut, the penetrator will not stop water from traveling down the individual wires and into your enclosure. It is possible to bond your cable into the penetrator in such a way that you can stop this from happening, but it's quite a bit more difficult (you have to expose the wire strands in the cable and fill them in with solder before potting; the potting and the solder will then prevent water from traveling any further, at least at lower pressures).
Connectors allow you to easily connect and disconnect the cable from the enclosure without having to open the enclosure. Connectors also have the added advantage of preventing water from entering your enclosure in the case of a cut cable.
Before discussing connectors further, let's get one thing straight: there's waterproof and then there's waterproof. If you Google "waterproof connector," you will get millions of results, but the vast majority of those are really more splash-proof than truly waterproof. If the connector has an IP rating, such as IP67 or IP68, it's probably not going to be good for long-term immersion in water. Instead, look for connectors with a depth rating (such as 100 meters) or that are meant for "subsea" applications. Even if your application is not going deep in the water (such as an autonomous boat), if you want it to be reliable in the long term, you probably need a connector that's truly designed for immersion in the ocean.
"Micro-Circular" connectors (with either MCBH or MCIL in the product name) are among the most common depth-rated waterproof connectors. They are a bit bulky and expensive (roughly $120 for a male/female pair), but usually work well, and as a bonus they can be mated while underwater if necessary. Amron International is one distributor that sells micro-circular connectors online. Many other companies sell these as well, although they often have to be special-ordered. Micro-circular connectors are made by various manufacturers (Subconn and Seacon are two examples, and you may be able to find imported versions as well). Different brands may be compatible with each other, but it would be wise to make sure all your connectors are from the same manufacturer to ensure compatibility.
In response to the bulkiness and high cost of the connectors that are currently on the market, Blue Trail Engineering developed the Cobalt series of underwater connectors. These connectors are available at significantly lower cost and at a much smaller size than any other waterproof connector, yet give the same functionality (except that they cannot be mated underwater), with a depth rating of 600 meters. There really is nothing else on the market comparable to the Cobalt connectors, especially for budget-constrained applications.