The Relocation of Robin (Atmel ATtiny13 microcontroller)

The Relocation of Robin

For those of you not familiar with American robins, the male bird is territorial.  When he sees his reflection, he thinks it’s another robin and he tries to fight.  The result is hours of “trying to run off” the other bird.  Of coarse his reflection doesn’t leave. 

An American Robin

Figure 1:  An American Robin

A robin has been pooping all over a hand railing in front of my house.  The robin has also been thumping on the window trying to fight his reflection.  (Nickname:  Evil Robin)  My first attempt to remedy the pooping was to tape trash bags over the windows so he wouldn’t see his reflection.  After a week, I took down the trash bags figuring he had moved on.  He had not.  So, I taped the trash bags to the window for another week.  He found the back porch window to attack.  Also, he had started eating mulberries, which made is poop stain the railing with spots of purple.  A rubber snake was placed on the railing in the hopes of scaring away the robin.  He pooped on the rubber snake.

robin poop

Figure 2:  The Robin Poop on the Railing

My next ideas were to either buy an owl decoy or build one out of cardboard.  These ideas were scratch in favor of trapping the robin and relocate him to a distant location. 


Being a new homeowner, the demands of the house seem to take several hours a day.  Coming from apartment life, this has been a difficult change.  So, the idea was to complete the trap quickly and easily.  Building the trap, assembling the circuit on a solderless breadboard, and writing the ATTiny13 code took about 3 evenings.

poopy robin

Figure 3:  The actual robin doing the pooping (image taken though a window screen)

Two words are needed to see how the trap was put together:  cardboard and packaging tape.  The cardboard box was originally used to hold several dozen-egg cartons.  A mirror is placed in the back of the box to allow the robin to see his reflection.  The lid flaps on the cardboard box were removed and replaced with a single piece of cardboard to act as the “flap”.  The flap needed a little more strength near the edge.  So, strengthening ribs were created out of cardboard and taped onto the edge of the flap.  The flap is held open by a solenoid attached to a wood dowel.  The wood dowel is taped permanently to the egg box. 

robin trap

Figure 4:  Various parts of the trap

solderless breadboard

Figure 5:  Solderless breadboard on the side of the cardboard box 

The ATtiny13 microcontroller acts as a comparator for the analog voltage output of the Sharp sensor inside of the trap. 

IR sensor

Figure 6: The sharp distance sensor in the trap

 

When the microcontroller determines the voltage from the sensor is above the set value, the output to the solenoid is changed from a high to a low.  This turns off the solenoid (by turning off the n-channel FET) that is holding open the gate of the trap.  Gravity then takes over and the lid closes.  Two magnets from a “shaking powered flashlight” are used to help keep the door shut.  Two pairs of pliers are taped in the bottom of the trap to allow the magnets to keep the corners of the door closed.

See the bottom of the page for a PDF schematic.

The sensor outputs an analog voltage based on the distance to a reflective object.  The operational distance of the sensor is from 10cm to 80cm.  The object we are looking for in this case is the robin. 

The solenoid typically is powered when the circuit is turned on.  The flap is opened on the trap and it is align so the solenoid keeps the trap open.  When an object is detected by the distance sensor, the flap is released from the solenoid and the robin is trapped.

solenoid

Figure 7: The solenoid on the wood dowel

 

Did it work?

The trap was set on the front porch, near where the robin likes to sit on the railing for about a week.  (When it wasn’t raining)  Apparently, the trap was visibly so frightening to the robin, he never came back.  So, did the trap work?  Yes, it took care of the robin problem; No, it didn’t catch him.  Maybe I should have gone with the 4 feet tall cardboard owl. 
 



Downloads:

Robin Trap Source code for the Attiny13

Robin Trap Hex file for the Attiny13

Schematic for the Robin Trap


 
As always, use at your own risk!

*All rights reserved, all wrongs deserved*

Author:  Matt Meerian
Last Modified:  June 23, 2010
Return to Home page