A common solution is to design for positive buoyancy, so the robot just slightly floats, then to use motors to apply constant downward thrust to dive. The advantage of this approach is in the case of catastrophic failure, the robot can be recovered because it will float to the surface. The disadvantage is that you need bigger batteries to provide this thrust, and more complex control logic for handling scenarios where the robot is not level.
I decided that I wanted to explore active buoyancy control. When you SCUBA dive, your air consumption is tied to the amount of work you do, and I wanted to have a robot that used minimal power to stay down a long time for monitoring, slow speed following, etc. I also wanted to think a little bit forward to scenarios where the robot could hand-off extra gear to a diver underwater (spare tanks, cameras, lights) and would have to compensate for unpredictable changes in buoyancy. This is what real submarines do, and many model submarine hobbyists have incorporated pumps and ballast tanks, so I know it's possible, at least at hobbyist depths.
Controlling Buoyancy
To control buoyancy, you either have to change the weight of your robot or change the amount of water you are displacing. Hot air balloons change weight by dropping sand bags, but that's a one-way street and only good for a bailout safeguard. I chose instead to use pumps and valves to move water into and out of an internal bladder.
Since water is very heavy, the pressure at 100ft is around 45PSI. That means to pump water out to ascend, the pumps would have to be able to pump more than 45PSI. It also means that when not pumping, the system would have to resist the difference in pressure between inside and outside. If it did not, water could flow through the pumps to equalize the pressure. To prevent this, powered check valves are needed to prevent undesired flow.
My solution
Hardware
I found some 12VDC 100PSI pumps that are designed for marine/RV water supply applications. They are self-priming and contain an internal check valve to prevent back flow. I used 2 pumps, each paired with a powered check valve that prevented forward flow.
Pumps and check valves |
Electronics
The pumps use a lot of power, so I needed to use something other than a transistor to switch them. I used MOSFETs before, but I read that relays are usually a better choice for motors because they isolate the switching electronics from the load, and I wanted the option to have separate battery packs. Since relays draw some power, I learned that you need a diode in place to protect the switching transistor from frying due to the flyback effect when you cut power.
2 relay independent circuits |
Sensor
To know where you are in the water, you need a pressure sensor, I selected a sensor that works in the desired pressure range and verified (on my scope using a test rig) that it reads 0.5V for every bar of pressure (14.7PSI).
Pressure sensor and test rig |
Control Logic
The robot will either want to go down or up at a desired speed (or stay put). So, it seemed logical to use a two-stage PID loop. The first stage will translate the pressure into a desired velocity (change in pressure) clamped to a narrow range, like +/- 1 meter/second. The second stage will pump in or out to try to maintain that velocity. The advantage of this approach is that the robot does not make drastic moves, but rather takes its time reaching its target.
To tune the control loop, I wrote a simulator that incorporated the drag of sea water on the test housing I was using. I then did a parameter sweep to find suitable parameters for the control loop that gave good convergence.
Housing for testing
To test all this, I needed a housing that could withstand the pressures involved. I learned just enough about CNC machining to make a collar out of PVC and a bulkhead out of acrylic. I hoped that a 6 inch PVC pipe, rated to 150PSI internal pressure, could withstand 45PSI external pressure to get past testing. The bulkhead design relies on an o-ring of the right hardness and two smooth surfaces. If done correctly, the pressure simply compressed the o-ring and makes the seal better.
Bulkhead |
Collar and clamps on PVC pipe |
I decided on using a single port for the water supply, which required me to carefully alternate pressure readings and active pumping. I also wanted to be able to manually control the robot while testing, so I added a piezo button (that I knew worked at depth) and some logic to count series of button presses. To make sure the button press could be detected reliably, I used a 555 timer chip to make the output always at least 100ms.
555 timer circuit, button (not connected) |
Testing
The electronics all worked as designed, which was a relief. The pumps were able to pump a lot of water into a sealed container and prevented it flowing out when the power was cut. When the pump direction was reversed, the water came out in a surge due to the pressure, but I should be able to finesse this asymmetry with some control logic heuristics.
The housing did not work well enough to use. This was the first of several indications on this project that I will eventually have to "up my game" in the mechanical engineering arena.
Learning from failure
On my first test, I could see water flowing through PVC threaded connections that were teflon taped just like a plumber would do. I glued them in, which resolve that issue.
The second test went much better. I took the housing to 120ft (60PSI) and looking through the acrylic lid I saw no leaks. However, between the time I stopped looking and when I retrieved it on the surface, about a cup of water had made it into the housing. I have no idea where the water got in.
At this point, I figured I could live with a small amount of water if I protected the electronics by placing them all in a dry bag inside the housing. But after all was said and done, the 6 inch diameter was not enough to allow me to route the tubes and have a way to fit everything inside.
Future direction
I still want to test it. My options are:
- Do a tethered test, where only the pressure sensor is inside the housing and the rest is on the surface in a boat,
- Relocate the water port to the acrylic bulkhead, or
- Build a custom housing that is designed to accommodate my test board
The tethered test is tempting, but it would be a complete throwaway in that I wouldn't learn anything for building an untethered robot.
I've already learned that you can't glue anything to acrylic but acrylic, so I'd have to tap threads into a hole and hope it doesn't leak - not a good bet. There does not seem to be any sort of acrylic hose barb I can use - it's just too brittle for that application.
Since I have to eventually build the final housing, I might as well tackle CNC machining and get good enough at it to make things work. That sounds the most interesting, so that's what I'll do next.
Why not try 3D printing, you ask? So far, most consumer-grade 3D printers do not produce materials that are strong enough. The layers tend to delaminate under stress. Solid plastics, interlocking layers, and special glues that fuse the layers are more robust.
Why not try 3D printing, you ask? So far, most consumer-grade 3D printers do not produce materials that are strong enough. The layers tend to delaminate under stress. Solid plastics, interlocking layers, and special glues that fuse the layers are more robust.
No comments:
Post a Comment