Blog - Sketching with Hardware

Team 1 – Birdinator 4999

Published on: | Author: Bruno Müller | Categories: 2018a, Projects

The bird house your birds have been dreaming of!

Have you ever wondered if there is a way better way of keeping your birds comfortable and save than the standard boring bird house that can be bought everywhere? Of course you did! And we have a solution to your problem!

 


 

Introducing the Birdinator 4999. It does not only do all the things that a regular bird house would do. It also comes with some handy features like closing the door and retracting the entry stick when it senses that a predator might want to attack the birds, keeping its inhabitants safe.

The Birdinator 4999 can also sense if the sun is shining bright. In such an event, we have implemented the attractive convertible feature. This allows the roof to be lifted, allowing the sun to shine right into the inside, allowing the birds to enjoy the weather.

The last feature of the Birdinator 4999 will not only keep your birds safe and comfortable but will also keep them fed. With the handy fly swatter that is mounted on the left side alongside with a sensor, the swatter can detect if there are any flies crawling on the wall. In such an event, the swatter will strike and process the critters into delicious food for the birds. Any insects that are struck this way will fall down into the convenient food bowl below.

What you need

  • Arduino Uno
  • 3x servo motors (strong ones)
  • 2x light sensors
  • 1x button
  • 2x 10k Ohm resistor
  • 1x 220 Ohm resistor
  • sponge
  • fishing line
  • loads of wooden boards
  • a wooden stick
  • loads of wires
  • preferably a laser cutter

How it works 

On the bottom of the Birdinator 4999 there is a button. Also on the bottom we’ve put a small sponge. This effectively acts as a pressure sensor. When enough pressure is put on top of the birds house, the sponge contracts and the button is being pressed. The Birdinator 4999 will then close the door and retract the stick, since a heavy predator might be putting too much pressure on the entire house.

 

Closing the door and retracting the stick is actually a more complex mechanism than one might think. In this picture the door mechanism is displayed. Since it is not that clear on the picture, the green lines mark the fishing line we have used. Also notice the wooden parts that we have glued on top of a servo motor that are attached to the stick. This is done so that the stick moves in and out in a linear way. We have taken inspiration from the pistons inside of a car engine. The concept is similar, a rotating motion is transformed into a linear motion and the car’s piston would be our stick.

The picture you see is the closed state: the stick is retracted and the door is closed shut. When we want to open the Birdinator 4999 again, the servo will turn into an anti clockwise direction, pushing the stick outward and pulling on the fishing line, effectively lifting up the door.

 

On the lower right corner of the frontside of the Birdinator 4999 there is a light sensor. When this light sensor detects enough day light, a servo motor on the inside will push open the roof to let in some of the daylight. The roof is hinged on one side and does not open up all the way, so when the servo turns into the other direction again, the roof will close again because of its own weight.

 

On the left side of the Birdinator a second light sensor can be seen. This one can detect if there are some insects covering it up. If the light sensor detects far less light than before, the fly swatter servo will be activated, killing the insect. We have put a large gear directly on top of the servo motor and a far smaller gear on the fly swatter itself. This was done to make the fly swatter move far faster since the servo is fairly slow.

Our first attempt at building a fly swatter contraption was one that would pull on some rubbers to „arm“ the swatter and use the force of these rubbers to whack the insects. This contraption had a few problems though. Since the far more complicated contraption had to be armed every time an insect had been smacked, several problems might occur when arming this device, making it unreliable. Furthermore it was large and heavy and so strong that it might actually damage the Birdinator 4999. For these reasons we have decided to stick to a more simple servo motor with a gearing ratio, making every less complicated.

Plans & Code

/* Sweep

 by BARRAGAN <http://barraganstudio.com>

 This example code is in the public domain.

 modified 8 Nov 2013

 by Scott Fitzgerald

 http://www.arduino.cc/en/Tutorial/Sweep

*/

#include <Servo.h>

Servo dachservo;  // create servo object to control a servo

Servo tuerservo;

Servo klatscheservo;

int Analog0 = A0; // Analogen Eingang 0 als Analog0 definieren

int Analog1 = A1;

int helligkeit = 0; // Variabel helligkeit auf 0 setzen

int klatschehelligkeit = 20;

int helldunkelgrenze = 35; // Grenzwert hell-dunkel

int klatscheausloesen = 150;

int dachoffen = 1;

const int buttonPin = 2;     // the number of the pushbutton pin

int posdach = 0;    // variable to store the servo position

int postuer = 0;

int buttonState = 0;         // variable for reading the pushbutton status

int istgeschlossen = 0;

void setup() {

  Serial.begin(9600); //Serial-Übertragung auf 300Baud-reicht völlig

  dachservo.attach(5);  // attaches the servo on pin 9 to the servo object - Dach

  tuerservo.attach(3);  // attaches the servo on pin 9 to the servo object - Tuer

  klatscheservo.attach(11);

  pinMode(buttonPin, INPUT);

}

void loop() {

  helligkeit = analogRead(Analog0); // Helligkeitssensor auslesen

  Serial.println(helligkeit, DEC); // Ausgabe in dezimal über Serial mit Linefeed zum Einstellen des Grenzwertes „helldunkelgrenze“

  if (dachoffen == 0 && helligkeit > helldunkelgrenze) { 

    Serial.println(dachoffen);

    Serial.println("dach öffnen");

    for (posdach = 180; posdach >= 90; posdach -= 1) { // goes from 180 degrees to 0 degrees

    dachservo.write(posdach);              // tell servo to go to position in variable 'pos'

    delay(10);                       // waits 15ms for the servo to reach the position

    }

    dachoffen = 1;

    delay(2000);  

  }

  if (dachoffen == 1 && helligkeit < helldunkelgrenze) {

    Serial.println(dachoffen);

    Serial.println("dach schließen");

    for (posdach = 90; posdach <= 180; posdach += 1) {//180 ist unten 100 ist oben

    // in steps of 1 degree

    dachservo.write(posdach);              // tell servo to go to position in variable 'pos'

    delay(10);                       // waits 15ms for the servo to reach the position

    }

    dachoffen = 0;

    delay(2000);

  }

  buttonState = digitalRead(buttonPin);

  if (istgeschlossen == 1){                   //170 stickl draußen

    if (buttonState == HIGH) {

      for (postuer = 170; postuer >= 65; postuer -= 1) { // goes from 180 degrees to 0 degrees

        tuerservo.write(postuer);              // tell servo to go to position in variable 'pos'

        delay(25);                       // waits 15ms for the servo to reach the position

      }

      delay(2000);

      istgeschlossen = 0;

    } 

  }

  if (istgeschlossen == 0) {

    if (buttonState == LOW) {

      for (postuer = 65; postuer <= 170; postuer += 1) { // goes from 0 degrees to 180 degrees

      // in steps of 1 degree

      tuerservo.write(postuer);              // tell servo to go to position in variable 'pos'

      delay(25);                       // waits 15ms for the servo to reach the position

      }

      delay(2000);

      istgeschlossen = 1;

    }

  }

  klatschehelligkeit = analogRead(Analog1);

    //Serial.println(klatschehelligkeit, DEC);

    if (klatschehelligkeit < klatscheausloesen) {

      klatscheservo.write(85);

      delay(600);

      klatscheservo.write(0);

      delay(2000);

    }

}
linked categories 2018a, Projects

|

Write a comment

Comment