Our ROV build is progressing nicely. However, we have encountered a problem running the motors at full power in water. Here’s a synopsis of what we have setup.
We’ve successfully wired all our motors into the water tight enclosure, along with the ESC’s. Everything is watertight, and there are no short circuits. To control the motors, we’ve used a a CATe5 cable to transfer UDP data from a Raspberry Pi 2 on the surface to a Raspberry Pi 2 in the tube. Other electronics in the tube include an ethernet switch, an Adafruit PWM Board, and a couple of buck converters to step down the 12V for the Pi and the switch. The motors receive their power from a 12V power supply on the surface (which has a maximum output of 25A) through approximately 70ft of thick, insulated copper wire.
Running the system above water doesn’t yield any problem. When we tested it in water, the system failed. Applying continuous almost full throttle (roughly 80-85%) to more than one motor at the same time causes the code to freeze on both Pi’s. The Pi’s themselves don’t freeze and they do not shut down or reboot. Detaching the motors and sending the same signals does not cause the system to freeze.
We think the problem may have something to do with the load the motors undergo beneath the water, and the current they draw. We’ve attached the code below. Any help would be greatly appreciated!!
This is almost certainly caused by a large voltage drop through the power cable as you draw more current. Can you tell me more about the power cable in terms of wire gauge?
As an example, you can use this handy calculator to see that at 12V through 70 ft of 14 AWG wire, you’ll get a voltage drop of almost 8 volts! That means that the thrusters will see 4V, which is low enough that they would reset the ESCs.
This effect only happens in water because the motors draw much more power in water than in air.
If this is the issue, you have a few options:
Shorten you tether to reduce voltage drop.
Increase the wire gauge of your tether to reduce voltage drop.
Limit the thruster outputs in software so that you don’t reach a dangerous level.
Thanks for your help! We do have 14 gauge wire, and have used two lengths for positive and two lengths for ground. If voltage drop is the problem, we’ve calculated that cutting the tether by 20ft and adding another 2 lengths of wire should fix the voltage drop; from 7V to only 2V.
Also, you mentioned that the ESC’s are possibly resetting, but there is nothing that indicates to us that they do. The lights stayed green and we saw no flashing or tones. Another thing is the code freeze; do you think the resetting ESCs would be causing it?
How are you determining that the code has stopped executing, or frozen? Do the motors stop after going full throttle? How do you get it working again after it has frozen?
We determined that the code stops executing from the command line; our code prints the current state of the ROV’s motors. When two motors reach about 80% full throttle, nothing gets printed to the command line, and all control becomes dead. However, the motors still continue to run at 80% throttle.
To regain control we basically pull the plug and restart the system.
This is an interesting issue. I’d like to know a few more things:
Is it possible to try with a shorter power cable temporarily to see if the voltage drop is the issue?
If the ESCs continue to run, then they are not restarting. Do they continue to run indefinitely or for only 10-15 seconds? If they eventually shut off, then it’s more likely that the computer is ceasing to send valid PWM signals.
Do you have any way to measure voltages onboard while running in water? It would be good to measure the power supply voltage and the computer power voltage.
We’ve found out why our code freezes! The two PIs communicate through ethernet, but also the ethernet switch. Since the switch runs at 9V, the voltage must drop low enough to cause it to malfunction. This means a break in communication, which then halts the code. After running the ethernet cable straight between the PIs, everything worked fine.
However, the voltage drop then affected the ESCs like you predicted. At close to 100% full throttle, the motors would stop, and control would only be regained if a ‘stopped signal’ (or 0% throttle) was sent for a few instants. We then cut the tether down to 50ft, and added another 2 lengths of wire. This fixed the ESCs behaviour. No matter how sharply we changed the throttle they never ‘reset’.
We did take measurements of voltage with some interesting results. The tests were (carefully) done with the guts of the ROV above the surface and the motors in a small tank of water. Before we changed the tether, the voltage of the electronics running was at 11.05V and the voltage with two of the motors running reached about 9.70V before the ESCs reset. After the tether update, the voltages were even lower at 10.90V and 9.30V. Is this normal, or are we reading the voltages incorrectly? All measurements were taken at the terminals of the power supply.
Fantastic work! Glad you were able to figure this out.
Regarding your voltage measurements, you said they are measured at the terminals of the power supply, right? The voltage drop will only be measurable at the end of the tether near the ROV. There will be a slight voltage drop across the terminals of the supply when a load is applied, but the big drop will be near the ROV.
Can you test that out somehow and let us know how it goes? The ESCs should not reset at all at 9V. They won’t reset until the power hits about 4V.
We’ve done another voltage test. This time we measured the voltages at the the end of our tether. The measurements were 11.30V with only the electronics running and 7.50V when we ran two motors at full throttle. The drop is low enough to not harm anything, as we’re ditching the 9V ethernet switch in favour of a simpler setup.