Introduction: Starship Display

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

This project that I made is called Starship display. This project is a display of a space ship where the wings fold up and down. Wings folded up represent a landing position and wings folded down represent a flying position. This project was inspired from toy ships I had when I was younger where the wings fold up and down.

The CAD model in my right demonstrates the setup of the mechanism that will drive the wings.

Step 1: List of Materials for Purchase.

  • 1 Arduino UNO
  • 1 USB Cord to connect Arduino to computer for uploading code
  • 1 Breadboard
  • 1 IR Sensor
  • 1 IR Remote with Battery
  • 1 VEX 3 wire motor
  • 2 VEX 36 Tooth Gears
  • 2 VEX 12 Tooth Gears
  • 2 VEX 4 Inch Shafts
  • 2 VEX 3 Inch Shafts
  • 2 VEX Shaft Collars
  • Wires
  • 1 9V Battery
  • 1 Arduino Battery Connector
  • Black Duct Tape
  • Krazy Glue

Step 2: 3D Printed Parts and Files

The actual spaceship parts and display case are all 3D printed. I have attached all files as .STL files so they are ready to print! One of each file is to be printed once except for the wings. The wing file is to be printed twice of course since we need two wings. You are free to print parts in any color you want!

Step 3: Set Up Control System

The next step is to set up the control system. The control system fort his project is very simple. All that has to be done is to wire the VEX servo into the Arduino pin 9 and the IR sensor into pin 11 and it is good to go. Also of course have the battery ready for when the circuit is placed into the display case.

Step 4: Code Project

The coding for this project is very simple. I have attached a picture of what the final code should look like. I have also copy and pasted it below so that you can just take it from here and use my picture as a reference. I have also attached links to download the two libraries needed for the code.

Links to download libraries:

https://www.arduinolibraries.info/libraries/i-rrem...

https://www.arduinolibraries.info/libraries/servo

Code:

#include IRremote.h

#include Servo.h

Servo myservo;

int pos = 0;

int RECV_PIN = 11;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup(){

myservo.attach(9);

Serial.begin(9600);

irrecv.enableIRIn();

}

void loop() {

if (irrecv.decode(&results)) {

myservo.write(pos);

Serial.println(results.value, HEX);

irrecv.resume();

if(results.value == 0xFF30CF){

pos = 60;

}

if(results.value == 0xFF18E7){

pos = 0;

}

}

}

Step 5: Set Up Display on Display Case Cover

First thing you are going to do here is tape the body to the display case cover. It is taped from both the top and bottom of the body. Make sure the four small holes in the back of the body are lined up with the four holes on the display cover.

Once the body is taped you will notice the body is hanging from the cover, use glue to fully stick the body to the cover. Once the glue had settled the top piece of tape can be removed for aesthetics.

Use the four inch vex shafts to connect the wings to the body and this step is finished.

Step 6: Glue Display Cover to Display Case Extension.

In the picture to the left you will see the display extension on top and the base on the bottom.

To start you will first put the extension on top of the base. There are columns sticking out of the extension that connect to the holes in the corner of the base.

Then Place glue on the four flat corners of the display extension and carefully place the display cover on top of the extension and let the glue dry.

Step 7: Set Up Gear System

To set up the gear system you first place the two 36 tooth gears into the middle two holes. Then you will see at the ends the 4 inch shafts sticking out. You will first place the 12 tooth gears onto both ends and then the shaft collars. The shaft collars will not only hold the 12 tooth gears but also the 36 tooth gears due to the radius of the collars.

Step 8: Place Control System in Display Case

First you will tape the motor inside the display case. You are going to want to measure out carefully where you place the motor. If you are looking at the gear train in reference to the back of the body the motor connects to the right hand 36 tooth gear so measure in reference to that and then tape the top side and the left and right side of the motor to the measured location.

Then connect the motor back to the bread board and place the bread board and Arduino into the display case.

Step 9: Connect Motor to Gear Train and Close Display Case

First thing that needs to be done is to remove the green tip of the servo and connect it to the shaft that you will be connecting to your motor.

Then you are going to plug in the 9V battery into the Arduino and set the motor as if you want the wings in the down position by pressing 2 on the IR remote. (Or whatever button you may have set as the wings down position.)

From there you connect the green tip that you connected to the end of the shaft and from there you will be able to close the case with the Arduino running and motor connected.

Step 10: Done!