Introduction: TrojanBOT

This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com).

Step 1: Before You Start, You Will Need:

Step 2: 3D Parts

ALL PARTS ARE ATTACHED AS SOLIDWORKS PART FILES 2017. In this First part we have a modified box where all of our electronic components will be held. The dimensions of these parts are crucial with little room for tolerance. The dimensions are 190 mm X 125 mm. The box is 60 mm tall. The box also has a wall thickness of 3 mm. There are four pegs on the box where the lid will attach to. CAREFUL, the pegs can be easily broken, don't force the lid on the pegs.

The Conveyor Belt is the trickiest part in this project, is has dimensions of 91 mm length X 81 mm wide and a height of 46 mm.

The rollers are specified to this conveyor base, you will need two. You will also need two shafts. The next step will show you the build process.

Step 3: Assembly of the Conveyor: What You Will Need

(Everything you will need here is in the hardware section of 'Before You Start, You Will Need' step)

-4x skateboard bearings

-1x Conveyor base part

-2x 8 mm shafts

-2x Rollers

-Gorilla tape

-Loctite or Super Duper Glue

-Friction tape

-Scissors

-small allen key

Step 4: Assembly of the Conveyor Belt, Rollers

The order of what you do in this step doesn't matter.

First, take the Friction tape and roll it around the roller. (This will allow for friction between roller and belt)

Then, take a shaft and insert it into the roller and secure it with some adhesive (super glue or Loctite)

Step 5: Prepare Your Bearings

In this step you will need your 4 bearings, gorilla tape, your prepped rollers, your conveyor base and some scissors.

First, take a small piece of gorilla tape and cut it to the width of the bearing. Wrap it around your bearing and repeat that for the rest of the bearings

Next, Place slide one bearing on one side of each roller.

Then, slide your bearing + roller in one side of the of base conveyor.

Finally, slide your bearings through the holes of the other side of the base conveyor and onto the other side of the shaft

Step 6: Assembly of the Conveyor Belt: the Belt

-First, take about a 10'' piece of gorilla tape

-Second, fold one end over the other so that the 'sticky' ends touch.

-Third, cut this piece off and wrap around the rollers. (There will be some overlap which is fine).

-Fourth, make sure you find out where both ends meet and pinch where these meet, and cut the overlapping piece where you pinched at.

-Fifth, take a smaller piece of tape (1.5'' - 2.0'') long and cut it off.

-Sixth, Take that smaller piece of tape, and place half of it on one end of your belt. (The other 'sticky' half of the smaller piece of tape should be exposed)

-Seventh, wrap your belt around the rollers and secure the other 'sticky' end of the smaller piece of tape to the other end of your belt.

-Finally, test out your conveyor belt making sure it move. (You may need to repeat this whole process until you get it right, if the belt isn't moving repeat but trying to make the belt tighter).

Step 7: Assembly of the Wheels: Prep the DC Motor Casings

You will need a total of 3 DC motors

-First, solder the wires on the terminals of the DC motor

-Second, take the DC motors out of the casings and use a dremel to take out the clip to make a smooth surface

-Finally, dremel one shaft out to make a another smooth surface

-Repeat this process for 5 different motor casings (4 casings for the wheels and 1 casing for the DC motor driving the conveyor belt.

Step 8: Assembly of the Wheels: Mount the Motor Casings With the DC Motors Attached

In this step you will only be using 2 DC motors with their casings and 2 more modified casings

-First insert 2 DC motors in two casings

-Second, use your two part epoxy to cover the smooth surface on the casing and place them in the front two places with the DC motor wires exposed (2 casings and 2 motors)

-Third, mount the back two casings (these two casings will have no motors in them).

Step 9: Assembly of the Conveyor System With Motor

In this step, you will need an allen key, some tape, your conveyor belt, and a shaft coupler

-Start by tightening the shaft coupler bolts to the exposed end of the conveyor belt shaft

-Second, play the conveyor belt inside the box

-Third, slide the exposed shaft of the motor casing into the other end of the coupler (try to keep everything as straight as possible) and tighten the coupler bolts

-Finally, get creative with the taping, and tape the DC motor casing to the exterior of the box. Make sure it's secure but NOT TOO TIGHT! And don't cover the hole designated for the wiring.

Step 10: Block Diagram: a Precursor to the Electronics System

The motorshield will be stacked directly onto the Arduino. You will use male to female jumper wires to make direct connections to the stacked motorshield in three locations for your DC motors. There is a Vin port where you will make a direct connection to a 9 Volt battery. A breadboard will be used to connect the HC-05 bluetooth module to the stacked motorshield. And finally you will need a smartphone to download the Bluetooth Electronics application and modify the RC controller shell program to control the bot

Step 11: Assembly of the Electronic Components

For this assembly, you will need:

-Motorshield and Arduino

-Six male to female jumper wires with the male ends stripped

-HC-05 bluetooth module

-A mini breadboard

-Four additional male to female jumper wires

-9 Volt battery connector with the ends stripped off

-2 small wires

-Mini flat head

-First, Take two stripped M-F jumper wires and using a mini flathead screwdriver connect the exposed ends of the jumper wires into M1 onto the motorshield.

-Next, take the power connecting wires and connect them into Vin on the motorshield (POLARITY is IMPORTANT!!!)

-Finally, connect 2 stripped wires into M3 and two wires into M4 on the motorshield.

When it is said and done, you should have a system that looks like picture 4 in this step.

Step 12: Assembly of the Electronic Components Continued

You can now stack this motorshield directly onto the Arduino

-Next, connect your HC-05 to the breadboard

-Connect the 5 V on the HC-05 to the positive side of the breadboard and the GRND on the HC-05 to the negative side of the breadboard using your small wires.

-Connect the Positive rail of the breadboard to the 5 V on the motorshield, and the negative rail to the GND on the arduino using two unstripped M-F jumper wires

-Using the unstripped jumper wires, connect a male end to TX and another male to RX on the HC-05 and run the TX on the HC-05 to RX on the motorshield, and RX on the HC-05 to to TX on the motorshield.(These are designated as 0 and 1 digital pins on the motorshield

This is all the wiring needed for this project.

Step 13: Schematic

-Here you can see the Bluetooth module connected to the breadboard. It has 4 pins that we will use, TX, RX, Vcc, and GRND. Connect GRND and VCC to the negative and positive rails, respectively. Then use jumper wires to connect negative terminal to GRND on the shield and the positive rail to 5 V on the shield.

-TX from the HC-05 goes to RX on the motorshield, RX on the HC-05 goes to TX on the arduino (Confusing, I know).

-In the schematic it does not have the exact motorshield but you would connect the terminals of the DC motors to the M3, M4, and M1 on the shield.

-Finally, connect the 9V battery to the Vin terminals on the shield.

Step 14: Connecting Wires to the DC Motors

-First, run the M1 wires from the motorshield to the soldered DC terminals of the conveyor belt (VERY IMPORTANT)

-Second, run the wires from M4 on the motorshield to the DC motor terminals that is mounted on the left side of the bot. (VERY IMPORTANT THAT M4 WIRES CONNECT TO THE LEFT MOUNTED MOTOR)

-Third, run the M3 wires to the right mounted motor (VERY IMPORTANT THAT THE M3 WIRES CONNECT TO THE RIGHT MOUNTED MOTOR)

-Finally, mount the mini breadboard on the back of the the bot as shown.

Step 15: CODE!!!!

The Code is given on how I wired this.

Click HERE to download the required libraries for this project

Go over to Arduino program and follow the above pictures

-First, add the zip libraries that you downloaded

-Second, install the Adafruit V2 library

-Third, include the libraries

-Finally, the code should run if you've followed the steps until this point.

Step 16: BLUETOOTH APPLICATION

-First, connect your USB cable to the Arduino

-Second, Click upload in the top left (If you get an error message, take the motorshield off and upload it)

-Third, go to the Google Play Store on your smartphone and download the app

-Fourth, open the app and make sure your bluetooth is connected and connect to the HC-05 (upon connection, it may ask you for the pairing code, the Pairing code is:1234).

-Fifth, once connected, go to the RC car demo and click 'EDIT"

-Sixth, drag the 'A' button onto the panel.

-Seventh, Go back to the main screen and click 'RUN'

Step 17: Pat Your Self on the Back

YOU DID IT!!!!!!! PAT YOURSELF ON THE BACK AND SHOW YOUR FRIENDS!!!!

NOTE: At this point the polarity of the DC motor counts, you may have to trial and error switching the wires on the DC motor terminals to get the desired direction of the motors.

For example, if I press forward on the controller, and the wheels are spinning in the opposite direction, simply switch the female ends on the DC terminals.

Check out this dope Vid!