Introduction: Underwater Glider

We set out to build an underwater glider that would essentially have automated movement up and down through the water. This up and down movement was to be controlled with a ballast system created by the push and pull of various syringes. In short, the glider was to rest just above neutral buoyancy with the syringes empty, meaning it would float. Then when the motor pulled the syringes and they filled with water, the glider would dive. Once the glider reached a desired depth, the motor would push the syringes to empty them back out and the glider would rise up. To keep the glider from turning or tipping over, the glider would house an accelerometer attached to a servo holding weight. Whenever the accelerometer (and glider) became off-balanced, the weight would pivot to straighten the glider out. We also added a single, much smaller syringe so that we could obtain water samples at different depths in bodies of water for an environmental studies lab to examine.

Step 1: Ballast Control

Starting at the front of the glider, we first worked on the ballast system. We purchased three 60cc syringes and a 20cc syringe for the test from the Tractor Supply Company. We decided that the push/pull motion would be done by stepper motors directly connect to long threaded bolts. The syringes would sit in a fixed position at the front of the glider with the open ends facing the front.

Step 2: Syringe Mount

We bought an 18" x 4" diameter clear acrylic tube, with 1/8" walls. This would serve as the main body of the glider. We also purchased 24" worth of 4" PVC pipe and a Qwik Cap to seal the back. We attached about 12" of PVC to the back of the sub to house the electrical components, and also attached about 2" of PVC to the front to make the glider sit flat on a table during construction. Using the 3D printer, we fabricated a syringe holder that would also serve as the front end cap, fitting the inside of our 4'' diameter acrylic tube. Later application of silicone caulk would provide a waterproof seal in the front of the glider. As seen in the picture, the syringe mount would securely hold the three ballast-controlling syringes as well as the smaller, sample syringe.

Step 3: T-Nut Attachments

With all four syringes mounted in the 3D-printed mount, we fabricated a tool that would uniformly push and pull the three ballast syringes. The tool also housed a t-nut which would hold the threaded bolt attached to the stepper motor and provide the push/pull motion when turned. In a similar fashion, we attached a t-nut to the smaller syringe making it moveable with a threaded bolt attached to a smaller, separate stepper motor.

Step 4: Stepper and Servo Motor Mounts

Working our way towards the middle of the glider, next was the mounting of the stepper and servo motors. Using sheets of plastic cardboard, we created a sort of shelf to fit inside the tube. We mounted the two stepper motors to the plastic using pre-made mounts. Because of limited space in the tube, we fabricated a pulley system for the smaller stepper motor so that the motors could sit at the same alignment, yet turn threaded rods at different alignments (to match the setup of the syringes in the mount). This alignment change can be seen in the picture of the side view. In order to attach the servo motor to the plastic cardboard, we simply cut a hole the size of the motor and glued it in. The position of the weight on the servo was strategically placed in the middle of the glider to maximize stability control. All the wires from the three motors were directed towards the back of the glider.

Step 5: Connecting Mechanics to Ballast

To make sure everything aligned correctly, we attached the threaded rods at the end of the stepper motors to the t-nuts, screwing them in about an inch. The mechanics were then fully completed and ready to be attached inside the tube.

Step 6: Locking Mechanics Into the Body

In order to ensure that the syringes were the part that moved when the threaded bolt spun, and not the motors, we glued the plastic shelf holding the motors to the inside walls of the tube. We also glued the syringe mount to the inside of the very front of the tube to keep it from spinning or moving.

Step 7: Extending Wires

As seen in the pictures and mentioned before, we sent all the wires from the three motors to the very back of the glider where they would be attached to the electronics (Arduino, breadboard and battery).

Step 8: Waterproofing

With almost everything securely inside the tube, we waterproofed the glider. This meant applying silicone to the front, sealing the syringe mount, as well as to the point of connection between the acrylic tube and the PVC portion of the glider. We also made sure the Qwik Cap on the back fit snugly and was waterproof.

Step 9: Electronics and Power

We programmed our underwater glider using an Arduino UNO and the many Arduino libraries. In addition we needed two micro drivers to control the stepper motors that would push and pull our ballasts, a servo to control the weight and the 10 DOF Adafruit accelerometer. To power our device we used a 9 volt battery, and for the additional voltage needed for the stepper motors we used a 14.8V LiPo battery.

For the programming of the device we used 6 libraries in total:

AccelStepper.h
Metro.h
Wire.h
Servo.h
Adafruit_Sensor.h
Adafruit_LSM303_U.h

After setting up the various devices and motors we have a single main loop that controls the algorithm for the glider. Below we have included pseudo code for this loop.

 void loop (){
	swing();
	if still traveling{
		drop();
		stopANDtake();
		rise();
		finish();
	}
}

The swing function of our code takes the data from the accelerometer and changes the position of the servo according to its reading. This part of the code is called every time through the loop so the servo and the weight are in constant motion as the glider travels through the water. We have included our entire code below. We have the gates for the extremes past -10 and 10 in order to allow for the calculation for the servo to write.

void swing(){<br>    /* Get a new sensor event */ 
    sensors_event_t event; 
    accel.getEvent(&event);
    double ycomp = event.acceleration.y;
    if(ycomp <= -10)
      ycomp = -10;
    if(ycomp >= 10)
      ycomp = 10;
      
    myservo.write(180-(ycomp+10)*9);
}

The sub enters the still traveling loop, and this is where the ballasts get moved during the different stages of movement. The first stage it enters is the drop stage. During this stage the ballasts are pulled in using our stepper motor. The second stage is the stopANDtake stage during this stage the of the motion the ballasts stop pulling and the glider is allowed to sink a bit. This will also be the stage in the next generation of the sub when the test tube will take in samples. Lastly we have a rise function. This turns the direction of the stepper motor around so that it pushes the ballasts and the water back out. This allows the sub to be more buoyant and will float back to the surface. The finish command just shuts the motors off, and allows for the safe retrieval of the craft.

Step 10: Wings/Stabilizers

To add to the "cool factor" of the glider, as well as to the function of stability, we added laser-cut, acrylic wings to the sides and top of the glider. These would assist the accelerometer in keeping the glider upright and level as it moved through the water.

Step 11: Minor Tweaks to Finished Device

With the glider complete, there were some unforeseen issues that needed addressing. One of which was the distribution of weight throughout the glider. Originally, we wanted it to dive front-first as the syringes sucked in water. The problem arouse in the fact that the glider itself was back-heavy due to the PVC portion and the battery being in the rear. To offset this problem and even out the weight distribution, we added weight to the front of the glider in the form of a 4" PVC joint filled with a calculated amount of metal.

The following videos display the working ballast system.