Tuesday 29 April 2014

Side-View bird box, early interest

Well, I am usually genuinely surprised when things actually work, so it was with great excitement that we spotted this fella poking his head into our new bird box to take a look.

Blue tit inspecting potential home


We're pretty sure its a blue tit.  My first thought was to check the activity log that is generated via the two infra-red beams at the entrance hole.  There are two IR beams, an inner and an outer one, so theoretically one should be able to distinguish between entrance / exit / head-in / head-out.  Why you might ask...? ;)

Nest box in situ, and activity log.  Yellow activity is this blue tit.

The log shows the activity to date, where the two numbers represent the beam, then the beam state:
1=Outer, 0=Inner  and 1=Whole, 0=Broken, for example 1,0=outer beam broken.
On closer inspection of the log, I seem to have mis-coded that...


I originally thought Mr Blue tit was the first look-in I'd had, as it was the first caught on camera, however the log showed otherwise, with some interest five days ago.  A quick re-visit of recorded footage showed a shadow briefly obscuring the entrance hole at the exact time of the logged event on the 24 April.  There's no way I would have spotted this so it shows the IR beams are doing their jobs.

I'm considering putting up a miniature gallery along the lines of 'Birds & insects that have made brief appearances in our nesting boxes'.  Fascinating viewing I'm sure !

?Coal Tit making brief appearance into owl squirrel box

Wednesday 23 April 2014

Squirrel montage collages

Just a quickie today,  My squirrels have been spending quite a lot of time in the owl squirrel box recently. They can usually be found in it when it rains and spend most nights in it at the moment.

I've been playing with the photo collage tool in Picassa, and have made these 'delightful' montages.  My wife thinks that one of them isn't suitable for my work desktop background, see if you can figure out which one it is.

Squirrel Montage 1

Squirrel Montage 2

I've linked to high res versions of these if you too want to offend your work colleagues.

Sunday 20 April 2014

Side-View, Raspberry-Pi powered bird counting bird box

As I mentioned in an earlierpost, I've been looking to setup a small bird nesting box with camera feed that can be viewed from any internet-enabled device (PC, tablet, phone).  While there are plenty of solutions out there to directly connect an analogue camera to a TV, there are no affordable compact off the shelf 'stream-across-the-web' (or home network options).  

My 'Mark I' box is based on the side view 'Odd-Box' design, variants of which are available commercially from various UK retailers.  This design is interesting as it gives a 'side-on' perspective, rather than the usual 'top-down' view from the traditional nest box with camera at the top.  I've added an entrance counter which should allow me to monitor coming & goings from the box.   

My side-view, Raspberry-Pi powered bird counting nest box

As described in an earlier post, I've taken advantage of the Raspberry Pi's flexibility to connect to a variety of devices, and have hooked it up to a webcam to stream live footage of an owl nesting box, which  is currently intermittently occupied by squirrels.
  
Bird Activity Counter
I've also incorporated two entrance hole infra-red beams that when used together should be able to detect entry and exit from the box.  This is based on the bird box project in Andrew Robinson and Mike Cook's Raspberry Pi projects book:


The final chapter ' Chapter 17 - The Techno-Bird Box, a Wildlife Monitor' describes a method of utilising the PiFace interface board with the Raspberry Pi to record entry and exits to the box.  This YouTube video shows the sort of thing that is possible.
Update May  4 2014:  Python scripts for this aspect of the project are described in this post
   
Box Construction
The wiring, IR illuminators and detectors are housed in the multi-layer plywood section on the LHS of this picture.


All wiring is goes via a terminal block to the PiFace interface board + Raspberry Pi.  The box is powered via power over ethernet (PoE) using a TP-LinkTL-POE200 PoE kit.  The camera is a Microsoft Lifecam cinema.   The box is linked into my home network, and can be viewed from any connected device as a motion jpeg stream.

Video streaming
The LifeCam is capable of 1280x720 video, but unfortunately the viewing angle is too wide, and there's a gain in frame rate if I drop it to 800x600.  At this resolution I can also zoom in, which isn't possible at the higher resolution using the LifeCam.  I'm using mjpeg_streamer to stream the video across my network, and can get a framerate approaching 20fps, but limit it to approx 12fps as this is still perfectly adequate.

View from each end of the box (not web-cam view)
I haven't gone for artificial light in the box, and have instead cut a window into the box lid and put a sheet of transparent acrylic over the lid.  This seems to give plenty of natural light, and we'll see if the skylight puts them off or not. 

For a future 'Mark II' box, I'm planning to use the Raspberry Pi camera board as its a good resolution, cheap and much more compact.

Motion detection
The Raspberry Pi is essentially a small computer running Raspbian, a version of Linux.  This is an open-source operating system that benefits from a wide community of open-source software (read = free).  I'm currently taking advantage of the Lifecam's facility to stream mjpeg natively, which puts very little load on the Pi.  Optionally, you can run a program called 'motion' which analyses a video stream for movement configured to record any detected activity.  I haven't used this, as a while ago I setup a PC running iCode's iCatcher Console software which does the same thing.  This is windows based, commercial software, which operates on a per-camera licensing basis, so there is a per-camera cost involved. I have maxed-out my available iCatcher per-camera licences at the moment, so may look at using motion for the next nest box / feeder / whatever build.  Using this software, I can capture any activity and export to a video file, for example this week has seen plenty of squirrel mating in my Owl nest box.



If you exclude the motion detection (which can be setup for free on the Pi), the cost for this build would be approx £100, which when you compare to how much the cost of a TV-only analogue kit would cost is very favourable.  The 'downside' is that you have to build & program this yourself, but there are plenty of guides out there to help with that.

Mounting
Since we're not dealing with a battery or solar powered box, this had to be put up near a network point and power.  The advantage of a PoE setup is that I can run an ethernet cable a long distance from the house and send power and a data signal through it.  The TP-Link kit I've used allows a step down to either 12, 9 or 5V at the destination, so I've assumed that it must send a higher voltage down the wire.  My assumption is that since the step down occurs at the destination, there's no need to fiddle about with voltage drops if you planned to send 5V from the power source. 
To keep it simple, I'm mounting this one on the side of the house, and running ethernet cable through the wall.  My other similarly setup owl-come-squirrel box is set up exactly the same way, and is a good 150ft from the house.

This is a view from the lifecam camera with the box outside:

View from Bird box camera at 800x600 resolution

My main concern is that the electronics compartment gets a little warm, and I don't want to kill the Pi... hopefully being on North-East facing wall, it shouldn't get too hot.  The next version will incorporate some better ventilation.

I hope that I haven't left it too late putting this nest box up, but last season we have great tits nesting in May, so I'm ever hopeful!
  

Thursday 17 April 2014

Trail Camera / Scouting camera

Last Christmas my lovely wife gave me one of these:

KeepGuard KG-680V, 8MP Trailcam

For the last few weeks, I've had it set up at the bottom of my garden, which backs onto woodland.  Before this point, in the garden, we've had occasional fleeting glimpses of foxes and a badger once.  When I forget to close the gate, we often get deer into the garden that like to eat all the flowers.

The aim was to see if we could get footage of any of these with the trail cam...

I set it up overlooking a clear 'passageway' through an overgrown patch of land:



It has two settings: image or video capture (not both).  I've set it onto its highest resolution settings, which produces some nice images and the video is okay too.  It has built in IR illuminators which should illuminate up to 15m from the camera.  I'm using a high capacity SD card so can afford to leave it running for a long time

To begin with I thought this could double as a way to document the local cat population, 3 regular cat visitors cats so far..

Anyway, the wild animals caught so far:

1) Deer: We seem to have two regular visitors, we've called these two "Itchy" & "Scratchy" as they spend a lot of time doing just that.  There's a lot of ticks in the woods, so I wouldn't be surprised it they're covered in the things...


2) Fox: This is pretty cool - I'm keeping an eye out for more of him/her ?


3) Badger: Our favourite yet.  Unfortunately my only sighting is him/her? walking away - we're hoping to get better views over the next few weeks.


All in all, I'm really pleased with the results.  Not quite the 'Big 5' but there's time for a Lion yet...

The main limitation as far as I can see with my trail cam is that I need 2x SD cards so I can swop cards when reviewing footage.

Pi Trailcam
I felt quite inspired by this Raspberry Pi trailcam variant on this blog, which I might at some point consider emulating.  I particularly like the sparrowhawk.



Sunday 6 April 2014

Squirrels mating, Spring 2014

Now, I've been thinking of a tasteful way of putting this... but frankly have yet to find any option that does not degenerate into boyish giggling when passed around my family... so a quick update on the Owl Squirrel box.  All has been fairly quiet, except for an occasional peek.

However, this changed this morning with some frantic squirrel-on-squirrel action:

Yes I realise this is a little childish of me....
Had a particularly interesting moment when dealing with the observation from one of my (young) kids, that "Daddy, they really do like a long fight, don't they?".  From the short video clip below this is evidently true.

This is the first time they've been filmed as a pair, and I hope it bodes well for the possibility that we'll hear the pitter-patter of tiny squirrel feet.  According to Wikipedia (so it must be true, right?), gestation is approx 40 days, so expect squirrel babies mid May.  We're quite excited here!


Thursday 3 April 2014

Owl / Squirrel box update

Apparently the path to camera upgrades in nest boxes isn't really smooth.  When it works, it works really well.  It would appear that my squirrel pair are no longer in residence, however I did get a brief visitor earlier today which shows some strengths and weaknesses of this particular webcam


I need to deactivate the wobbly autofocus.  This can easily be done with the following command in  a linux terminal:

uvcdynctrl -v -d video0 --set='Focus, Auto' 0

I also seem to have run into a problem where it runs for approx 18 hrs then drops off the network.  Since at this point I cant SSH into it I cant tell if its still streaming and its a network problem, or whether the Pi has seized up.  I'm going to try reducing the resolution and fps and see if that makes it any more stable.  I have had this same webcam streaming in HD across my home network with a different Raspberry Pi solidly for several weeks, so I hope I haven't got a dodgy Pi one stuck up a tree now :(