The Marvelous Month of May

The Beginning Begins

We met the MnT Adviser Tony and the MnT Overlord Prof Ho at SPMS for the first time to discuss our project. We had decided as a group that the project would be to build a  mobile, waterproof drone of some type that surveys underwater environments using cameras that both record footage and can relay live-feed video.

An early sketch of the different mobility types done digitally (16th May)

The Only Constant is Change

We had a few options for the mobility aspect of the drone and decided we’d first try the water pump option, in which the plan was to utilize water pumps for thrust creation.

Our first water pump sketch, meant to be an oversimplified plan of how mobility powered by a single water pump would look like  (21st May)

The initial plan was to use a large, central water pump that expelled water through valves, and through controlling the opening and closing of the valves with independent servo motors, we’d be able to control the movement of the drone.

However, we realized that inclusion of the valves would cause a lot of complications to do with water proofing and design of the drone. Thus we concluded that a better method was to use several small water pumps fixed in different directions (thus creating independently-controlled thrusts in different directions) instead of a central water pump.

We began purchasing of some parts that we knew we definitely needed even if the design changed, such as a small router ($186.90), LAN cable ($19.99), 4k Cameras (~$356.87), the switch for the submarine unit ($66.90) and the 2000 mAH lithium batteries ($136).


The Jazzy Month of June: Part One

Letting Everyone (aka the 50 people in MnT) Know

We used the sketches below for the first progress meeting on the 6th of June, separating the drone into two components, one being the M component that holds the water pumps in a frame, and the X component that contains every other critical part of the drone, such as the cameras and battery.

6/6: Sketch of M and X component

Another sketch we presented was the diagram showing how the connectivity for remote control works. There is the submarine unit (the actual drone), the floating unit, and the base station.

6/6: Sketch of the connectivity method

During the time between the first and second progress meeting (10th to 18th June), we began testing the parts that had been delivered.

The Routers

We knew that an important aspect was the router connectivity range, that would determine how far the drone can be from the base point without being out of range.

On the Left: the main router that would be situated at base station (TP Link C4000 WiFi Router);

On the Right: the smaller router that would be in the floating unit (TP Link AC750 WiFi Range Extender)

The testing revealed the range to be about 100m, meaning that the floating unit can only be at most 100m from the base station.

The Cameras

We bought two Armcrest 1080p HDCVI Standalone Dome Cameras with specifications of full 1080P definition and a 90° viewing angle, as well as the capability to be powered over Ethernet (POE). We disassembled the body of the camera to obtain the lens and important hardware, then tested the cameras using the compatible Armcrest Surveillance Pro App. We had to determine the placement of the cameras, as we had two to increase the field of vision available.

Test 1: Placing the cameras one on top of the other
Test 2: Placing the cameras side by side

Realizing the view obtained in Test 1 did not fully utilize the cameras well, we determined that the side-by-side configuration was the best since it enabled 180° horizontal view and 90° vertical view, which was more than enough. This was contrary to our initial plan of having the cameras one atop the other.

 

Test 3: Trying out the Night Vision function

The cameras came with the features of 98ft night vision and 20 built-in Infra-red LED bulbs and the view it gives is seen in the pictures from Test 3.

Test 4: Testing the camera with a dome glass cover (left picture) and a flat acrylic cover (right picture)

From Test 4, we had determined that the cameras gave a clearer picture with a dome-shaped cover due to its lens being concave. Therefore, we needed to buy clear dome covers for the two cameras and thus  immediately ordered them online.

One last test revealed that there was latency in the video feed and we decided to open a substream and a mainstream. The substream, which would have lower resolution, would be used as live-feed for the user of the drone to navigate in real time. The mainstream, with higher resolution, would be used as recorded footage, allowing the user to have clearer video to store and use for later.

Downtime
Having lunch with the Concentric (13th June)
Looking through our deliveries (16th June)
Having fun with the cameras that just arrived (14th June). Our group member, Tiffany, in the spirit of science, tests out the cameras using her own face.
Big Alterations

We were at a point where we realized there were a few issues with our decision to use small water pumps. Firstly, when we tested pumps already in MnT lab, we found that there was a short initial burst of water that could affect our ability to control the drone with precision. Secondly, the pumps may not generate enough thrusts, especially when considering the currents and undertow the drone may experience while off the coasts. The FATJAY propellers could produce 2.4kg thrusts, which was more than enough to move our drone through rough waters. Therefore, we backtracked and chose to use propellers as our primary thrust-sources, with advise from Tony.

This is not to say that the water pumps were now obsolete, but instead we would be using both propeller and pumps to create thrusts, only the pumps would be used to aid the propeller and not direct the drone. Thankfully, we had already ordered the propellers as a plan B, so we did to have to wait to begin coding. but now we were going to use them for our first prototype


The Jarring Month of June: Part Two

Coding and Computers: Oh My
Struggling to understand (24th June)

Having received the Arduino Ethernet, MOSFET 4 Channel and MOSFET board and Raspberry Pi, we realized with great despair that now we had to figure out the coding involved in our SNEK drone. We research online for help with the coding in Arduino.

Activating Thrusters

We were also starting tests with the propellers we had delivered. The propellers were FATJAY IPX8, coming with its own motor and weighing 60g, providing 2.4kg thrust.

Fixing up the FATJAY propellers and connecting it to the battery and Arduino Micro-controller (24th June)

We hooked up the motor to the power source available (at 12V and 0.3A) in the lab and made sure it could work. When we tried some starting code from a website to figure out what are the basics that we needed to control the motor, the motor did not work. We edited an initializing sequence for the motor but the propeller continued to only beep and remain motionless.

With some help from our Adviser and a lot of wire swapping later, we were finally able to write code that could properly initialize a single motor and allow it to run and switch off.

We also tried the newly-arrived JT-500 submersible water pumps and played around with the voltage up to 12V (while at 3A). The specifications stated that a 12V battery could be used to power the propeller and it had a 5-meter water head, however, it did not explicitly state the total amount of force it produced. Testing it in a water tank revealed that it was powerful enough to propel our drone.

Testing the water pump in a small tank, hooked up to the Tenma power source (24th June)
Getting Framed

We needed a frame to carry on once the coding was finished and in the previous week, we had already compiled all the general dimensions of every part we needed. We estimated we would need a cube-shaped frame of at least 25 cm by 25 cm by 35 cm. In order to leave some room for mistakes, We used available aluminium profiles from the MnT lab and cut 4 x 40 cm and 8 x 35 cm pieces. Renee commented that sawing through metal was fun.

Cutting the aluminium profiles under the watchful eye of Tony, our MnT Saviour (24th June)

 

Getting Pumped 
Jamming wires together and hoping for the best in our pursuit of MOSFET success (25th June)

We whipped out the MOSFET 4 to the Arduino, which will control the water pumps through a relay system, and researched how to begin connecting up the necessary wires and writing code for Arduino.

We ended up writing code from scratch in order to control two water pumps independently, making individual commands for on and off for each pump. Then we moved on to connecting two MOSFET boards in parallel to control all 6 water pumps and it was successful. At 6V the current was 1.06A.

Tiffany testing the code for all 6 water pumps on her computer (27th June)
The MOSFET boards and Arduino wiring used for 6 pumps (27th June)
Propellers are Problematic

Editing the code for coordination of the propellers did not go well, with non-independent movement and unpredictable speeds being the main issues we faced.


The Jesting Month of July: Part One

Propellers Getting on our Nerves
Jaslyn coding with a big smile on her face to hide the pain (1st July)

We spent the morning of 1st July painfully editing the code for the motors to work in unison. Finally, we were able to get them to be synchronized in turning on and off, and also in changing speed.

Further work after lunch resulted in us being able to control each motor independently in both turning on and off and altering speed. We used independent conditional statements using “if” for each motor.

Victory Lunch
We all had Chicken Rice at Koufu (1st July)
The Batteries are FAKE???!!!
Tony (initially refusing to pose for us and only doing so with some persuasion) holding the fake batteries and laughing at our misfortune (1st July)

Unwrapping the packaging of the batteries revealed that the batteries we had bought a week ago were fake. We were, obviously, devastated. We experienced the five stages of grief in the span of 5 minutes, and then in stage 5: acceptance, decided to just buy new batteries. Monday really sucked for us.

We also planned to buy the Lock&Lock boxes for the modules so we could begin on finalizing specifications for the drone body as soon as possible. The silicon had yet to be delivered at this point.

Coding Intensifies

As we soon found out, using the same code to control the propellers over Ethernet was not going to work. After the 2nd July progress meeting, we tried several variations of the code with additions that was supposed to allow for us to control the motors in a specific server. Editing still continues.

Connecting the motors and Arduino Mega to the Ethernet cable (2nd July)
Honing our Hardware

Resizing the frame by dissembling, cutting, and reassembling was done as the original dimensions were too large for the containment of the essential parts. The frame was now made up of 8 0.35m aluminium pieces and 4 0.25m pieces. Items such as Lock&Lock boxes for modules, as well as mesh for the frame were already bought and all that was left was to wait for the heavy duty cable ties to arrive.

The newly assembled frame with an added pillar on top for the mounting of upward-facing propellers (4th July)
Revenge of the Lithium Batts

On the 6th of July, the new lithium batteries arrived in the mail. Hooray.

The two new 5200 mAH lithium batteries to replace the fake battery we received (8th July)

We hooked up the lithium batteries to the DC-DC converter to try an see if we can step up the voltage to about 18V, and we were relieved to find it could. We hotglued the specific knob placement for the converter so that movement and jostling would not affect the pre-arranged settings.

Coding Completion

On the 8th of July, writing code for controlling 6 water pumps and 6 propeller motors was finished. The water pumps could be turned on and off, while the motors could be controlled to low, medium, high or very high speed and be turned off. We created an interface on the server of the POE switch that displayed all the buttons for each pump and motor, allowing for ease of controlling the mobility.

The finished code, as well as a preview of the server layout, can be found under the blog page “Codes and Stuff”.

There’s no place like Dome.

A setback we met with was that the acrylic domes we had ordered were too small to encase the entirety of the 4k camera body, specifically due to the height of the domes being too short.

The first method we tried to rectify the problem was to purchase acrylic and, with Tony’s help, use a heat gun to warm up the acrylic and bend it into shape. Shoutout to Tony, who tried his best to bend the flat, 3mm A5 sheet of acrylic into a shape that could meet the dome over the camera body. Ultimately, it ended up misshapen and cracked, and we decided this method may not be appropriate. A moment of silence for all the lost skin cells that died from the extremely hot expelled air.

The results of the first method (8th July)

The second we tried was to dismantle the camera and remove the original bracket that held the lens of the camera 5 cm off the circuitry. Realizing that the decrease in height could allow the camera to be encased in the dome, we used a hot glue gun to seal the lens component firmly to the metal ring on top of the circuitry. Now we were able to use the acrylic domes to give the cameras a waterproof home.

Dismantling the 4k Security cameras (8th July)
The above shows the finished redone camera that allows for the dome to be used (8th July)
Initiating Assembly… Loading…

With all coding and interface simplification being done, it was finally time to arrange all the internal parts of the drone into the modules (aka the Lock&Lock boxes) and deal with every electrical engineers’ nightmare: cable management. Reassessment of the initial arrangement showed that it was inefficient since a complicated number of wires between modules were exchanged. Thus, we altered the arrangement of the modules, the smaller box containing the batteries , while the larger box contained the Arduino Mega/Ethernet, MOSFETs, electronic speed controllers, Ethernet Switch,  and DC DC converter.

To make sure we would be drilling the holes correctly we also drew out the various connections between modules as seen below.

The drawn out arrangement of module parts (9th July)

To ensure that the cables from the motor could reach the modules, we cable tied the four motors to approximately the locations where they were meant to be. We confirmed that the cables are more than long enough.

The propellers cable-tied to the frame in preparation for fitting of modules (9th July)

Its the Final Countdown, July: Part Two

Lights…Camera…Action???
Cutting the A5 acrylic sheets into smaller, more fitted pieces to be clamped with the dome (15th July)

The Ethernet cables, the missing pieces to complete our internal circuitry, finally arrived. This allowed us to begin the fitting of the A5 acrylic sheets to the acrylic domes, creating a casing for the bare cameras that we will later waterproof with silicon. First we had to cut the acrylic sheet with

Then we drilled holes into the acrylic sheet that matched the holes found in the dome.

A picture showing the dome and its pre-drilled holes (15th July)

The screws were first put in place through the newly-drilled holes and the camera secured to the acrylic plate with LAN cable attached using a bit of silicone. Then with marine-grade silicone expelled with the help of a tube compressor, we laid a generous amount of silicone on the acrylic following the screws and finally firmly pressed the dome in place.

The compressor gun being used (15th July)
The waterproofed domes with silicone deliberately applied. The wax paper on top is there to prevent any other lab-goers from scratching the acrylic dome (15th July)

The silicone took 12 hours at least to cure and after that, we tightened in the corresponding nuts to the bare screws. Testing of the cameras in water showed that the cameras had leaks! though they were exceedingly small and only drops got through, we grudgingly redid the waterproofing, which involved slowly scraping the silicone and then scraping it off the acrylic. The silicone was meant to be a permanent seal and this took a long time to do.

In the second waterproofing, we took care to apply silicone to the inner side of the screws and also apply a second ring of silicon outside. Nitrogen was introduced into the dome before we pressed it into place, in order to reduce as much of the water vapor in the camera casing as we could. We also held down the domes after sandwiching the cameras so that the silicone would cure in place.

Pressing down on the dome that was just fitted on (17th July)

You can see from the picture above that the amount of silicone we used was much more, in order to ensure full sealing.

Testing the camera’s shell in a tank of water to check if it is waterproof (18th July)

18 hours later, we tested the newly waterproofed cameras by pushing it down into a tank of water. The inside remained dry so we went about drilling the acrylic base of the camera. The holes were to allow the cameras to be cable tied to the mesh of the frame.

Hole lotta Holes
The 20mm diameter cable glands we used (16th July)

The modules had to have holes due to the different wires going through each part. Therefore, Tony had suggested we use cable glands to ensure that waterproofing was more secure. Cable glands could be secured to the box to allow for a larger surface area to apply the silicone, ensuring that the waterproofing would be effective. We drilled holes in the locations we marked out and then painstakingly filed the hole till it reached a size that allowed for the gland to fit in snugly. Four holes were made in the larger box for four different types of wires: the motor wires, pump wires, wires connecting to the battery, and LAN cables. The smaller box that only contains the batteries had just one hole for the battery output wires to go through.

The filed hole done in the sides of the smaller box (16th July)
The glands fitted to the boxes (16th July)

We did a full systems test with a power source after this, connecting all the circuit boards and uploading the Arduino code. There was a slight hiccup, as two of the six pumps were not responding. The pumps were connected to two different MOSFET boards and we quickly realized that the two pumps with issues were connected to the same board by themselves. We theorized that the MOSFET board must have short-circuited somehow, perhaps due to wrong wire connections, and we replaced the board entirely with a spare MOSFET board we bought earlier. After this, the whole system was running smoothly and every motor and pump could be controlled by the computer.

Arriving early the next day, we filled the cable glands with silicone. First, the glands had silicone applied through the inside of the box. We lifted up the wires, applied a liberal amount, set down the wires, and then filled up the rest of the gland. The same routine was done to the other side of the gland (through the outside of the box), and we left it undisturbed for 22 hours.

The glands filled with silicone (17th July)
Testing how waterproof the boxes are by submerging them underwater (18th July)

On the same day we tested the re-waterproofed camera cases, we also tested the freshly cured boxes by holding it underwater for some time and then checking the indie for any proof of leakage. The two boxes had no leakage and we decided to begin the attachment of the different modules to the frame.

Checking the Scales

The cameras with casing and silicone were approximately 550g each.

The frame, including mesh, with motors and pumps was 3500g.

Each compartment was 1170g even though the compartments held different objects.

The total weight is 7039g. All measurements were taken using electronic weighing balance.

Prototype Assembling
The arranged parts placed in their respective boxes (16th July)

We started trying to arrange the parts into the modules, especially for the larger module, since 8th July and finally decided on lying the switch on its side, fixing down the MOSFET and DC-DC converter to the box bottom, and allowing the Arduino Mega to be freely placed in the box. To prevent heat damage to the Arduino bottom, we 3D printed a case for it, as seen by the pink underlying piece in the photo below.

The 3D printed case for the Arduino Mega (16th July)

To allow to easier cable management, we soldered together the battery input wires of the DC-DC converter, the MOSFET, and the ESCs, and then placed a heat-shrink rubber over to insulate the exposed wires. Now the battery only needs to be connected to two wires instead of 8.

The soldered battery input wires (16th July)

We also arranged the connections of the ground wires such that all of the required ground for six pumps and propellers led to one wire, reducing the number of wires needed.

The insulated and connected ground wires (15th July)

The frame had mesh cable tied to five sides, excluding the top.

Planning of the placements of the pumps, placements of the propellers had been previously done (16th July)
The First Pool Test!

We worked together to hold the drone parts and set them carefully onto the frame. The boxes went in first, and then the motors and pumps were cable tied securely onto frame. The propellers had come with brackets that had holes big enough for the small cable ties we bought to fit through, and we used two of the 25mm ties to attach each propeller to the aluminium profile. The pumps were placed inside the frame at the base, and one large cable tie was used to secure the pump body to the mesh. The pumps were placed such that the output valves were slotted through the mesh. The two cameras were tied to the front of the frame. The completed drone is shown below.

Drone front view (18th July)
Drone back view (18th July)
Drone right side view (18th July)
Drone left side view (18th July)
Drone top view (18th July)

A dry test to confirm that the drone’s circuitry and coding were working was done in the lab. We tested the two camera’s feed then the propeller and pump coordination.

It was finally time for the wet test, and we set out to the NTU diving pool at the Sports Recreation Centre at 1.30pm with the drone and necessary equipment. We had previously contacted the in-charge of the pools, and they had confirmed we could use the diving pool from 1 to 5pm. The mini router and POE adapter was taped with waterproof tape onto the pontoon that we borrowed from the swimming pool staff, making the floating unit.

The mini router taped onto the pontoon (18th July)

Then we tied down the boxes to the bottom mesh with cable ties to prevent the boxes from floating out of the frame. Kiat Boon and Renee came in swimming gear to support the drone in water and catching it if it floats, sinks, runs away. Jaslyn controlled the propeller and pumps, and took charge of the cameras’ feeds and footage recording. Tiffany stayed with Jaslyn to aid with circuitry fixing, module arrangement, and tying of the boxes to the mesh.

We first put the drone into the water to observe its floating properties. As we had predicted, a problem with the drone is that it tilts backwards, due to the two camera cases in front that contain the most air, and it does not completely submerge, due to the combined air in the boxes and camera cases. The two back propellers and all the water pumps were submerged.

Then we tried to turn on the back propellers to see if it could move the whole drone through water. The first three tries could not work. Bringing the drone to land, waiting a while, and unplugging and plugging the battery to the circuitry, made the drone work again. However, leaving the drone on without turning on the propeller straight away resulted in the propellers being unable to work. The problem did not lie with the Ethernet and wireless connection, as the camera feeds had no problem working. We theorized that not using the web server immediately after turning on the drone resulted in the system turning idle somehow. The fourth test worked and the drone could move around the pool using the thrust created by the back propellers alone.

We caught the drone and Kiat Boon and Renee submerged it to try out the top propellers. Even with both top propellers at the highest speed, the force they created was weaker than the drone’s buoyancy.

The pumps were not as strong as the propellers but could still move the drone slowly.

The Second and Third Pool Test!

The drone was too buoyant so the subsequent tests were used to determine what kinds of weights and in what amount would be optimal. In the second test, we tried small weights such as coins and marbles in bags. They were not heavy enough to change the buoyancy of the drone noticeably, and soon after the lithium batteries run out of power. An interesting thing to note is that upon checking the voltage of the lithium batteries, half of the power was still left, and yet the drone could not work. The prevailing theory is that the voltage produced by the batteries at half power was not enough to power the drone.

After the batteries were charged in the lab, in the next week (after CN Yang Freshmen Orientation which three of the four of us were involved in) we tried fishing weights, which were much heavier and denser. It was able to easily balance out the drone so that it was no longer tilted upwards. However, the drone still had a significant portion above the water and it was too buoyant to be propelled downwards by the top motors.

The Final Pool Test!!!

We arrived fresh and early on the morning of the 26th of July at the diving pool with more fishing weights and the drone to test. We attached the fishing weights not only to the front as we had done before, but also to the back, allowing the drone to reduce in buoyancy. We had big weights (544g) and small weights (351g), and in total added 2.4kg to the drone in weights. The front had two big and three small weights attached, while the back had just one small weight attached.

An underwater view of the back of the SNEK drone (26th July)
An underwater view of the front of the SNEK drone (26th July)

Success! With some manipulation of the modules the drone could be submerged sufficiently while still being less dense than water, and the drone could move down through control of the motor. We spent some time testing out the propellers, motors and cameras, taking lots of footage and recording our final product’s successes.

The drone’s movement could be fully controlled through the web server on the computer or phone. It could move relatively fast around the pool with tight turns. It is also able to move downwards with help of the motors.

The cameras were able to record clear footage and its live feed had very minimal lag time of about a second.