Abstract:

Our project, Snap a Squirrel, will consist of a pressure sensor activated camera and a unique box design to capture images of live squirrels in their natural habitat.

When a squirrel steps on the pressure sensors, the camera will take pictures with a timed delay to allow for the squirrel to eat the snack while we take the picture. We will incorporate a bluetooth activated camera using OneSheeld, a kind of camera Arduino camera shield, that will snap a picture when triggered and upload to Twitter. Specifically the device will consist of a unique box structure, camera holder, and Arduino. The sensors are placed i the area infant of where the food is placed. These sensors and wires are covered in order for them to not be eaten or tampered with. As the squirrel steps into the box to get to the food, it triggers the sensors and the pressure of the squirrel is registered by the Arduino that calls on OneSheeld functions to manipulate the phone to take a photo and upload the photo to the Twitter account @Upenn_Squirrels.

Snap a Squirrel Pitch Video: https://www.youtube.com/watch?v=qEEiacBztIg&feature=youtu.be

Inspiration

Both of the inventors have had issues with the squirrels and one enjoys the Instagram account that documents their lives on campus. Two curious engineers bound by a mutual love of squirrels.

What it does

Snaps a picture of the squirrel feeding on the machine

How I built it

We connected 6 medium sized pressure sensors to Arduino's analog pins. These sensors give an output voltage reading so that when there is a force on the sensor, this value drops. We established a threshold value so that the sensors only triggers the Arduino when something close to the weight of an average squirrel steps on the sensor. Using OneSheeld, a kind of Arduino shield, we were able to connect the phone to Arduino where we could call on camera functions to take the picture and Twitter functions to upload them. Essentially, in our code we had a while loop that called analogRead to continuously read the pressure sensors in order to check if the squirrel had stepped into the box. If the analogRead reading were below the threshold then thew turn flash off, take picture and upload to twitter functions were called. These three functions were placed within an if statement of the analog readings being lower than the threshold, so they would only be activated if the sensor was triggered. Our unique box was first drawn and conceived on paper, where we later converted it into a SolidWorks design. Using Penn's laser cutting technologies, we were able to construct and build the box made out a combination of translucent plexiglass and wood to make it sturdy while allowing good lighting and space for the electronics. We covered the sensor wires with white paper to protect them from environmental damage and curious squirrels.

Challenges I ran into

When using the OneSheeld, we had problems understanding how it worked. We had to see various tutorials on how to use it to connect our phone but in the end it worked out perfectly. We also had some trouble at first soldering the pressure sensors with the wires but after trial and error we were able to make them work properly.

Code

  #define CUSTOM_SETTINGS
  #define INCLUDE_CAMERA_SHIELD
  #define INCLUDE_TWITTER_SHIELD


  /* Include 1Sheeld library. */
  #include <OneSheeld.h>


 const int rint = A0;
 const int rint2 = A1; 
 const int rint3 = A2; 
 const int rint4 = A3; 
 const int rint5 = A4; 
 const int rint6 = A5;
 void setup(){


/* Start communication. */
OneSheeld.begin();


 }

 void loop(){


  int Threshold = 1010;
  int sensorValue1 = analogRead(rint);
  int sensorValue2= analogRead(rint2);
  int sensorValue3= analogRead(rint3);
  int sensorValue4= analogRead(rint4); 
  int sensorValue5= analogRead(rint5);
  int sensorValue6= analogRead(rint6);

if((sensorValue2<Threshold)||
(sensorValue3<Threshold)||(sensorValue4<Threshold)||
(sensorValue5<Threshold)||(sensorValue6<Threshold)){

  Camera.setFlash(ON);
 /* Take the picture. */
  Camera.rearCapture();
 /* Wait for 10 seconds. */
  OneSheeld.delay(10000);
  /* Post the picture on Twitter. */
  Twitter.tweetLastPicture("Posted by @Upenn_Squirrels");
  }


 }

What's next for Snap-a-Squirrel

We will aim to add a feeder system so that no human interaction is needed to attract the squirrels. Coming soon!

Share this project:

Updates