Introduction: Diorama, Bat in the Cave

The purpose of this instructable is to outline our development of this bat in the cave as well as provide instructions and tips for future engineers hoping to complete a similar project or use components of our project in theirs. The goal of this project was to create an diarama that could educate people. The main functionality of the bat in the cave is for bat to react to a light source in the cave by stretching the wings and lighting up its eyes. Some goals we had in conjunction to the movement of the bat was to make the cave from paper mache and paint it with some of the decoration for the cave to be looking realistic. This tutorial will start with a little background information, then show the development of the basic pieces, and finish by showing the final product.

Tools Needed: Laser-cutter, scissors, 3d printer, wire cutter/stripper, strong flashlight, superglue, drills.

Materials Needed: Arduino Uno, Arduino Motor Shield, Breadboard, Wire, Tape, LEDs, photocell sensor, DC Hobby motor, plastic for laser cutter, resistors of various resistance, 9V batteries, fishing string,  Gorilla glue, small screws, paper mache, hook screws. sharp wooden sticks, spray painter(green/grey), grey painter, fake green turf, rubber band.

Step 1: Step 1: Making the Cave

Making the cave is an important step in building this project; it determines the size of the entire diorama as well as the bat and other components! Using tin foil and cling-wrap liberally, make a sturdy base over objects in the shape of the inside of the cave to use as a mold. Then use a pre-made paper mache mix or make your own (flour, shredded newspaper, soap, and water will work) and cover the mold in a thick layer of paper mache. Once the outside is generally dry, take the cave off of the mold and pull off the tin foil from the inside of the cave. This will help the inside of the cave to dry. Let the rest of the cave sit until dry; this may take 36 hours.

Step 2: Step 2: 3d Modeling the Base of the Bat

We used google sketchup to make a simple hollow sphere for the head of the bat and oval shaped hollow sphere for the body.

First, draw two circles perpendicular to each other. Then use the follow-up feature in the Google Sketchup. After making the sphere select the whole sphere and use outer shell on the tools bar. Your sphere is now hollow. Then make a copy of the sphere, scale it twice as large, and you are left with the body of the bat. Now, download the Google Sketchup plugin called skp_to_dxf.rb from
http://www.guitar-list.com/download-software/convert-sketchup-skp-files-dxf-or-stl
and move the file to the plugins folder to the same location as your Google Sketchup file.

Print the 3d models.

Step 3: Step 3: Making Holes Into Spheres/Painting the Sphere

Drill holes vertically into the spheres for the wires to get pass through.
Make two more holes for the LED lights on the eye.
Make two more holes for the wings on the body sphere.
Make one more hole for the tail of the bat on the body sphere.

Step 4: Step 4: Wing Mechanics


We used acordian gate mechanic for the wings.
We modeled 2 inch long plastic sticks with holes on each end and middle, then laser cutted the model.

We used small screws to connect each sticks then duck taped the other side so each plastic sticks were stablized.
Then we cut one of the plastic stick to half, jointing the wings into the body of the bat.

Use rubber band to give tension to pull the wings toward the body back.

Step 5: Step 5: Making Paper Mache Look Like Realistic

Once paper mache is completely dry, spray paint the cave to grey, then spray paint the ground green.
Attach fake turf on top of the cave and ground. Add any other foliage you want to be in the diarama. 

Step 6: Step 6: Attaching Hook Screws Onto Cave

Screw in the hooks on inside-top of the cave. One on the center, one on the left top, one on the right top.
We will use these to pull the wings with fishing line by running them through the hooks and connecting them to the wings.

Step 7: Step 7: Attaching Icicles to the Cave

Drill small holes on inside-top of the cave, then glue painted sharp wooden sticks into the holes. Make sure that the icicles would not bother the movement of the bat's wings.

Step 8: Step 9: Covering Wings With Fabric

Attach fabric to each wing mechanism. We used a staple and connected it through the fabric and the hole of the end of plastic wing, and secured the fabric to the body of the bat using glue.

Step 9: Step 8: Connecting Wires With LED Into Head of the Bat

Since the holes on the head of the bat are very small, try pushing whole wire through the holes then through the bottom of the head, then strip the wire and attach the LED lights to the head by placing them in the eyes. Connect the eyes in series to complete the circuit with the breadboard.

Step 10: Step 10: Setting Up Motor for Wing Movement

Use the motor as a spool. It spins freely backwards, so when you pull the strings for the wings they will retract automatically. This system works well because there can be slack in the line upon the first start, which the motor will pull taught and then start running the wings.

Step 11: Step 11: Set Up Light Sensor

The light sensor will be used to determine whether the bat is awake or asleep. The light sensor can be placed anywhere in the diorama, and is wired as in the diagram.

Step 12: Step 12: Program Arduino & Motor Shield

We will need the Arduino to perform logic control for three main electrical components of the project. The first of which is the bat's eyes lighting up. The second is the use of a light sensor to detect when it is "day" and "night" in the cave, and the third is the motor to control the bat's wing movement. The motor will wind up the string to stretch the wing out, while the rubber bands in the wing mechanism will pull the wings back to their natural closed state.

Step 13: Step 11: Arduino Code

int photocellReading3; // An integer to store the reading from the light sensor
boolean ledStatus = false; // A boolean to help debug whether the LEDs should be on or off
int counter = 0; // A counter to help control when the motor should be on or off

void setup(void) {
  Serial.begin(9600);

  pinMode(7, OUTPUT); // Initiates LED output 7

  pinMode(13, OUTPUT); //Initiates Motor pin
  pinMode(8, OUTPUT); //Initiates Motor Brake pin

  digitalWrite(13, LOW); //Establishes forward direction of the motor
  digitalWrite(8, LOW); //Disengage the Brake for the motor
}

void loop(void) {
  photocellReading3 = analogRead(3); // Read light sensor value
  if (photocellReading3 < 300) { // If the light sensor is not recieving significant light do this
    digitalWrite(7, HIGH); // Turn on LEDs
    ledStatus = true; // Set the debug LED Boolean to true
    if (counter % 5 == 0) { // Every 5 intervals of this loop (0.5 second) do this
      analogWrite(11, 255); //Set speed of motor to full speed
    }
    else if (counter % 5 == 1) { // after 2/20 of a second turn off the motor
      analogWrite(11, 0); //Set speed of the motor to 0
    }
  }
  else { // If it is light outside, AKA sensor is reading over 300
    analogWrite(11, 0); // Set the speed of the motor to 0
    digitalWrite(7, LOW); // Turn off LEDs
    ledStatus = false; // set the debug LED status boolean to false
  } 

  counter = counter + 1; // Increase step counter by 1


  //DEBUG INFO:
  Serial.print("Analog reading 3 = ");
  Serial.println(photocellReading3);
  Serial.print("LED Status = ");
  Serial.println(ledStatus);
  Serial.print("Counter = ");
  Serial.println(counter);
  //END DEBUG INFO:

  Serial.println("");

  delay(100);
}

Step 14: Step 12: Attach/Connect Everything Together

After doing a test to make sure all of the connections are working, mount the head of the bat onto the bat's body. Then attach all the wires and conceal wires as much as possible on the inside of the cave. Our original design was to mount the light sensor inside the cave, but found that in order to see the bat at the top of the cave there needed to be some sort of light in the first place which interfered with the educational message of our project.

Step 15: Step 4: Bat’s Wing Mechanic

We used acordian gate mechanic for the wings.
We modeled 2 inch long plastic sticks with holes on each end and middle, then laser cutted the model.

We used small screws to connect each sticks then duck taped the other side so each plastic sticks were stablized.
Then we cut one of the plastic stick to half, jointing the wings into the body of the bat.

Use rubber band to give tension to pull the wings toward the body back.