Sunday, 23 September 2012

Fake Rat

Calling it a Fake Rat sounds better than calling it a bird scarer. We have a problem with swallows, actually they're 'welcome swallows' but they're not very welcome. I quite like them and they have a cute way of finding nooks and crannies around our house to make nest. That would be fine, except that they leave trails of crap down the walls under the nests. So they're not welcome.

We play this kind of game. They start a nest. I knock it down. They start another. I knock that down. All the time I'm wishing they could go nest somewhere else. All the time I'm sure the female is saying "but... I've got these eggs going!"

Then I thought of this. It is a fake rat, well it looks a bit like a rat. The fur is rabbit fur actually, because I'm not going to skin a rat and I had a spare rabbit skin from one I shot a while back. It is wrapped around a cardboard box and inside the box are some electronics which, every half hour, light up the blue LEDs and make a growling noise.
I'll put it near their current favourite spot tonight. They'll get settled in there for the night and this thing will 'come alive'. Then they'll fly off, disturbed. But they'll come back, of course. They'll take a look at the rat and decide it is harmless and settle in again... and then the rat will come alive again.

This will go on All Night.

I would like to insert an evil, maniacal laugh just here.

Now, I know it doesn't look that much like a rat, but they're just little birds and I reckon it will be scary enough for them. A furry thing with glowing eyes that makes a noise has got to be alive, right? And they go to a lot of trouble to build their nests where furry things cannot reach them. Clearly wherever this thing is a bad place for a nest. Job done.

The electronics is pretty simple. I have an ATTiny85 IC still on a breadboard in there with two LEDs (in parallel) and a speaker that plays three notes. It is very like the Laser gun I built earlier, except I've taken much less care with the build and there's no way to recharge the batteries. I have three AA batteries in there and they are easily accessible when I need to replace them.

The main difference is that, to save battery life, I use the sleep mode for the ATTiny85. There are several sleep modes available and the one I have used puts it into state where it uses very little current while it is waiting for the half hour to come up. Most of the time, of course, this is what it is doing. The sleep mode uses the watchdog timer which seems to be just an internal oscillator that, after so many cycles, delivers and interrupt to the main program. It is fairly limited, the max sleep time is about 8 seconds. So it wakes up more than the birds know. For these silent wakeups I just increment a counter and go back to sleep.

How well this all actually works is will be tested tonight.