navigation bar

 

Home Projects Information Roadmap

The MBARI antifouling shutter for optical instruments in the ocean.

Author: Dave Wright
Last update: 1/26/99

Overview

The shutters were developed to reduce the effect of biofouling on a variety of optical instruments in use on our moored platforms. The initial development work was done using the Biospherical model PRR-600T2 spectroradiometer. The concept is to cover the optical windows of the spectroradiometers with a copper disk when not making a measurement, thereby inhibiting the growth of fouling organisms. The shutter is a system comprising two parts; the mechanism which contains the motor, gears, feedback potentiometer, shaft and paddles; and the controller which consists of the motor drive electronics, the microprocessor, and the control software. The mechanism is attached to the side of the spectroradiometer and is submerged, while the controller is implemented as a routine executed by the OASIS microprocessor, with some additional hardware. The software for the shutter takes the form of a subroutine that is called whenever the shutter is opened or closed. The subroutine makes use of one A/D input channel and two input/output bits to communicate with a motor control circuit which provides start/stop control, direction reversing, overcurrent detection, and position sensing for the mechanism.

While not intended to be an exhaustive treatment, nor step-by-step instructions on how to construct an identical unit, what follows should allow mechanical designers and programmers to grasp the concepts and functionality of our system, and make a start on their own. We learned much during during the initial effort, and work is now underway on an improved version.

Mechanical section
Electrical section
Software section
Setup section

Photos taken of the shutter attached to a spectroradiometer.

This shot is of the 10M and 20M instrument cages with the shutter/spectro assemblies attached.  


Click on image for enlarged view

In this view you can see the means by which the shutter is attached to the spectroradiometer.


click on image for enlarged view

This is an end-on view of the optical window of the shutter, with the copper paddle in the open position.


click on image for enlarged view

Mechanical:

The mechanism consists of a long shaft, offset from the centerline of the housing, upon which the copper paddles are mounted. Plastic shaft supports are attached to each end of the spectroradiometers in order to support and position the paddles over the windows when closed. Internal to the housing a DC gearmotor is coupled to the long shaft via an anti-backlash gear. Also coupled to the long shaft, by way of the same anti-backlash gear, is a single turn potentiometer. This potentiometer allows us to determine the position of the paddles relative to the optical window of the spectroradiometer.

Here is an assembly drawing of the shutter mechanism.

Electrical:

A general purpose DC motor drive circuit was designed to meet the needs of the shutter. Overcurrent detection and automatic shutdown allow recovery from jamming or obstruction of the paddles as they rotate. Signal conditioning for the potentiometer was included as well. A printed circuit board was created to package the circuit, and it was installed as a peripheral to the OASIS mooring controller. The links below serve to better explain the details of the circuitry.

The shutter mechanism electrical schematic and bill of materials (electrical).

The "DC Drive" generic motor drive circuit schematic.

DC Drive,  detailed design description.

DC Drive, configuration for the shutter.

Software:

The software defines much of the behavior of the shutter. In our early efforts, no provision was made for dealing with an obstruction that might block the paddles as they rotate. Consequently, on our first deployment at sea, an object became lodged beween the paddle and the spectroradiometer housing and the geartrain was destroyed. Attempts were made to deal with that problem by mechanical means by way of slip clutches, but the results were not satisfactory. It was decided to make the shutter more "intelligent" in hopes that future failures could be avoided.

Driver description:

The shutters now implement a collision recovery algorithm to deal with possible obstructions in the field. This is made possible by motor drive hardware that is capable of sensing the motor torque and disabling the power if a preset limit is exceeded. The software controlling the shutters is aware that a collision has occurred, and reverses the direction of rotation in an attempt to clear the obstruction. Whether the shutter is opening or closing, it keeps track of how many times the motor is started in an attempt to reach the desired condition. The number of attempts made before giving up and declaring the operation a failure is set in the driver parameters for that shutter. The shutter will repeatedly reverse direction until it gets where it wants to, or the allowed number of attempts have been made. In addition to dealing with obstructions, there is a limit to the amount of time allowed to get to a desired location. This is to prevent the motor from running endlessly due a failure of the feedback mechanism or electronics. This time limit is set to be slightly longer than a complete revolution of the shutter.

Each time the shutter operates, a log record is generated. The record reports the success or failure of the operation, what went wrong, and the state that the shutter was left in. These records can be used to determine the performance of the shutters in the field, and whether obstructions have occurred.

In the event that a shutter exceeds the allowed attempts in opening or closing, the operation is considered a failure, and the COUNT value is incremented. If the following operation is successful, COUNT is set to zero. If there are 5 failures in a row, the shutter will disable itself from further attempts, and the COUNT must be manually reset.

Utility programs to allow manual operation and calibration of the shutters are available, see shutcom.txt and shutcal.txt.

Shutter operation is controlled by several driver parameters.

They are:

PARM0: Shutter number, the physical address. 0 or 1 for two shutter systems.

PARM1: Closed position calibration, specific to each shutter, determined interactively.

PARM2: Number of attempts allowed to complete an open or close, typically 5.

TIMEOUT: Seconds allowed for each attempt, typically no less than 30.

COUNT: Number of successive failures, at 5 the driver disables itself. To manually disable the shutter, set this number to 99.

Log record description:

The shutter opening and closing operations produce four bytes of data which are logged. The data is organized as two words, the first of which is the position of the paddles when the operation was completed, and the second which is a packed record of various error codes.

In the source file shut22.c they are defined as:

Nat16 ShutterLogData[2].

And are stored thusly:

drvLog(dp,(Byte *)ShutterLogData,sizeof(ShutterLogData));

They contain:

ShutterLogData[0] = position of paddles on exit from driver, typically in the range of 150 to 900 counts.

ShutterLogData[1] = bit packed as <msb> DNNN EEEE CCCC CCCC <lsb>, where

D = direction bit, 1 = open
N= shutter number, 0 thru 7
E = error codes
C = attempt count, 0 thru 255.

Currently defined error codes are:

0 = successful operation
1 = timeout
2 = too many attempts (collisions)
5 = redundant operation, already there.

When using the OASIS user interface, and requesting a dump, the byte ordering is:

(accounting for a little endian presentation)

LSposition MSposition AttempCount DNNNEEEE

When reading the decoded logs in file://Tsunami/oasis/m1/shutter0 (or wherever) the presentation looks like this:

286.02605 353 0001 0 1 0 close
286.03230 170 8001 0 1 0 open
286.03294 353 0001 0 1 0 close
286.03925 169 8001 0 1 0 open

Where the first number is the UTDayOfYear, the second is the paddle position, and the third is the bit-packed status word. That is followed by the decoded meaning of the status word; shutter number, number of tries, error code, operation type.

The error code should be 0 for all records unless we have a problem. In some cases an error code of 5 may appear if the shutter has been operated manually in between readings of the spectros, and left in the open position. In that case the shutter driver will find the shutter already open at the appointed time. This is not an error per se, but an indication of something unexpected, and should be noted. Error codes of 1 or 2 indicate that the shutter could not open or close properly and should be brought to the attention of either Dave Wright or Bob Herlien. The "number of tries" number will be 1 for all normal cases, and may be greater than one if the shutter had to reverse direction to clear an obstruction. Any record that contains a tries number greater than one should be logged for future reference, and reported to Dave Wright.

The "paddle position" number indicates where the paddle was in relation to the optical window of the spectros when the driver finished moving (or attempting to move) the paddles. The calibrated closed position for each shutter can be found in the file //Typhoon/Dropbox/OASIS/doc/shutterPosition.txt, and the fully open positions can be calculated by adding or subtracting 180 to the closed position.

Sourcecode files:

The sourcecode for the shutter driver and the utilities to manually operate the shutter are included for reference and to answer any questions not addressed in the brief above. Note that the driver runs as a subroutine within the OASIS controller, and that documentation of the OASIS API is beyond the scope of this description. However, it is hoped that it will be apparent to an embedded system programmer what is going on.

The driver sourcecode in C, shut22.h & shut22.c

A test and calibration routine for use with a fast comminucations link (>9600 baud), shutcal.c

A routine to test the shutter over a slow communications link (packet radio), shutcom.c

Setup:

The design of the driver code allows any arbitrary orientation of the paddles to be defined as the "closed" position, and a certain minimum rotation away in either direction to be defined as "open". This enables the accumulated tolerances of the various mechanical and electrical components to be accounted for, in any particular combination of shutter mechanism, DC Drive board, and OASIS A/D calibration errors. This works fine if none of the components are substituted without recalibrating. In the real world however, we found it neccessary for divers to exchange the shutter/spectro assemblies during mid-deployment on our moorings. This led to some difficulties in maintaining the calibration in the field, as any new calibration constants are kept in RAM on the OASIS controller, rather than in EPROM. The result of this is that the new calibration is only retained until the next OASIS reboot, whereupon the default values in the EPROM are restored. In order to get around this, we have begun to define the closed position of the shutter/spectro assembly as a specific resistance, and when calibrating the OASIS A/D and DC Drive board as a pair, we use that specific resistance to define the "closed" position value that is burned into EPROM for that controller.

Setup instructions for mechanical technicians.

Back to: MBARI Moorings
Back to :  MBARI  Research and Development Division

If you have comments regarding the Biological Ocean Group's web pages you are welcome to contact us through our group's webmaster, reiko at mbari.org.

      Last Updated: 07 June, 2002