Department of Marine Science
The pilot of the Catalina ROV can control three different aspects of the ROV: The camera, the video lights, and the thrusters. Control of the camera and lights is simply a matter of turning them on or off with a button or switch and will be described first. Control of the thrusters is more complex and will be described later on this page.
Video light control
Control of the video lights is very straightforward. A rocker switch located on the front surface of the electronics box turns them on or off by connecting them or disconnecting them from the 12 volt power supplied by the battery. All three light bars are either on or off at the same time, and here is no brightness control.
Control of the camera is only slightly more complicated. When configured properly for use in the Catalina ROVs, the camera should be in its so-called “one-button” mode. To put the camera in one-button mode, follow the instructions in the camera user's manual. When in this mode, the camera starts recording video automatically as soon as it is turned on and continues recording until it is turned off. If the Ridax circuit board plugged into the back of the camera has been wired correctly (see Camera System page), then the camera will also send a live NTSC analog video signal through the tether to the TV monitor on the Pilot's Console whenever it is turned on.
In normal use, you can turn on this model of GoPro camera by pressing the “Power/Mode” button located on the front of the camera briefly, about 1/2 second or so. You can turn off the camera by pressing that same button while the camera is on and holding it down for about 3 seconds before releasing it.
The Catalina ROVs have been wired so that this Power/Mode button function has been duplicated on the Pilot’s Console; one of the spare buttons on the joystick now controls the camera just as if it were the Power/Mode button on the camera itself, so the pilot can now turn the camera on or off from the surface, even while the camera is out of reach under water.
Electrically, the circuit for doing this is fairly simple. Inside the camera, there appears to be a wire that normally carries 3.3 volts on it, but when the power/mode button on the front of the camera is pressed, this wire gets shorted to ground and carries approximately zero volts. The circuitry inside the camera detects this drop in voltage and uses it to “know” when the button is being pressed by the user. Conveniently, that 3.3V wire is connected to pin #12 of the 30-pin GoPro bus in the back of the camera. By shorting this pin to ground for 0.5 seconds, you can turn on the camera. By shorting it to ground for 3 seconds, you can turn off the camera. If you haven’t yet read about the GoPro bus and the Ridax breakout board on the Camera System page, you should do that before reading the next couple of paragraphs, or they won't make much sense.
So, to duplicate the camera’s Power/Mode button on the surface, we just needed to bring a wire from pin #12 of the GoPro bus to the surface along with a ground wire and then hook them to a pushbutton on the Pilot’s Console, so the two wires would be connected to each other (thereby shorting pin 12 to ground) whenever the pushbutton was being pressed. The Logitech Extreme 3D Pro joystick has an abundance of spare pushbuttons, so we just picked a conveniently located one (button #11, which is near the front left side of the base of the joystick) and used it.
Inside the joystick, we disconnected this button from its usual circuitry and soldered a pair of thin blue Kynar (aka “wire-wrap”) wires to it. These wires are twisted together and run out of the joystick and into the adjacent electronics box where they connect to the RJ-45 socket where the Cat-5e portion of the tether plugs in. When the tether is connected, the two blue Kynar wires coming from joystick button #11 connect to the brown twisted pair of wires in the Cat-5e cable. At the bottom end of this cable, inside the waterproof camera housing, this twisted pair of brown wires is soldered to the Ridax breakout board as follows: The solid brown wire in the pair is connected to GoPro bus pin #9, which is one of the camera grounds. The white/brown wire (i.e., white wire with brown stripe) of the pair is connected to GoPro bus pin #12, which is the Power/Mode button wire that normally carries 3.3 volts, except when the button is pushed.
Overview of thruster control
The Catalina ROVs employ four thrusters arranged to enable a wide range of useful maneuvers: forward or backward, sideways left or right, spinning to the left or right, moving up or down, or doing any combination of those things. Moreover, the speed of each thruster can be controlled in each direction allowing for smooth, precise control of vehicle movement.
To make this control as simple and intuitive as possible for the pilot, the Catalina ROV design combines a 4-axis gaming joystick with versatile motor controller circuits.
The joystick is a Logitech Extreme 3D Pro, which not only offers the usual 2-axes found in other joysticks (for forward/backward and left/right motions), but also offers twist action (to spin left or right) and a “throttle” lever. The throttle is normally used to control aircraft speed in the flight simulator computer games for which this joystick is commonly used. However, for the Catalina ROV, we repurposed this throttle control and used it to control the vertical (up / down) movements of the ROV. This and other modifications we made to the joystick are described below.
The motor controllers are Pololu TReX dual motor controllers. There are two of them in the electronics box, and each can provide bidirectional speed control for two DC brushed motors. Each TReX can also control a third unidirectional motor, but we are not using that feature in the Catalina ROVs. Together, the two TReX controllers are able to handle all four thrusters.
This joystick contains some fairly sophisticated electronics normally used to communicate digitally with a computer through the joystick’s USB cable. However, we don’t need those circuits for the Catalina ROVs, because they do not rely on a computer. Instead, we bypass all of that circuitry by quite literally opening the joystick and cutting many of the wires going to and from those circuit boards inside the joystick.
All we really need from this joystick is its pilot-friendly ergonomic design and access to it’s four potentiometers, which are adjustable resistors whose electrical resistance depends on the instant-by-instant position of the joystick controls. There are four of these potentiometers inside the joystick, one for each axis the joystick can control:
- forward / backward
- left / right
- twist left / twist right
- throttle up / throttle down
We have rewired the joystick internally, so that each of these potentiometers becomes part of a simple electrical circuit known as a voltage divider. Then we power each of these voltage divider circuits with +5 volts (from one of the motor controllers; more on this in a moment) and use it to return a voltage signal that varies between about 0 and 5 volts, depending on joystick position. These signals (one from each of the four potentiometers in the joystick) are then sent to the motor controllers which interpret them and use them to regulate the flow of electrical current from the battery to the thruster motors.
To access the potentiometer wires, you’ll need to open the joystick. Start by removing the outer covering of the handle. There are a couple of obvious screws, plus a couple of not-so-obvious screws partly hidden by the rubber sleeve near the base of the handle, and one spring-loaded clip under the “wrist rest” on the handle that must be removed/released to separate the two halves of the joystick handle.
Next, you’ll need to open the base. To do this, unscrew all the screws located around the perimeter of the underside of the base, and gently lift the top cover of the base over the joystick column. It will be attached to the bottom of the base by wires.
The photo above shows two potentiometers (small black rectangular objects with wires emerging from them) located at the base of the joystick. The red wires supply +5V to each potentiometer, the black wires are ground (zero volts). The potentiometer on the left side senses the forward/backward angle of the joystick and transmits that angle encoded as an analog voltage on the white wire. The potentiometer located in the front senses the left/right angle of the joystick and sends its signal on the green wire.
The small black rectangle located on top of the central joystick column in the photo above is the potentiometer used to sense the twist angle of the joystick. We use the signal from this potentiometer to control turning of the ROV. It has a blue, black, and brown wire coming out of it. The brown wire supplies +5V to the potentiometer, the blue wire acts as ground, and the black wire carries the analog signal.
The photo above shows the last of the four potentiometers; it’s the bright red object at lower right in the photo. It's located on the underside of the base cover and is attached to the “throttle” lever, which we repurpose to control vertical movement of the ROV through the water. This potentiometer has a red, white, and green wire coming from it. In this photo, you can also see how we have cut the red, green, and white wires from the vertical potentiometer and the brown, black, and blue wires from the twist potentiometer as they come out of the joystick column. After being cut, we stripped a bit of insulation off the ends of the wires and soldered them to some Cat-5e wires to connect the potentiometers to the TReX motor controllers located inside the electronics box on the Pilot’s Console.
The diagram above summarizes how we connected the potentiometer wires to the eight wires in a short section of Cat-5e cable, which ran from the joystick over to the electronics box. If the wiring on this end or the other end of this short section of Cat-5e is not done correctly, the thrusters will not behave as expected and the potentiometers could be damaged, so check your wiring carefully. Please not that while these are the wire colors we found consistently in the 8 such joysticks we dissected, manufacturer’s may change wire colors, so you should confirm that the wire colors for each potentiometer in your joystick are the same; if not, just solder to the corresponding wires.
Motor controller (TReX) configuration
The most sophisticated part of our motion control is handled by dedicated circuits called motor controllers. When the pilot moves the joystick, the electrical signals produced by the joystick may be precise, but they are tiny and not strong enough to run the thruster motors directly. The job of the motor controller circuits is to take these tiny, but informed, signals, process them, and amplify them to send the right amount of electrical current flowing in the right direction through the thruster motors to make the ROV move correctly in response to the pilot’s joystick movements.
There are many different kinds of motor controllers made by many different manufacturers. The particular ones we selected for use in the Catalina ROV are called “TReX dual motor controllers,” and they are manufactured by a company called Pololu, which sells them primarily for robotics projects. Their specifications are well suited to the number, type, and electrical current requirements of the bilge pump motors used in the Catalina ROV thrusters. Detailed information about the TReX controllers is provided in the “Pololu TReX User’s Guide,” which is a 24-page .pdf document available for free download from the Pololu.com web site. Anyone contemplating changes to the Catalina’s TReX boards or attempting to troubleshoot problems with the thruster control system should consult that document for details about how to use and configure the TReX motor controllers.
The TReX controllers can accept a variety of different input command formats, and each TReX can handle two motors, either independently or in a combined way that allows a single command to affect two motors simultaneously. These controllers can also be calibrated to compensate for minor variations between different joysticks, and they have built-in protection against common potential problems like overheating. All of this enables sophisticated control and advanced maneuvering capabilities while greatly simplifying the design of the Catalina ROVs.
The middle yellow arrow in the photo above points to a blue jumper used to tell the TReX whether to expect analog voltages or standard R/C pulses as the “language” through which it will receive commands from the pilot. In the case of the Catalina ROVs, we are sending analog voltages from the joystick to the TReXs, so the jumper is placed across the two pins labeled “An” for analog. This setting is the same on both TReXs. When used in analog mode, the TReX expects an input signal in the form of an electrical voltage between 0 and 5 volts. So, for example, a signal of 0 volts might mean “run the motor full speed in reverse,” a signal of 5 volts might mean “run the motor full speed forward,” and a signal of 2.5 volts might mean “stop.” Intermediate voltages, like 3.0 volts for example, would result in intermediate speeds, like “run the motor slowly forward at 20% of full speed.”
The yellow arrow at upper right in the photo points to the “Mix” mode jumper. When the blue jumper is placed across the two “Mix” pins, as it is on the rightmost TReX, it tells that TReX to control the two motors attached to it as if they were the caterpillar treads on a bulldozer; thus, for example, a “go forward” command from the joystick causes the TReX to route forward power to both the port and starboard thrusters instead of just one. In contrast, the TReX on the left side of the box controls the vertical and lateral thrusters, which are each controlled by separate signals from the joystick. Accordingly, it’s jumper should NOT connect both of the Mix pins on the leftmost TReX. Instead, it is turned 90-degrees and placed on just one of the pins for storage.
The third and final yellow arrow in the photo points to the array of pins associated with the input signals being delivered to the TReX boards. The photo below shows this area in more detail from a slightly different angle.
This area consists of a 3x5 array of header pins sticking up from the board. The three columns are labeled “-” for ground, “+” for the positive reference voltage for the analog signal, and “S” for the signal itself. The blue jumper visible in the photo next to row 1 is the “BEC” jumper, which connects the board’s onboard +5V supply to the “+” column. This jumper must be in place, or the Catalina ROV joystick will not receive power and will be unable to send signals to the TReX controllers.
The five pin rows in the 3x5 array are labeled 1, 2, 3, 4I, and 5O. The first two (1 & 2) are used to control two bidirectional motors. These are the ones we used to control the thruster motors. The third one (3) controls an optional unidirectional motor, which we did not use. The last two (4I and 5O) control other configuration options, which we did not use in the Catalina ROVs. In the photo, you can see that rows 1 and 2 each have a black, 3-wire connector plugged onto the header pins. Each of these connectors has a red (+5 volts), black (ground), and white (analog signal) wire, which go to the modified joystick. Rows 4I and 5O have their signal (S) pin wired to their +5V pin via tiny red Kynar (aka wire-wrap) wires. These connections are required for proper operation of the Catalina ROVs. The middle row (3) has its signal (S) pin connected via a tiny white Kynar (wire-wrap) to the signal (S) pin of row 2. This provides a valid joystick signal for the unidirectional motor; even though we are not using row 3 to control a motor, a valid joystick signal for that potential unidirectional motor is required to successfully complete the calibration procedure, and having row 3 copy the signal going to row 2 was an easy way to obtain a valid signal.
Joystick / Trex calibration
For best performance, the TReX controller must “learn” the signals sent to it by the joystick when the joystick is in its centered position and the extremes of each of its four axes. The Pololu TReX User’s Guide (available for download from the Pololu web site) provides a detailed, step-by-step procedure for performing this calibration process, so it will not be repeated here. Be warned; however, that if done incorrectly, the TReX can be damaged permanently. In particular, the Learning-Mode/Firmware-Upgrade jumper should never be added while the TReX is powered. This jumper is located near the upper right side of each TReX, on a row of 5 header pins with the following labels: Rx, Tx, G, SO, and SI. Always disconnect power first, then change the state of that jumper, if needed, before powering back on.