Sunday, April 18, 2021

Bird box Camera

 One of the best presents that my sister and I gave to our aging mother was a bird nexting box with a camera in it. With a video extender, this was wired to her TV so that she could (during nesting season) watch what was going on. In each year a family of Blue Tits was raised, though it didn't always have a happy ending. This image is a photograph of her TV screen!



I wanted to build myself such a nest box here in Massachusetts -- the commercial ones seemed expensive and not very flexible. In my case, I wanted to be able to put it some distance from the house, so power and getting the video back were both going to prove problematic. After some research on cheap WiFi cameras on Aliexpress, I settled on a V380 camera. One of the important factors is whether you can adjust the focus -- and on these you can. You need to remove the four screws that hold the back on, and then you can push the lens in and the the circuit board will pop out. On mine, there was a blob of black gunk that held the focus locked, but a little bit of force overcame that. By unscrewing the lens a bit, the focus distance is shortened. Another factor is that these cameras can speak ONVIF and so can be integrated into many other video recording/monitoring systems. They don't come enabled for this, but the hack is easy:

  • Prepare a microsd card with a file named ceshi.ini. The microsd should be FAT formatted.
  • The file should contain the following two lines:
[CONST_PARAM]
rtsp=1

  • Put the card into the V380 and power it up. It will go through the usual startup sequence of speaking, but it will include a couple of Chinese phrases.
  • Remove the card and reboot (powercycle). It will now support ONVIF.
This appears to make a fairly fundamental change as this survived doing a firmware upgrade! 

The other aspect that you probably want to change is to turn off the voice prompts. This can be done with the V380 Android App -- I installed this on an old phone that I just use for installing apps of unknown origin. If you work your way through the settings, you can disable the voice prompts. Alternatively, while you have the back off, you can just unplug the speaker!

I used these Audubon Society plans for my Bluebird box -- but I didn't include the mounting blocks as I was just going to screw the box to a wooden 4x4 that used to have a bird feeding platform on it. To mount the camera, I just drilled a large hole in the roof so that the camera could peek through. I threaded the power connection up the pole, through one of the ventilation holes at the top and then through the camera viewing hole. I used some old flat 4 core telephone cable and just wired appropriate connectors on the end. To make it all water tight and protect the camera, I used a short piece of 3" Schedule 40 pipe, with a rubber end cap to keep the water out. It turned out that the steel clip that tightens this up interfered with the WiFi signal, so I had to remove it. I use Ubiquiti access points and when mounted up high (in the attic of the house), seem to have a good range into the yard. 

This leaves the problem of power -- currently, I'm using a portable USB power bank, and the camera uses very little power (during the day). According to a cheap USB meter, it consumes around 200mA. At night it is rather worse as it turns on infrared LEDs. My longterm plan is to use a 12V lead acid battery with a 12v to 5v buck converter and put them in a waterproof box -- this box isn't expensive, but it also isn't sealed. However, it looks as though it will keep the rain out. My goal is to be able to put two nest boxes fairly close together and just run 5V between them.


The image says that it is 1080P, but it is actually only 1280x720. Also, I don't have the camera pointing straight down -- but it gives the general idea.




The bad news is that I finished it in the middle of April, and the local birds all seem to have made their nests by now. However, I will be ready for next year, and I'll probably build a couple more in the fall. Also, I managed to make the bottom piece the wrong size so that the front flap does not go vertical. I discovered this after gluing and nailing it all together. I don't think that the bird building inspector is going to give me any grief!

Another problem is that I have an old Q-See NVR that I use for recording my security cameras, but when I try and point it at this birdbox camera, the server just crashes. Worse, I discover that Q-See is now out of business....

Update: April 20th

It seems that a sparrow has started to make a nest. I had hoped for a more photogenic bird, but I'm still impressed that it moved in within 48 hours. It must be like the local real estate market!