Category Archives: wildlife

Animalcam version 1

I’ve had some success this year with a raspberry pi based infra red camera – along the lines of a trailcam.
I’ve based it and the python script on the excellent information here  with the addition of a locking relay based infrared lamp that is triggered when the camera is run.


Infra red lamp kit – from Maplin
Raspberry pi model B – from CJE micro’s
Noir camera – from CJE micro’s
3v latching relay kit – from ciseco
PIR sensor – from Tandy
Following a rebuild, I upgraded my home made stripboard effort with an Adafruit Small-Size Perma-Proto board from Tandy

Battery from – from Amazon

The 2 kits worked out to be very cost effective and much cheaper than getting the components “loose”.

The maplin IR lamp kit is labelled as 12v however it works fine with a 9v battery.

The prototype:



The unit runs RPi Cam Web interface by silvanmelchior as described on the rpi forum here. This is called via a pipe from a slightly modified version of the script originally from raspberry pi spy, and as modified here, with the pipe calling discussion described in the thread here.

As you can see, I’ve borrowed a lot of things from some very knowledgeable people so thanks to all concerned for all of your work and for teaching me!

Here’s a front view of the unit – I’ve put everything inside the clear lunchbox to keep it dry. This hasn’t had any effect on the PIR operation and the light is bright enough.DSCN4160

Internal view.


A festival of gaffer tape and wires! The pi is in the case, the pir beneath the tape. I’ve added a couple of switches, one turns the pi off with a “sudo poweroff” (the other is currently a spare).

The whole thing is stuffed in to an ASDA lunchbox and linked to the battery. It’s then wedged on a brick in the back garden under the bird feeder with a water bowl and some food scattered about…. and surprisingly works! – I’ve put some of the videos on youtube with the whole lot here.

Our first vid of a badger:

A compilation where you can see the flash as the cam is triggered before the light:

This is most definitely a prototype however the results have been much more than we expected. I’m now working on a version 2.0.

Jay taking peanuts

This is a short video of a local Jay that takes peanuts from our window cill.

He’s as quick as a flash so I’ve edited the video to show a slow motion version of the nut theft!

Nut Dispenser – 3A. Hardware (electronic)

The hardware for the project can be broken down in to 2 main sections – the electronic control of the various sensors and the mechanism to dispense the nuts.

A) Electronic control.

Having played around a bit with breadboard I’ve worked out what I’d like to have for the various inputs and outputs:
1. Motor to drive the nut delivery system behind a reed switch or relay.
2. Microswitch to tell the pi where the motor is – to stop it chucking out tons of nuts or none at all!
3. Motion detector – I’ve bough one from Tandy which works pretty well .Not sure of the use for it yet but I:m going to add it in should it be necessary in the future.
4. Switch to trigger if the nuts are deployed. (possibly an IR breaker beam rather than a switch to avoid complex mechanical issues).
5. LED. A light that I can configure to show different colours. I’ve chosen a RGB LED so that it can be positioned in one place with the colours showing the status – I’d considered several different coloured ones but was concerned that the wildlife would notice the position of the light (i/e 3rd from left) rather than the colour = possibly a new experiment, though.

I wanted something that was easy to connect to the pi and so have come up with a veroboard circuit that connects to the pi via a ribbon cable.

This has the various connectors in place to make it fairly easy to connect up the swiitches etc and the ribbon cable to ensure that they are alwas connected to the correct pins on the pi.

The second piece of veroboard has the connection for the lego motor – these have special connectors and I decided to use an old battery box as a doner for the plug. I then soldered this on to some board and glued it down having worked out the pin arrangement from here:

It all works pretty well however the wires are inclined to come off the pins at the slightest vibration! Also I’ve had trouble passing 9v through the opto isolator as it sticks at anything over 3v – I’ve since got some relays that may prove better.

Nut dispenser – 2. Design

The choice of housing has helped enormously as it gives me a decent set of physical parameters to work too with the design of the internal structure was governed by the required inputs and outputs.
I need:
1. a method of dispensing the nuts (e.g. motor)
2. a method of checking that the nuts are there.
3. a way of signaling to the wildlife that food is present.
4. a way of finding out if the nuts are gone.
5. A way of detecting if the feeder is being visited.

It would also be helpful if there was a method of filming the feeding either from the actual feeder itself or remotely from an unconnected camera.

I’d like to be able to have a configurable method of linking the different inputs and outputs together and the raspberry pi was the easy choice – its pretty small but more importantly I’ve got one so no further outlay!

I will need to create a way of running the pi outside so it will need a battery along with either some way of communicating (e.g. VNC) or to be totally autonomous..

I’m no programmer however as a child I enjoyed my acorn electron as well as having access to a BBC B and and Arc 440, reaching my programming pinnacle aged 11! A few years later I’m drawing on this skill and so would like the project to run using BASIC on RISC OS – mainly as I’m most familiar with the language (although I’m very poor at it) but also because RISC OS just seems to work so well on the pi. The issue with this is that it doesn’t support simple wi-fi dongles and getting VNC to work appears to be pretty tricky.

Finally the whole system needs to be both watertight (in case of showers) and reliable (so that I don’t keep disturbing the wildlife by resetting it every few minutes).

I’ve looked online to see if there was anything commercially available that I could either buy or use the ideas from – the closest was this as posted on the Raspberry pi website: 

…and described on the Twin cities maker website here:


Nut dispenser – 1. Concept

With our squirrels and jays becoming a bit more used to our presence I though it would be fun to create an automatic feeder. Rather than simply dispense nuts the idea was to get them to work for it and to see what they see in terms of colours. Initially this consisted of a coloured l.e.d. that showed if a nut was present (e.g. red for none, green for present etc) with the nut being obscured so they could only tell via the colours.
I have grown this idea in my head to the point where I thought it would be fun to construct a dispenser that had several functions and then use them in a modular fashion to create various scenarios for the creatures to go through before they received the prize.

This idea was left for a while until my niece & nephew gave me a bird house for my birthday – unfortunately it is not possible to put up a permanent bird house in our communal gardens but the shape of it made me think that I could build my dispenser inside – so I did!

The birdhouse that will house the feeder

The following posts show how I am going through the design and build of this project.

Recently we’ve taught our squirrel to collect food from a basket, lowered down rapunzel style from the window.

This first video shows the squirrel when (s)he was first introduced to the basket. A bit of fumbling and (s)he soon got the hang of it.

basket squiz 2

A few weeks later and now confident with the basket, we attached a small camera to get a bit of a close up.


Feedercam version 1.0

Toady I’ve been experimenting with 2 webcams to film the bird feeder. Unfortunately its a bit wet so not much happening however at least I’ve been able to test some things…..

Here’s a pic of the setup – a microsoft webcam on the window cill with a logitech blue-tacked to a telescope!

Both are linked to the computer running i-spy using motion triggers so they automatically record when something happens (they have to be pretty sensitive to capture such small objects so most of the videos are of twitching leaves!)

The link below goes to my first test of the system where I’ve got the times to tally up when editing.

squirrel spy test

Next step is to get the raspberry pi to control tham and house the whole lot in a waterproof box to create a sort of “game cam”