Saturday, 15 June 2019

How to make a mini bird box monitor

It's all very well having a bird box camera that you can view on a PC/ipad/etc, I wanted an unobtrusive static monitor, so I made one

My little Elf Helpers demonstrating their bird box monitor

Some prerequisites....

  1. Bird box camera live streaming to your local network that can be viewed via a web-browser on a PC / ipad / other tablet computer.
  2. In my case I use Pikrellcam software running on a Raspberry Pi-equipped bird box with raspberry pi camera module (see a recent blog post on the nest that is showing on this ).
  3. In the picture above I've used a HyperPixel 4.0 screen from Pimoroni, which is plugged into a Raspberry Pi 3 Model A+, in a case to protect it.  Pimoroni have comprehensive setup instructions.

My normal way of monitoring this box on a PC using pikrellcam looks like this...


To get a minimal interface, you need to switch the Raspberry to 'kiosk mode'.  This means that when it boots up, it loads a specific website and removes extraneous stuff from the active window such as mouse cursors, scroll bars and distracting error messages.  This is the same approach that you get in applications such as photo booths, cash dispensers etc.

I modified a method from the  https://pimylifeup.com/raspberry-pi-kiosk/ website.  There are probably other ways of achieving the same end.  I'm also assuming that you're familiar with entering commands via SSH.  Google it if you don't know how.

Brief summary...

Make a file called kiosk.sh
nano /home/pi/kiosk.sh

Install dependencies
sudo apt-get install xdotool unclutter sed

Add this to the kiosk.sh file.  Substitute 'http://xxxurlToYourWebCam' with your local URL
#!/bin/bash

xset s noblank
xset s off
xset -dpms

unclutter -idle 0.5 -root &

sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /home/pi/.config/chromium/Default/Preferences
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' /home/pi/.config/chromium/Default/Preferences

/usr/bin/chromium-browser --noerrdialogs --disable-infobars --kiosk http://xxxurlToYourWebCam  &

Interestingly if you're doing his setup over SSH, if you run sh kiosk.sh from an SSH terminal window on another machine the kiosk wont start.  Probably as the active SSH session cant find a screen.  If you run it directly on the Pi with connected keyboard it works fine

Most of the following is copied verbatim from 'how to' the link above, with a couple of changes

Run script from command line using service file
sudo nano /lib/systemd/system/kiosk.service

Add the following text to this file:
Note that using the hyperpixel, this only works if 'Type=simple' is changed to 'Type=forking' (as suggested in the commentary at the end of the above article)
[Unit]
Description=Chromium Kiosk
Wants=graphical.target
After=graphical.target

[Service]
Environment=DISPLAY=:0
Environment=XAUTHORITY=/home/pi/.Xauthority
Type=forking
ExecStart=/bin/bash /home/pi/kiosk.sh
Restart=on-abort
User=pi
Group=pi

[Install]
WantedBy=graphical.target

Enable, then start the service
sudo systemctl enable kiosk.service
sudo systemctl start kiosk.service

Check status like this
sudo systemctl status kiosk.service

There's loads more detail on https://pimylifeup.com/raspberry-pi-kiosk/ but I've just listed the modified version I did to make it work.

One more thing....

There's some sort of bug/security procedure combo affecting the chrome web browser boot up time, such that it wont load chrome browser until it generate sufficient 'Entropy' in particular when there is no keyboard connected.  Seriously.  I think this has something to do with random number generation & cryptography and reflects how 'secure' the machine is.  Or something.

Anyway, the effect is that our kiosk wont load for several minutes after boot, which is a pain especially if you need to do a quick demo.

There's a solution detailed here:
https://www.raspberrypi.org/forums/viewtopic.php?t=237069
I'm not vouching for the relative safety or what it does (use at your own risk etc...)

sudo apt-get install haveged
sudo systemctl enable haveged
sudo systemctl start haveged

After all that I have a stand-alone Pi with screen that boots directly to my bird boxes webpage :)



Saturday, 1 June 2019

Dual camera birdbox 2019 update: Mistakes, Fixes, Bodges, nesting success and same year re-nesting

The dual camera bird box build started off back in 2016, and has been live since the 2017 Spring nesting season. It was my second Raspberry Pi-based birdbox, and my first attempt to combine a Raspberry pi camera module with a USB webcam on the same Raspberry pi mini-computer.  The system has video motion-capture, day + night illumination modes, an entrance hole activity logging mechanism, and also monitors temperature (?why not)...

Nearly fledging: My favourite picture of the 2019 season

This year (2019) is its first successful nesting season, seven great tit chicks fledged a few weeks ago, with another pair currently sitting on five eggs. I've had some requests on the Twitter about his box so this is an attempt to describe some of the modifications I've made over the last few years to fix various issues, and share some of the stuff I've learned along the way.

That's a 32mm entrance hole 

The Cameras

Camera 1 (SIDE): This is a Microsoft LifeCam Cinema usb webcam.  It can only see in visible light - I used one of these in my first birdbox (side-view-box, 2016).  A motion-jpeg (mjpeg) network video stream from this webcam is picked up by a remote PC running iCatcher CCTV software.  iCatcher isn't able to include audio from this source.

Camera 2 (TOP): This is a Raspberry Pi v2 Infra-Red (IR) camera positioned above the nest space.  An IR-cut module sits between the camera and the main nesting chamber and switches it between IR (night/dark) and visible light sensitivity (day/lit) .  A motion capture application called pikrellcam uses this camera, with the videos saved directly to the same networked PC mentioned above.  Camera-1 (the webcam) has a handy built-in microphone that pikrellcam cleverly uses, adding sound to the captured video from camera 2.

Camera 1 (Side) fits into height-adjustable slots.  Entrance hole is on the Left of this pic

The entrance hole has two IR beams that once broken record the event to a file.  Based on the order of breaking it's possible to work out whether the bird is coming or going.  I added a visual indicator to check this is working, the video below shows the outer then inner beams being triggered whilst I balance precariously up a ladder...


The Brain: This is a Raspberry pi model B+.  It's powered over a single cat5 network cable run of approx 150 meters using power-over ethernet (PoE),  which also connects it to my home network.

Yes, I know the wiring is a mess...
Practicalities of video review
The side camera can be reviewed directly via iCatcher console on a remote PC, or via a webpage using any network connected device.  Exporting video / screengrabs from iCatcher is a pain in the proverbials.

iCatcher Console with Camera-1 as source (USB webcam.  Visible light only.  No audio)

The top camera (Raspberry Pi cam) can be reviewed in a web browser on any network-connected device.  Exporting video / images is really easy and can be downloaded directly via a web browser.

Pikrellcam with Camera-2 as source (Raspberry Pi v2 IR camera+IR cut (day mode)_white LEDs on.  WITH Audio

Design evolution, 2017 to now (May 2019)

2017: The Bird Box went up in April.  No birds came in all year with just the occasional wasp and spider triggering video capture (pikrellcam).  The entrance hole had logged some attempts that were probably birds popping a head in, so assuming  that the hole was too small, I enlarged it from 20mm to 32mm over the Winter.  This wasn't as simple as just drilling the hole bigger as the entrance hole IR activity detector beams needed moving to accommodate a bigger hole.  The 'glass partition' between the side camera and the main nesting chamber kept getting dusty and it also created an annoying reflection of the side camera (which could essentially 'see itself'), so I replaced it for a half height plywood partition that the camera could see over, giving it an unimpeded view into the box, as well as allowing its microphone do a better job.



This box did do some useful work that season - Using a programme called ffmpeg, I used it to transcode a video feed from a separate, less-powerful Raspberry pi/usb webcam combo on a Robin nest and live-stream the result to YouTube.

2018: The enlarged entrance hole meant birds were coming in periodically, probably looking for food.  The default lighting remained on 'night mode' (just infra-red) as I thought the birds would be put off by the visible light LEDs.   I also hadn't got round to making the day-night switching happen automatically.

By April we had a pair of great tits bringing in moss.    I had the 'bright' idea of making the white leds come on when movement was detected by pikrellcam software to improve the daylight video capture... bad idea.  What I actually ended up with was a system that kept switching from night to day mode whenever a bird came in.  I think that the 'thunk' of the IR cut module switching between modes freaked them out so they nested in a neighbour's box instead.  That was the end of Spring 2018 nesting.

THIS YEAR.. 2019: A great tit pair started making visits from early March this year.  Nest building started 10 March, nine eggs laid and eight hatched on approx 17 April.  The last one fledged two weeks ago 7:50am on Sunday 5th May.  Unfortunately I missed them hatching as the PC where the videos are saved had crashed and I was away on holiday.

I also got around to fixing the day/night transition as described in this post, so lights come on at sunrise and off at dusk (switch to IR mode).

A selection of images / videos from nesting session 1

Cropped-in still image from camera 2.  Lighting aided by south-facing window on RHS of this image

Feeding False Black Widow Spider
Difficulty swallowing another false black widow spider

The next image is a screen-grab from a top camera video.  These are really easy to make using vlc media player.

An explosion of Great Tits

This is the male on the day the last chick fledged.  He's looking a bit battered

Scruffy male adult after the chicks all fledged

So... I though that was it for this season, which was timely as we were just about running out of disk space on the PC that stores the captured video.  I removed the remains of the deceased chick, and in the process broke the night illumination mode...

This one didn't make it :(
I switched from motion capture to timelapse on the last couple of days (pikrelcam makes this easy).  I converted this to a timelapse using Adobe Lightroom then converted it to a manageable size in vlc.  The dead chick above sadly passed away during this period which is evident particularly in the overnight section...



Poo-cam?
Daylight-sensitivity / video quality from the top down camera had dropped considerably over the previous year.  With no physical partition, the chicks were able to have a lovely time jumping up and down and pooing on the the side camera too.......Leaving a 'poo-obscured cam in the day, cant see anything at night' bird box.

Surprise 2nd nesting
...But 5 days later, another Great tit pair have moved in (Fri 17 May) and re-built the nest.  I've never had two back to back nests in the same box before.

And who miss, are you? this is the second female re-building the nest
So, poo-cam, poor lighting an degraded image quality will never do, so I removed the top camera section and cleaned the mess off the side camera that you can see in the picture above.

Top camera modifications... New Daylight LEDs / IR cut replacement
The Raspberry pi camera has poor low light sensitivity so I wanted to improve the lighting.  I swopped some of the existing 5mm LEDs for some LED panels from Pimoroni- I've used these in four other bird boxes I built this year see here.  They give a nice even illumination, avoiding the spotlight effect you get with 5mm LEDs.  You can see my original attempt to avoid spotlighting with the original 5mm leds by pointing them up towards a white background, but they don't really make enough light for the Raspberry Pi camera which has fairly awful low light sensitivity which isn't surprising given that its lens aperture is a couple of mm.

New LED panels on underside of top section

 I also swopped the IR cut for a new one (see this post) as the old one had fogged up.

2019 2nd nesting, updated performance...
Our five eggs have yet to hatch, the image quality is much better:

Cropped down to show detail.  I like the symmetry in this one
I'm using a python module called ephem to trigger the day to night lights-off at sunset, however she's usually tucked up 1 to 1.5 hrs before then.  Here you can see aside camera view before the upgrades (or cleaning the webcam...)

Female number two turning in for the night
The new pair has a different male
Male number 1 was looking very shabby at the end of the the last nesting session.
This clip shows make number 2 feeding female number 2 while she's incubating her five eggs, he's not scruffy, so Ithink that he's a different bird.  Can't say much about her though.


More to come... when this lot hatch


Sunday, 27 January 2019

LED backlights for birdbox illumination

All my birdboxes have Infrared (IR) and white light illumination, using 5mm LEDs.  The IR ones that I use give nice diffuse lighting, however the  white light ones tend to give a 'spotlight' effect.  I spotted these LED backlights recently from Pimoroni and once installed, they give a nice diffuse 'daylight' effect:

Underside of roof camera insert.  The circular black thing is an IR-cut module.

This year's new small bird boxes are equipped with two each.  They are wired in parallel to 5V with a 50 ohm resistor for each one, as well as another 50/100/200 ohm resistors between the ground and the uln2003 i/c transistor that is used to switch them for low/med/and blinding light levels.  Default is medium.

This picture shows the underside of the roof 'insert' for this small birdbox.  To the top and bottom are 5 IR LEDs in total.  These are wired in parallel, the only resistors are between the ground and the uln2003 (same arrangement as above there).  100 ohm seems the sweet spot.


The IR LED setting is still a bit spotty for my liking.. but I haven't found an IR led panel.... 
Last year's version of this used 4 IR LEDs, on in each corner, leaving a dim bit in the middle... which is exactly where all the action is... I fixed this this time by adding a fifth LED that points a the middle specifically.  The camera is rotated by 90 degrees to include the entrance hole in the image as well.  A 3mm green led indicator is added via one of the GPIOs (+10k ohm resistor) so that if I cant connect to it, it's obvious from the ground that there is/isn't power.



The diffuse white LED is an improvement on a previous version of this that uses 5mm white LEDs:

Nasty spotlighting in a previous version of the 2019 build, will be re-made with LED panel...

This is the business side of things:


Apart form the modifications described above, it's exactly the same setup as last season's box: Raspberry pi ZeroW (wifi), 8 MPixel v2 IR camera, IR-cut module. 5mm IR LEDs and White led panel (updated).  Illumination has high, medium and low (mood lighting) options.  Power is via 12v to 5v step-down. 

Video capture uses pikrellcam.  Video / image captures are stored locally, and can be archived off to a separate PC via wifi.  Local video storage overwrites if space drops under 20%.  This version uses the 'Lite' version of Raspian, so there is 13Gb available on the 16Gb micro SD card.  Based on last year's nesting activity that is good for approx 1 day of before a review is needed.  The prototyping board sitting on top of the Raspberry pi zero W is wired as described in this post (minus the rat-nest of wires for the LEDs...)

Sound...
I wanted to add a microphone this year, but had real trouble getting a USB microphone adaptor working without noise interference.  The semicircular thing poking out the micro USB socket is a microphone, but its a fairly poor one.  I will probably not turn it on in practice... ironically a usb webcam I had spare gave flawless audio, but there was no way to fit it in and it seemed a bit silly to use an additional webcam as a microphone anyway...

Saturday, 11 August 2018

Tawny Owl NestBox Wifi Hotspot - setup the correct way...

Earlier this year I setup a Raspberry Pi v2 minicomputer as a wifi access point to use it as a 'Wifi Hub' so that two nestbox cams based on its smaller WiFi-only sibling, Rasp Pi Zero W could connect to my local network, described in 'Wireless access point bird box', this sort of worked but had issues.

This version is for the 2019 Tawny Owl nest box:
Owlbox 2019... work in progress

I'm trying the new Pi B+ to use as a remote, wifi access hub that will live in the box and allow other nearby/camera-enabled ZeroW's to connect via wifi. The PiB+ wifi hub will double up to stream a webcam & attached Raspi Camera module too.

My first attempt at this (Pi v2 no cameras + 2x Pi zero Ws, 1 camera module each) is all powered by one Power over ethernet (PoE connection).  The Pi B+ is described as having faster wired network (ethernet) connection, so I theorised that it could better act a video streaming hub for several Pi zero Ws.

Why not buy a commercial wifi access point you ask?
  • This build costs the price of a raspberry pi 3B+, case, SD card & power adapter - so not far off buying a commercial Wifi access point.
  • The access point will 'double up' to host/stream video for its own webcam and a RaspPi camera module - show me a commercial wifi access point that can do that...
  • Its more fun than just buying a commercial one.  Really.
  • You can re-task it as an arcade table (I made this one), Media server, Kodi box, weather station, etc, etc

My first attempt at this worked.  Mostly.  The problem was that the method that I used included adding a DHCP server.  Every network has a DHCP server on it somewhere. Domestic networks typically have one running on their Internet service provider-provided modem/router (BT/Virgin/Sky etc).  A DHCP server ' hands out' network addresses (called IP addresses) to local devices connected to the network (e.g. PC/tablet/smart TV).  Think of it as creating a 'map' so that network traffic can be routed between devices.

The presence of a second DHPC server on my Raspberry Pi v2  caused intermittent problems as there were two operating on my network, beavering away and assigning different IP addresses to the same devices.  Annoyingly the device they fought over the most was the TV, so understandably that was not well received.

So, plan B (+)

An upfront disclaimer, most of this method is not mine, and is reproduced from parts of this 'how to' , and credit to its author jamesh (Paspberry pi Foundation).  I re-jigged it a bit to make it flow better and added in my own comments.

The first bit deals with making an a standalone wifi network... which is what I did first without reading it properly....  You actually want to follow the second part of the section that deals with setting it up as an access point to an existing network. 

-----------------------------------------------------------
One common use of the Raspberry Pi is as an access point is to provide wireless connections to a wired Ethernet connection, so that anyone logged into the access point can access the internet, providing of course that the wired Ethernet on the Pi can connect to the internet via some sort of router.
To do this, a 'bridge' needs to put in place between the wireless device and the Ethernet device on the access point Raspberry Pi. This bridge will pass all traffic between the two interfaces.

Use the following to update your Raspbian installation:
sudo apt-get update
sudo apt-get upgrade

Install the following packages to enable the access point setup and bridging:
sudo apt-get install hostapd bridge-utils

Comment: reboot at this point, or the 'add bridge' bit below wont work.
Since the configuration files are not ready yet, turn the new software off as follows:
sudo systemctl stop hostapd

Bridging creates a higher-level construct over the two ports being bridged. It is the bridge that is the network device, so we need to stop the eth0 and wlan0 ports being allocated IP addresses by the DHCP client on the Raspberry Pi.
edit: May want to save a version of this text on the pi's desktop before doing the following as you'll lose the internet temporarily
sudo nano /etc/dhcpcd.conf

Add denyinterfaces wlan0 and denyinterfaces eth0 to the end of the file (but above any other added interface lines) and save the file.

Add a new bridge, which in this case is called br0.
sudo brctl addbr br0

Connect the network ports. In this case, connect eth0 to the bridge br0.
sudo brctl addif br0 eth0

Now the interfaces file needs to be edited to adjust the various devices to work with bridging.
sudo nano /etc/network/interfaces make the following edits.

Add the bridging information at the end of the file.
# Bridge setup
auto br0
iface br0 inet manual
bridge_ports eth0 wlan0

edit the hostapd configuration file, located at /etc/hostapd/hostapd.conf, to add the various parameters for your wireless network (SSID) and password (wpa_passphrase).
sudo nano /etc/hostapd/hostapd.conf

wpa_passphrase=pwdhere
interface=wlan0
bridge=br0
#driver=nl80211
ssid=NameOfNetwork
hw_mode=g
channel=7
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=AardvarkBadgerHedgehog
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

We now need to tell the system where to find this configuration file.
sudo nano /etc/default/hostapd

Find the line with #DAEMON_CONF, and replace it with this:
DAEMON_CONF="/etc/hostapd/hostapd.conf"

Now reboot the Raspberry Pi.
There should now be a functioning bridge between the wireless LAN and the Ethernet connection on the Raspberry Pi, and any device associated with the Raspberry Pi access point will act as if it is connected to the access point's wired Ethernet.

The ifconfig command will show the bridge, which will have been allocated an IP address via the wired Ethernet's DHCP server. 
-----------------------------------------------------------
A few more observations...

Raspberry Pi v2 has no built in wifi so I added a usb wifi dongle to the original version I did.  
The Pi 3B+ has built in Wifi (both have ethernet), so there's no need to add wifi dongle.  My Pi v2 version works fine over Power over Ethernet (PoE).  The version B+ most definitely does NOT, so 2019 Owl Box will need a better power supply (and better power cable) to the top of its tree than the optimistically planned PoE only solution.


Sunday, 29 July 2018

Whats wrong with our Tawny Owl Nest Box?

Our Tawny Owl nest box was 'temporarily' retired last year because I hadn't designed it properly it was difficult to clean out the squirrel detritus.


This pic is taken while dangling precariously from a ladder approx 30ft up a pine tree. 
The box is full of sticks collected by squirrels, so no owls are going to use this... Ideally I would have designed it so that I wouldn't have to climb up another couple of extra feet to open the lid to clear it out, but I built it basically as a massive 'small bird box', and didn't scale up my lateral thinking facilities alongside.

Feeling creative I drew this up detailing all its other problems...


Its been on a 'to do' list for a while, and I was inspired by Kate Macrae's recent Tawny Owl Box re-build described here to get around to doing it.

To make matters worse, in an attempt to adapt it a little while ago, I took the side off (side facing in the diag above) to make a 'cleaning out hatch', and promptly misplaced the whole side.  It is now what could only be described as 'drafty'.  The front ledge fell off too...

Enter Tawny Owl Box v2
Its replacement aims to address all the issues described above, and add some more cameras with the requisite illumination (IR and visible light).  Probably.  Eventually.

Saturday, 7 July 2018

BirdBox infra-red camera IR filter upgrade

Now that the bird nesting season is over, it's upgrade time! The infrared (IR) cameras in this year's boxes are getting IR filters...

and some to spare...

This year's two new bird boxes have an infrared (IR) camera with visible and IR LEDs (Robin box Birch log tit box).  There is 'night mode' with IR light  that the birds cant see, and day mode with optional visible light illumination. All non IR-light sensitive cameras have an IR filter built into the camera, whereas IR-sensitive cameras don't.

Without an IR filter, IR camera images have a pinkish cast to them in visible light, giving a permanent 'Hipstamatic' look:

Un-filtered IR camera pink colour is obvious here

An IR filter (called an IR-cut) converts an IR-sensitive camera into a conventional one that can't see IR light.  This gizmo has a bit of glass in it that blocks IR light, and can move backwards and forwards over the camera lens by changing the voltage polarity applied across it.

These bird boxes use the 8MP Raspberry Pi IR camera board.  This has a similar shape and design to those found found in many commercial CCTV cameras, so IR filters designed for CCTV camera modules can be fitted to them.  Sort of...

My first attempt to do this was the top-down camera in last years's double camera bird box.  Unfortunately, I sourced an IR-cut that had an ?M12 lens mount on it, basically a dirty great chunk of plastic poking out the font that needed to be cut off before I could use it = fiddly.  You can see my v1 test for this here from a separate project:


I wanted something easy to add to this year's boxes, and found an IR cut filter without a lens mount which fits nicely over the existing screw holes in the Raspberry Pi camera module (22mm separation).

This come from AliExpress (China, so take a couple of weeks to get to the UK), and costs $3.50 so wont break the bank.  It comes with a separate lens mount holder which I haven't used.  There's the option of 20mm or 22mm screw hole separation at order - you need the 22mm one as to fit the Raspberry Pi camera board.


This shows the underside of the camera unit that is slotted in to the top of the birdbox, pre and post IR-cut upgrade. The ir-cut is attached over the camera by M2 nylon screws and nuts, and the screws just go through the 4mm ply and pass through the camera board.

IR-cut sitting flush against the 'underside' of the bird box camera insert

I had previously designed this year's Raspberry pi zero W add-on board with an IR-cut in mind.  The voltage polarity reversal to switch the IR-cut is done with a L293DNE (£2.70).  I did  a more detailed writeup of this here which also has some example code.  The design for the wiring of this my customised add-on board is detailed here.



No birds in this, but you get the idea what switching the IR-cut in natural daylight does...


...so there are alternatives to this, eg here which has integrated IR LED, camera and IR cut - does not have stellar reviews on amazon though.

Sunday, 1 July 2018

How to make a Solitary Bee Box

We noticed a solitary bee using a gap between some tongue and groove wood cladding on the rabbit shed, which led to this bee house build...

The aim of most solitary bee house designs should be to...
  • Provide a safe place for solitary bees to nest.
  • Provide somewhere safe for new adults to emerge in the Spring
  • Allow easy access to cocoons for collection and cleaning at the end of the season.
This is our v1.0 bee house attempt:


Bee house in situ


Solitary bee boxes come in many different varieties, but are variations on a long narrow opening into which nesting chambers are constructed.  Examples include:
  1. Bamboo canes: Variable sizes kept in a container of some kind.  Can source yourself or get online.  Disadvantages are you cant collect cocoons so allows disease, predator and parasite build up over time.
  2. Reeds: As above, but may be able to split to get the cocoons out.  
  3. Drilled blocks/logs.  Same issues as bamboo
  4. Cardboard tubes +/- paper liners: Looks a bit of a fiddle, but might try this one in the Spring
  5. Stackable trays with pre-cut channels.  Channels cut into flat pieces of wood that are stacked, e.g.  https://crownbees.com/, wildlifeworld.  This option came out on top, with cardboard tubes a close second.


Life-cycle 
Female bees collect pollen.  Female bee deposits the pollen in an appropriately sized hole.  She then lays an egg and closes up a chamber containing egg+pollen with a mud wall .  She repeats the process until the hole is full with multiple chambers.  In the Summer the eggs develop into larvae, feed on the pollen stores and develop into a cocoon.  In the following Spring the new bee emerges from the cocoon.  Males emerge first so that they're available to inseminate the females, who then go onto to perpetuate the life-cycle.

This v1.0 design is based on the stackable tray type.
  • Longer holes produce more females.  Females do more pollinating than the males (who hang about at the beginning of the season to inseminate the females then die).  We made 7.5 inch long trays, with the channels cut right to the end.  Some websites had examples up to 11 1/2 inches long, but I had limited timber stocks to work with!
  • Channels are 5/16 inch deep and 3/8 inch wide, which is the recommended size for mason bees.  I used this 1/4" square-end router bit.  I wanted a round ended (or 'bull nose') bit but couldn't find one the right size that didn't cost the earth.
  • Trays were cut from one piece of 18x199x2400mm pine (mixing imperial and metric, sorry), so I got 12 trays out of one piece.
  • Each tray has 8 channels giving 96 channels in total
  • Rather than routing these individually which would be a pain, I just routed the wood into one very long tray and then cut that into sections.
  • As the channels go through to the back, there's a piece of cardboard folded over the back end (as in this video).
  • The front of the block is unevenly scorched, as this apparently that helps them find the correct hole.  Other variations of this include marking the front, or using differing colour trays.
Stacked tray block before and after scorching
  • The stack is bound together by a tie down strap with metal cam buckle (I had to google the proper name for that) picked up from the local DIY shop, but can be sourced elsewhere.
  • There's an 'emergence drawer' at the base for any cocoons we collect this year (prob a bit late, may get a batch in for next Spring).  This gives a safe place for adults to emerge.  The holes in the front allow the newly emerged bees out (drawer would be closed...).
Safe place for new adults to emerge from cocoons in  the Spring

  • A South-Facing position is recommended, we settled for S-SE 

The effect of scorching is more obvious in this pic


The box housing the bee block is made from 'stuff lying about', but mostly is 6mm ply and finished with a coat of linseed oil.  No oils / preservatives are applied to the blocks themselves.

Most of the solitary bee info stuff that I could find in the web dealt with Mason bees, but there are many others which presumably have their own nesting preferences.

Some links that I found useful
http://nurturing-nature.co.uk (watch them build, had a spot on Springwatch 2018)
http://cvgss.org/mason-bees/
https://crownbees.com/
https://beekeepclub.com/crown-bees-mason-bee-house-48-hole-wood-nesting-tray-kit-review/
https://www.masonbees.co.uk/product-page/bee-lodge
https://threehundredandsixtysix.wordpress.com/2013/02/01/green-steps-building-a-mason-bee-house/

...so no tech in this one, but I like the idea of this bee counter discussion thread, which aims to count honey bees activity around a nest entrance hole using a raspberry pi camera... Could theoretically apply the same approach with a down-facing camera on this box...