Interactive Bird Toy (Using Arduino)

by kirstenkorff in Circuits > Arduino

1191 Views, 8 Favorites, 0 Comments

Interactive Bird Toy (Using Arduino)

IMG_0455.jpg

What is the project about?

This project was originally made to be a school project.

The inspiration for this project was pulled from my daily life. As a bird lover, I really enjoy watching the little birds that hang out in the tree outside my kitchen window. When i had to come up with a concept for this project, my original idea was to make a merry go round, but there were multiple aspects that made me scrap the idea. For instance: a merry go round does not necessarily have a need for programming and could run on merely a powered motor.

So that led me to change my concept to this current one. I always wish to be able to pet the birds, and since that isn't possible, it brought me to the idea of making my own bird. Whenever you pet the bird's back, it will tweet and shake his head.

Looking back on the project

At first glance, this project seems quite simple, but since this is my very first time working with an arduino, I had to learn a lot of new skills to get from start to finish. The thing i struggled most with during the project was understanding how electric circuits work. It wasn't until near the end that I finally began to understand and it made me feel a whole lot smarter. Being able to actually explain how it works is something i'm quite proud of. During this process I also learned how to apply coding to the arduino, and how to solder these parts together.

Process of iteration

Whilst making this project, I made quite a few changes along the way. I'll be writing down what I ended up doing differently while explaining the different steps.

Supplies

Here is what you will need for this project

  • The Arduino IDE app (You can download this for free on the arduino website.)
  • 1x Arduino Uno
  • 1x Power cable for arduino uno
  • 1x Small breadboard
  • 1x Micro servo
  • 1x Buzzer
  • 1x Light sensor
  • 1x Resistor with color code: orange, orange, black, black, brown.
  • 9x Male to male jumper cable
  • 4x Male to female jumper cable

Optional:

  • Soldering iron
  • Soldering tin
  • Wire stripper
  • Copper plate for soldering
  • Thin copper wire

For exterior:

  • Scissors
  • Big plastic bottle
  • Tape
  • Aluminium foil
  • Paper maché (I'm using Jovi PatMaché.)
  • Paint
  • Paintbrushes
  • Tweezers

The Breadboard Layout

layout breadboard.png

Using the materials specified in the list, you can recreate the circuit with the image I provided. Add the male to female jumper cables to both the light sensor, and the buzzer. You will need these parts to be longer. Stick the pins of the light sensor in the female ends of the cables, and stick the male ends in the spots were the sensor's pins are indicated on the image. Do the same thing for the buzzer.

Enter the Code

Screenshot code.png

Download the file with code I provided below and run it in the Arduino IDE app. Please note that this was written in version 2.0.3. If done right, your construction should behave the same as in the video I added.

Touching the light sensor will cause the buzzer to beep and the servo to move at the same time.

The Sketch for Your Circuit (optional Step)

IMG_0445.jpg

(This next step is entirely optional. If you would like to reuse the meterials afterwards, you can skip this step.)


Before soldering, make sure you draw out a sketch for the circuit.

To explain the sketch I made:

Beep - stands for Buzzer

Serv - stands for Servo

Sensor - stands for Sensor

The little rectangle next to the sensor - stands for the resistor

The circles - represent the ends of cables that plug into the corresponding places in the arduino.

The 01/1 - represents the place you solder the wire into on the copper plate. Hole 01/6 for example, stands for vertical 01 and horizontal 6. That would be the green cable on the second image.


I wrote down the colors of the different cables on my sketch. Make sure to replicate the sketch using your own colors.


(Note: Instructables would not let the entire sketch fit on screen without making a separate step for it. Please look at the images in step 4 for a better understanding of how it will look.)

Soldering Your Circuit (optional Step)

IMG_0443.jpg
IMG_0444.jpg
IMG_0442.jpg

(This next step is entirely optional. If you would like to reuse the meterials afterwards, you can skip this step.)


On your copper plate, you want to create a row for the + and one for the -.

You will create the row for - by stripping and soldering the cable that plugs into the GND port of the Arduino. Solder every cable that needs to be attached to the - row, onto the copper plate. Then cut a piece of copper wire to the right lenght and solder it to connect all the cables on the - row together.

Follow the same process for the + row.

Don't forget to solder one end of the resistor to the sensor cable on the - row, and the other end to a spot on the + row.


For clear understanding of these instructions, please look at the example images I provided.

Plug the arduino back in. Attach the sensor, speaker and servo back to their right cables. If done right, the circuit should still work the same as it did before.


(Note: Some of the cables you used in the breadboard circuit will be left out here. They are not needed since the cables will now be connected through soldering.

Also, I've realised that I soldered my red cable one space too far. This is no problem. As long as you can still connect the cables, the space on the copper plate shouldn't matter.)

A Log to Hide Your Circuit Under

IMG_0369.jpg
IMG_0370.jpg
IMG_0372.jpg
IMG_0374.jpg
IMG_0375.jpg
IMG_0376.jpg

To fit the bird theme, you will be hiding your electronics underneath a log.


First take a big plastic bottle and cut off the top and bottom with a pair of scissors. Cut it to where it is wide enough to fit both your arduino and breadboard/copper plate inside.

Next, cut a strip of plastic lengthwise out of the bottle. The plastic should now represent somewhat of a tunnel. Make sure this "tunnel" is high enough to fit your electronics underneath.

Then take your scissors and make a hole through the top of your plastic "tunnel". Keep in mind that the hole needs to be large enough to fit the buzzer, sensor and the wires of the servo through.

(Iteration) I realized while making the log that the round plastic had the tendency to curl back into itself. To fix this problem, I cut two strips of plastic and taped them to the underside of the "tunnel" to make sure the plastic stops curling and keeps the arch-like shape. (See the fourth image for reference).

With the base of the log done, you can proceed to now cover it with a layer of the paper maché. Ideally this layer should be between half a cm to a full cm thick.

When the whole base is covered, use a clay tool (or anything that could work as one) to add details and make it look like a log. If you're not sure where to start, you can look up images of logs for reference.

Sculpting Your Bird

IMG_0371.jpg
IMG_0373.jpg
IMG_0377.jpg
IMG_0379.jpg
IMG_0381.jpg

To start off with the base of your bird, make two balls out of aliminium foil. One big ball and one smaller one, to be the body and the head. Once done, cover each ball with another single layer of foil. This top layer will stick to the inside of the paper maché.

(Iteration) Do not press the foil balls together too tightly. Since you will be removing most of the aluminium inside later, make sure there's a lot of air inside the ball. The tighter you have squeezed your foil together, the more difficult it will be to remove afterwards.

Once your foil balls are the right size, cover them with a layer of paper maché (again about half a cm thick.). Add another bit of foil to function as support for the tailfeathers, then cover with paper maché as well. When covering your bird, make sure to keep the bottom side open.

(Iteration) I was originally planning to cut the body of the bird vertically in half down the middle. The idea was to take apart these halves once dried, and take out the aluminium foil to leave a hollow space for the electronic parts. Once glued in place, I would have glued the two halves back together to complete the body. However, I ended up not using this method because the paper maché was simply too fragile. To solve this problem I simply made a big hole in the bottom of the body. As the bird will be sitting on the log, the hole will align with the hole in the log to let the wires through, into the bird.

To sculpt the head of the bird, lightly flatten the left and right side of the head to create a more natural shape. Then make a small triangular-shaped cone for the beak and stick it onto the front of the head. To make the eyes, use a clay tool (or the back of a paintbrush) to push two small pits in places where the eyes should be. Then roll two tiny balls and push them into the pits to make the eyeballs. Make sure to also keep the bottom of the head open.

Once the head is done, align it with where it should be on the body. Trace around the head where it connects to the body and remove the clay that would be on the inside of the neck. You should have now cut out a round hole into the body. (See image for reference.)

Don't forget to make a little hole in the back of the bird. this should just be big enough to fit in the light sensor.


As a final step, use your clay tools (or improvised ones) to add details to your bird. Just like with the log, I recommend that you search for images of the bird you want to make. Preferably from multiple angles.

Clean Up and Tweaking

IMG_0393.jpg
IMG_0390.jpg
IMG_0395.jpg
IMG_0448.jpg

Once your paper maché work is done, make sure to let it dry completely. This can take up to two days. To speed up the process, I found it easiest to place it near an open window, where it can dry using the fresh air from outside.


Once completely dry, take a pair of tweezers and start carefully plucking out the aluminium foil piece by piece. If you didn't press your foil balls together too tightly like I did, it will be much easier to remove. Don't tug too hard on the foil and only tear off little pieces at a time. I found that it helps to twist or make circular motions on pieces that seem to be stuck.

Once removed, only the thin, second layer of foil should still be stuck on the inside of the paper maché. This will keep it together in case it cracks. Make sure to test if the sensor and servo fit in the right places. (The top of both the sensor and servo should be sticking out slightly above the hole.

(Iteration) having to fit the whole bird head on the servo, it needed to be lightweight. That's the main reason for using paper maché instead of normal clay. The problem with most air-dry clays though, is that it is prone to cracking. The simplest way to fix it, is either to make the area wet and moldable again, or to simply glue the cracks shut. (It is paper after all.)

(Iteration) I intended to simply glue the head to the servo, but realized that the plastic attachment was too wide to fit inside. to fix this problem, I took a smaller attachment and added a piece of wire to it. It should now provide better support. I also realized that there was too much space inside the head, so to keep it from hanging loosely on the attachment, I stuffed a small ball of tissue in the head to close the space. The servo attachment now has something to grip onto.

Painting

IMG_0441.jpg

This step is nice and easy. Go as simple or detailed as you want, just make sure to have a reference photo nearby. (I decided to choose an American goldfinch, because I like the bright color.)

As for paint, I decided to use guache, because it dries rather quickly. Acrylic paint will work fine as well, just make sure not to use too much water.

Time to Assemble

IMG_0450.jpg

Once the paint has dried, place the arduino and breadboard/copper plate underneath the finished log. Now feed the wires of the buzzer, servo and sensor through the hole in the top.

Plug it in and check if it still works. If it does, feed the wires into the bird body and glue the sensor and servo into place.

(Iteration) The servo wouldn't stay in place for me while glueing, so I stuffed some tissuepaper into the body to make sure it can't go anywhere.

Make sure the body covers all the wires underneath.

Then place the head (and maybe glue it) onto the servo attachment.

Now make sure your space is bright enough and enjoy playing with your own handmade bird!


(Note: I was originally going to add a video of the completed final product at the end here, but my arduino broke before i got the chance to. I will update this when I am able to get a new one.)

Downloads