Skip to content

FINAL PROJECT

For two weeks, me and Fatima worked on our final project. At first, we thought about making a simple drone but due to lack of some special light motors, we had to decide on something else. I proposed a second idea which was to make an underwater drone that supports camera and specialized sensors to measure pollution. Unfortunately, we dismissed the idea due to having limited time and decided to make a simple boat that can be controlled with a smartphone.

Research

We started by watching videos and searching online for similar projects. Also we decided to search about the materials and components involved along with their costs. We also searched about the theoretical concepts related to boats.

Materials and Components

The table below shows the materials and components used and their costs along with their components:

Qty Description Price Link Notes
1 Adafruit Feather $37.50 https://www.adafruit.com/product/4516
1 9 Volt battery $6.19 http://amazon.com/test
2 Motors $5.51 http://amazon.com/test
2 DC motors $4.50 http://amazon.com/test
1 L298N Motor Driver $11.49 http://amazon.com/test
1 Breadboard $5.99 http://amazon.com/test
20 Jumpers $3.40 http://amazon.com/test
1 WaterProof Tape $3.00 http://amazon.com/test
1 Foamboard

The components were not hard to find and most of them were available at the lab.

Theory and Calculations

The minimum volume required to keep the boat afloat is given by:

V = m/(Dw - Db)

We decided to use Foamboard to make the body for the boat which has a density of 48kg/m^3. We chose the maximum mass to be 2kg and performed the calculations to get the minimum volume:

V = 0.002m^3

Motion

According to Newton’s third law, every action has an equal reaction in the opposite direction. This means that the motors should rotate in a way that exerts a force opposite to the direction of motion because the water will exert an equal and opposite force on the boat.

For a boat that has two motors, both of them must rotate in a direction that produces forward and reverse motion. To move left or right, only one of them has to work.

To produce forward motion, the motor on the left should rotate anti-clockwise while the one on the right clockwise. The opposite needs to happen for reverse motion.

To move right, the left motor needs to rotate anti-clockwise to produce a torque that steers the boat to the right. To move left, the right motor needs to rotate clockwise to steer the boat to the left.

The image below shows the directions of rotations and their correspondence to the linear motion of the boat.

Circuit And Coding

We decided to start with the circuit and coding because this step will have a huge impact on the final design.

I started by testing the rotation direction for motors. the motor driver allows us to control the direction of rotation for both motors. The image below shows the pins on the L298N motor driver:

The rotational direction of motors is controlled by the 4 IN pins. IN 1 and 2 control the first motor while the other two pins control the second motor.

I assembled the circuit in Tinker CAD first as shown below:

Then, I started writing the code. I tested the rotation directions of motors and wrote the configurations of pins that produce forward, left, right, and reverse motion depending on the coupled directions of rotations which are related to the states of pins.

Next, I started setting up the code that will allow us to control the boat using my android phone. From Examples, I chose the controller example code:

In order to link the phone to the adafruit board, we needed to download the Bluefruit app. I then uploaded the controller code to my board and then opened the app. From the app I connected to the Adafruit board and chose Controller then Control Pad.

after establishing the bluetooth connection, The serial monitor displayed the number of each button when pressed. the numbers 5,8,7, and 6 are associated with buttons up, right, left, and down respectively therefore I had to modify the code so that pressing each button would turn on specific configurations of motor rotations associated with each direction. Therefore, To achieve this, I used if statements to link each button to a certain configuration of pins in order to produce motion in the same direction as the arrow on the button.

After that, I uploaded the code into my Adafruit board and the coding process was finished

You can download the code from here

You can refer to my website to learn more about embedded programming and input/output devices

Design

After we were done with the coding and the circuit, we moved on to the design. we used Tinker CAD to make a 3D design for our boat. The video below shows the process:

After completing the 3D design and exporting it, we had to convert it to a 2D design to laser cut it with the laser cutting machine. We uploaded the 3D file in a website called papermaker and it automatically converted the 3D design to a 2D design that can be cut using the laser cutting machine.

The 2D design consists of two parts, the body and the top cover. We exported an svg file of the 2D design, converted it to a dxf file and then started cutting it with laser.

You can download both the 3D design and the 2D design.

You can visit my website to learn more about laser cutting

We chose this 3D design specifically because it allowed us to achieve maximum floating for the weight that we needed to load on the boat.

For the 2D design, we chose it because it was the easiest to assemble into a 3D form and waterproof.

Also, we decided on these dimensions because we didn’t want the boat to become too long or too wide. Also, we wanted to keep the volume in range to avoid any problems with floating.

Assembling

After being done with coding and design, we started assembling the parts. First, we shaped our laser cut design into it’s 3D form.

Then, we used a glue gun to stick the parts together and form what is shown below:

We also used the glue gun to make our boat WaterProof. In addition, we covered the body with a sheet of sticker to further keep the inside dry from water.

Next, we started assembling the circuit inside the boat. We started with the motors and then the connections and supply. To fix the motors, we made two holes in the design for the shafts and then covered the holes with glue from inside and out before fixing the fans.

After that, we tested the boat.

Finally, I attached the top cover, glued the edges to waterproof the boat and decorated it with two shapes that I manually cut from the left over board. I also cut some stickers and attached them to the cover. I also made a rectangular lid in the cover.

The video below shows the testing process and the final design:

For decoration, I used the extra remaining unused parts that I laser cut weeks ago during the laser cutting week and glued them to the body as shown below:

You can check my website to follow the cutting process of these pieces.

We had to change the design and use laser cutted pieces instead. We decided to choose a 2D dragon figurehead for the front and a 2D star for the back. Also, to honor the program, we cut letter stickers to form the name of the program “FABLAB” and placed them on the top cover. In addition, we changed the top cover from orange to blue as shown below.


Last update: June 17, 2022