E101 Final Project - Underwater RC Cube

Evan Blanke, Drason Chow, Manvi Saxena

Step 1: Print Parts

Using an MakerBot 2+ 3D printer, print 3 copies of the file titled "motor to prop" and 2 copies of "submarine body". They should be printed at 100% size, with all the default settings (20% infill, generated supports).

Once printed, carefully remove the supports. Needle-nose pliers will be helpful.

Step 2: Preparing Circuitry

  • Gather the following materials:
  • 3 NPN Transistors
    • Allow the NodeMCU to control the motors with a 9V battery.
  • 3 Diodes
    • Prevent the motors from pushing current back into the board during normal operation.
  • 3 Yeeco 3V - 6V DC Motors (1:48 Gear Ratio)
  • 9V Battery
  • 3 Potentiometers
    • For controlling your motors
  • 1 Analog Multiplexer (or Switch)
    • Since the NodeMCU only has one analog pin, you must use a multiplexer or switch chip so that you can read multiple inputs from a single pin. The switch/multiplexer acts like a router and allows you to cycle through reading certain sensors connected to it.

Use the attached diagram to prepare the circuit. If you’re unfamiliar with electrical diagrams, the following reference may help you understand the symbols more: https://learn.parallax.com/support/reference/schematic-symbols

Step 3: Setting Up the Code

Before getting started, make sure you have a computer with a Serial/USB capability. You'll need a cable that goes to Micro USB.

Environment setup:

1. Python 3

Python 3 is needed to compile code onto the NodeMCU. You can find it here. Download the latest version.

2. Ampy

Ampy is a python deployment tool created by Adafruit Industries, an electronics supplier. It works especially well with the NodeMCU, which is another one of their products. You can find instructions on how to install it here.

3. REPL (Windows users only)

A REPL (read–eval–print loop), is a program that can see output and give input to your NodeMCU in the form of text. Your NodeMCU will be picky about running programs while one is not running. Macs come preinstalled with the REPL “screen” and Linux users can use “picocom” and “minicom”. Windows, unfortunately, does not come in with a preinstalled REPL and you will need to download and install a 3rd party one.

Teraterm is recommended by MicroPython on Windows (a library for microcontrollers like the NodeMCU). Remember to edit the baud rate in Setup >Serial Port on Teraterm to 115200 or else you will not be able to properly view or send messages.

For this project, you will also need some sort of text editor that supports Python to edit code. Visual Studio Code is recommended to those who have not had prior experience.

If you haven’t already, you must also “flash” your NodeMCU. “Flashing” sets the NodeMCU to a state where you can deploy code onto it and it will run the deployed code. This is done through ampy. A detailed tutorial can be found the Micropython documentation.

To deploy code, use the following command:

ampy -p PORT -b 115200 put CODE_LOCATION

To find the port on Mac use:

ls /dev/tty.*

and look for one that says something like /dev/tty.slab_usbtouart.

To find the port on Linux use:

First install lsinput then run,

lsinput

To find the port on Windows:

First install USBView and use it to view all your USB Devices.

Optionally you can guess and check COM[Number] starting at 0 until you guess the correct one.

A sample version of the code can be found in the link below.

Sample Code: https://github.iu.edu/emchow/Watercraft_E101_Fina...

Step 4: Fabricating Electronics

To construct the controlling drive part of this project such as the tether cord and motor cluster you will need several things.

  • Wire strippers
  • Solder and Soldering Iron
  • 1 Ethernet Cord
  • Three 3-6V Motors
  • Male to Male jumpers

1. Start by removing several inches of the Ethernet shielding on either end of the cable and strip the 8 wires on either end inside of it.

2. Solder a pair of two wires from the bundle to one of the 6 motors. Repeat this with the other two motors. There will be two spare wires that go unused but are for further implementation of some sort of digital sensor.

3. Cut 4 Male to Male jumper wires in half and strip their ends so that they can be used to attach the tether to a breadboard. This cluster can now be used to plug in the motors and control them from the control circuit. After waterproofing it will be an essential component to making sure that all of the electronics work properly when submerged.

Step 5: Waterproofing Electronics

In order to waterproof all of the electronics we will need a few things.

  • Electrical Tape
  • Sugru (Moldable plastic)
  • Hot Glue Gun and Hot glue
  • Vasoline (petroleum jelly)

1. To begin waterproofing the motors detach the clear plastic retainer piece and remove the small motor from its gearbox.

2. Open up the gearbox and coat the inside with vaseline to displace water incase any water makes it in.

3. Mold a circular piece of sugru to go around the drive shaft and reinsert the motor into the gearbox with this piece. Completely surround the motor with sugru to ensure that there are not any holes for water to leak through into the motor.

4. Fill open areas with hot glue and place a bead of hot glue on the seam around the outside of the motor enclosure. This just helps to ensure that no amount of water makes it into the motor housing and causes our electronics to short circuit.

5. Electrical tape around the motor housing and the gearbox to fill in any leaks and to hold everything together while the sugru dries. Make sure that the solder points are sufficiently covered and then wrap the wire in electrical tape up to the ethernet cord. After completing this step with all 3 motors place a strip of sugru around the end of the ethernet cord sheath to minimize any impact of water.

We will have to wait to install the motors until the sugru is completely hardened after 24 hours.

Step 6: Final Assembly

For this step, you will need hot glue and electrical tape.

1. Attaching propellers: hot glue one 'motor to propeller' piece to one axel. Hot glue a propeller to the other end of the 'motor to propeller' piece. Repeat for all three motors.

2. Take one motor and position it so that the 'motor to propeller' piece fits through hole at the center of one of the faces of the 'submarine body' print. The motor should be on the inside of the cube and the propeller on the outside. Use the electrical tape to tape the motor to one of the crossbeams to hold it in place. Make sure the 'motor to propeller' piece is free to move and not taped. Repeat for all three motors, in the configuration shown in the image.

3. Hot glue the second 'submarine body' print on top of the first one. The ethernet cable should trail out of the cube, and can emerge from any side. It should now resemble the image of the completed project.

Step 7: Running It

Plug the motors in as shown in the electronics schematic from step 2.

Open and run the program from step 3.

Turn on the NodeMCU.

Test by placing the cube in a medium-large container of water (make sure the breadboards and all electronics are away from water to avoid damage). Turn each potentiometer individually to test the propellers. Combine different values on the potentiometers to experiment with how the cube moves in water.

Thank you for reading this instructable!

Share

    Recommendations

    • Faux-Real Contest

      Faux-Real Contest
    • Epilog X Contest

      Epilog X Contest
    • Remix Contest

      Remix Contest

    Discussions