Introduction: Drinking Bird Clock

About: I am an author and a maker. My current project is Santa's Shop. I'm working on a science fiction type book--more later. @EngineerRigsby


This "Hours Only" Drinking Bird Clock project is an excerpt from my iPad app, "How to Make a Science Fair Project."  The hour--in binary--is determined by the motion of the birds.  A moving bird is a "one," and a still bird is a "zero."  From left to right, the birds represent, "eight, four, two, one."

This is intended to be a simple way to get "into" microcontrollers.  No soldering is required, only wire wrapping and twisting wires together.  The electrical work is primarily done on the breadboard, so things are just "pushed" into place. 

Step 1: Parts


Parts List

(1) 12 inch x 12 inch Clear Acrylic Plexiglass Sheet—1/2 inch thickestreetplastics.com

(4) Transistors, 2n2222a#38236jameco.com

(4) Drinking Birds #DB-100teachersource.com

(4) Machine Screws, 6-32 x 3/8 inchlocal hardware or amazon.com

(1)Wire jumper, 2 inch long#126360jameco.com

(1)Wire jumper, 4 inch long#126342jameco.com

(1)Breadboard, 3.25 inch x 2.125 inch#20601jameco.com

(1)Wire wrap wire, red30 awg#22631jameco.com

(1)Wire wrap wire, blue 30 awg#22542jameco.com

(1) Microcontroller, mbed lpc 1768#568-4916-NDdigikey.com

(4) Resistors, 10 ohm, 3 watt#PPC10W-3JCT-NDdigikey.com

(1) Power supply, 5 volt, 3 amp#271-2583-NDdigikey.com

Tools you may not have

(1) Wire wrap tool#236785jameco.com

(1) Wire stripper#175098jameco.com

(1) Voltmeter#1536843jameco.com

Misc.electrical tape, hook and loop fastener (tape)

Step 2: Software

The mBed LPC 1768 microcontroller includes a cable to connect to your computer.  The mBed device will act as a USB drive.  The compiler is online and instructions for signing on are included with the mBed microcontroller.  The mBed has four "built in" LED's which will illuminate left to right just as our birds bob left to right.

Type in the software listed below, then "compile" (on the mBed website; all your programming work is done "in the cloud" at the mBed website).  When you compile, the complete code will be downloaded to your computer.  Transfer this file to your MBED USB device.


#include "mbed.h"

DigitalOut myled1(LED1);

DigitalOut myled2(LED2);

DigitalOut myled3(LED3);

DigitalOut myled4(LED4);

DigitalOut bird1(p21);

DigitalOut bird2(p23);

DigitalOut bird3(p25);

DigitalOut bird4(p27);

int main() {

while(1) {

//seven o'clock

myled1=1;

bird1=1;

myled2=1;

bird2=1;

myled3=1;

bird3=1;

myled4=0;

bird4=0;

wait (1800);

wait (1800);

//eight o'clock

myled1=0;

bird1=0;

myled2=0;

bird2=0;

myled3=0;

bird3=0;

myled4=1;

bird4=1;

wait(1800);

wait(1800);

//nine o'clock

myled1=1;

bird1=1;

myled2=0;

bird2=0;

myled3=0;

bird3=0;

myled4=1;

bird4=1;

wait(1800);

wait(1800);

//ten o'clock

myled1=0;

bird1=0;

myled2=1;

bird2=1;

myled3=0;

bird3=0;

myled4=1;

bird4=1;

wait(1800);

wait(1800);

//eleven o'clock

myled1=1;

bird1=1;

myled2=1;

bird2=1;

myled3=0;

bird3=0;

myled4=1;

bird4=1;

wait(1800);

wait(1800);

//twelve o'clock

myled1=0;

bird1=0;

myled2=0;

bird2=0;

myled3=1;

bird3=1;

myled4=1;

bird4=1;

wait(1800);

wait(1800);

//one o'clock

myled1=1;

bird1=1;

myled2=0;

bird2=0;

myled3=0;

bird3=0;

myled4=0;

bird4=0;

wait(1800);

wait(1800);

//two o'clock

myled1=0;

bird1=0;

myled2=1;

bird2=1;

myled3=0;

bird3=0;

myled4=0;

bird4=0;

wait(1800);

wait(1800);

//three o'clock

myled1=1;

bird1=1;

myled2=1;

bird2=1;

myled3=0;

bird3=0;

myled4=0;

bird4=0;

wait(1800);

wait(1800);

//four o'clock

myled1=0;

bird1=0;

myled2=0;

bird2=0;

myled3=1;

bird3=1;

myled4=0;

bird4=0;

wait(1800);

wait(1800);

//five o'clock

myled1=1;

bird1=1;

myled2=0;

bird2=0;

myled3=1;

bird3=1;

myled4=0;

bird4=0;

wait(1800);

wait(1800);

//six o'clock

myled1=0;

bird1=0;

myled2=1;

bird2=1;

myled3=1;

bird3=1;

myled4=0;

bird4=0;

wait(1800);

wait(1800);

}

}

Step 3:

Start with a sheet of 12 inch by 12 inch acrylic (1/2 inch thick).Mark four spots according to the template above.

Step 4:

Using a 1/8 inch drill bit, drill holes 3/8 inch deep into the acrylic.

Step 5:


Remove the drinking bird from his leg base and drill a 3/16 inch diameter hole in the center of the bird’s leg base.

Step 6:


Drill 1/16 inch holes in each of the bird’s legs.

Step 7:


Insert a resistor into the leg holes.

Step 8:

Using a wire wrap tool, wrap a 9 inch long piece of red wire wrapwire around one end of the resistor.

Step 9:


Wrap a 9 inch long piece of blue wire wrap wire around the other end of the resistor.

Step 10:


Using a6/32 X 3/8 screw, fasten the bird’s leg base to the acrylic sheet.

Step 11:


Do the same with the other 3 birds.Notice thatthe adjacent ends of the resistors touch.In the world of electricity, this is not a good thing.It is called a “short circuit.”

Step 12:


Bend the resistor wires toward the back of the bird to solve the problem.

Step 13:


Now the four bases should look like the picture above with a red wire on one end and blue on the other of each bird.

Step 14:


Insert the bird bodies into the leg assemblies.

Step 15:


Place the microcontroller onto the center of the breadboard.The silver colored end of the

microcontroller should be at the top of the breadboard.

Step 16:


Carefully push the microcontroller into the breadboard.It will be a snug fit.Be certain that all the pins are aligned with holes; you don’t want to bend a pin.

Step 17:

Cut the end of the wire coming from the 5 volt power supply. Separate the cable into it’s two component wires. Remove about ½ inch of black insulation from each of the wires using a wire stripper.



Step 18:


Separate the two exposed copper ends of wire.Plug the power supply into the wall. You can touch the copper wires, five volts will not hurt you.Don’t let the wires touch each other, as this could damage the power supply.Touch the wires to the probes of a voltmeter (voltmeter set on DC voltage).If the needle on the meter moves to the right, then the wire touching the probe is positive.If not, reverse the wires.When the needle on the meter moves to the right, the wire touching the red probe is positive.Mark that wire “+” with a label or tape.

Step 19:


Wrap the “+” wire you just marked to one end of a 4 inch long redjumper.Make this connection as tight as possible.

Step 20:

Wrap this connection with electrical tape.

Step 21:


Plug the other end of the 4 inch red jumper wire into the breadboard—next to the red line on the right side.

Step 22:


Wrap the other power supply wire to one end of a 4 inch long black jumper wire.Tape this connection.Plug the open end of the black jumper wire into the breadboard on the left side.

Step 23:


Plug one end of a 2 inch long jumper wire into the hole next to pin number one of the microcontroller

Step 24:


Plug the open end of the 2 inch long jumper wire into a hole on the left side of the breadboard (in the column with the previously inserted black wire).

Step 25:


Plug one end of a 2 inch long jumper wire into a hole on the right side of the breadboard, in the column under the previously inserted red wire.

Step 26:


Plug the other end of the 2 inch jumper wire intoa hole next top in number 2 of the microcontroller

Step 27:


Plug the power supply into an outlet.The microcontroller should turn on and three LED’s on the lower left should be illuminated.Unplug the power supply after you have seen that it works.

Step 28:


Plug one end of a 2 inch long jumper wire into the bottom left corner of the breadboard.

Step 29:

Plug the other end of the 2 inch long jumper wire into the lower right hand corner of the breadboard, next to the blue stripe.

Step 30:

Using the wire wrap tool, take a red wire from bird number one and wrap it around one end of a 4 inch long red jumper wire.


Step 31:

Attach the red wires from birds two, three and four to the same place you just attached bird number one’s red wire.

Step 32:

Take the other end of this red jumper wire and insert the pin into the lower right side of the breadboard, next to the red line.

Step 33:

Turn a transistor over and examine the wire legs.  Take the leg that is opposite the tab and bend it out to the side. This leg needs to be bent up—it will not be going into the breadboard.  It is ok if it touches the metal side of the transistor’s case.


Step 34:


Insert a transistor in the breadboard next to pin number 21. The leg next to the tab goes into a hole next to the blue line (second hole from the right side).

Step 35:


Take a blue wire from bird number one and wire wrap it to the transistor leg that you bent in an earlier step.

Step 36:


Take another transistor and attach it next to microcontroller pin number 23 in a manner similar to the last transistor.Wire wrap a blue wire from bird number two to this transistor.

Step 37:

Repeat this step with a transistor next to microcontroller pin number 25.  Wire wrap a blue wire from bird number three to this transistor.



Step 38:


Repeat this step with a transistor next to microcontroller pin number 27.Wire wrap a blue wire from bird number four to this transistor.

Step 39:

The breadboard is backed with an adhesive strip.Remove the paper backing and place the breadboard on the acrylic in its final position.

Step 40:


Remove the “+” tag from the power supply wire (it’s ugly).

Step 41:


Take a one inch long strip of a “hook and loop” fastener andattach (remove the paper backing to expose the sticky side)it to the acrylic.

Step 42:


Place the power supply wires on the fastener and secure the wires by pressing down the other side of the “hook and loop” fastener.

Step 43:


Press the wires down and arrange them so that the clock looks neat.Plug the clock in and it will start running—displaying seven o’clock (the right three birds will bob).There is no way to set the clock (that would have required more parts and programming).You must start the clock at 7 A.M. or 7 P.M. if you want it to display time correctly.If you want to really confuse your friends (they will probably have enough trouble reading the time using binary numbers), start the clock at a different time—like four o’clock—and mentally subtract three hours from the time displayed. Have fun!

For more detail--and a little fun--the iPad app, "How to Make a Science Fair Project" tells you more. http://itunes.apple.com/us/app/how-to-make-a-science-fair/id433405652?mt=8

Clocks Challenge

First Prize in the
Clocks Challenge

4th Epilog Challenge

Participated in the
4th Epilog Challenge

Make It Stick Contest 2

Participated in the
Make It Stick Contest 2