Friday, November 11, 2011

Looking for Our Missing Pieces, Pt. 1B: Motor Controllers

Now we've gotten some juice from topside down to the vehicle and converted it to a nice, smooth 12 volts DC.  The next step is throttling the amount that goes to the thruster motors.  The device that takes commands directly from the topside computer and sends them to the ROV's various components, acting as a serial mux/demuxer, is an Arduino microcontroller board (more on this later.)  But the Arduino can only generate low-current 5V logic level signals.  We needed something that would bridge the gap between the delicate logic electronics and the high-power, noisy motors turning the props.

This is where motor controllers come: they take the small signals from the microcontroller and let them control the substantially larger (>12,000x as much power dissipated) flow of power to each motor.

The basic circuit for a DC motor controller with reversing capability is known as an H-bridge.  A simplified version using flip switches instead of MOS field effect transistors is shown below.  
click for circuit diagram key
If you've ever tried hooking up a DC motor to a battery, you'll realize that when switches S1 and S4 are closed, the motor will spin one way, and when S2 and S3 are closed, it'll go the other.  This works great for running a motor in two directions, but there was still the issue of controlling its speed.  To do this, we'd have to change VDD, the voltage supplied to the H-bridge.  This is a bigger deal than it might seem, since our control electronics are digital, that is, they can output a HI ("on," or digital 1) or LO ("off," or digital 0) signal, but nothing in between.  We solved this issue by using a commercially available motor controller that modulates speed using a PWM signal.

First, the actual component: we decided on the Turborix EL110 Electronic Speed Controller (ESC), which is rated at 110A in the forward direction, 40A in reverse, and is designed for use in remote-controlled boats.  Here are a couple zipped onto a temporary bracket in the starboard hull. 

Second, I'll explain the acronym so rudely introduced three sentences back: PWM.

Pulse-Width Modulated signals are by definition binary, which means they have rectangular waveforms, and can also be generated by digital electronics.  The information they carry depends on the amount of time the signal spends in the HI state vs. the LO state.  The percent of the phase spent HI is called the duty cycle.  

Diagram of a PWM wave.  Duty cycle is shown in green, constant phase length in blue.
When used to drive a DC motor, these waves serve to imitate an analog variable voltage signal.  For example, instead of putting out a steady 6V to run at 1/2 speed or 9V for 3/4 speed, the ESC generates 12V 50% or 75% of the time.  The high frequency of the PWM signal (about 2500 Hz) and the motor shaft's angular momentum help eliminate the jerking motion one might expect, but the motor still emits a whine.

You can see this post's subject in action when Jake fires up a motor on the bench:

 
Until Next Phase,_,---,_,---,_,--,_,--,_,-,_,-,_,-,   Jacob